Austin Seipp | 27 Jan 01:13 2015

ANNOUNCE: GHC 7.10.1 Release Candidate 2

We are pleased to announce the second release candidate for GHC 7.10.1:

    https://downloads.haskell.org/~ghc/7.10.1-rc2/

This includes the source tarball and bindists for 64bit/32bit Linux
and Windows. Binary builds for other platforms will be available
shortly. (CentOS 6.5 binaries are not available at this time like they
were for 7.8.x). These binaries and tarballs have an accompanying
SHA256SUMS file signed by my GPG key id (0x3B58D86F).

We plan to make the 7.10.1 release sometime in February of 2015.

Please test as much as possible; bugs are much cheaper if we find them
before the release!

--

-- 
Regards,

Austin Seipp, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/
harry | 25 Jan 11:18 2015
Picon

Unable to build 7.10.1 RC1 on Jessie

I'm trying to build 7.10.1 RC on Debian Jessie. I get an error:

configure: error: in
`/ghc-7.10.0.20141222/libffi/build/x86_64-unknown-linux-gnu':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

config.log shows:

configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libffi"
| #define PACKAGE_TARNAME "libffi"
| #define PACKAGE_VERSION "3.1"
| #define PACKAGE_STRING "libffi 3.1"
| #define PACKAGE_BUGREPORT "http://github.com/atgreen/libffi/issues"
| #define PACKAGE_URL ""
| #define PACKAGE "libffi"
| #define VERSION "3.1"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
(Continue reading)

Evan Laforge | 23 Jan 15:16 2015
Picon

template haskell vs. -prof

I ran into trouble compiling template haskell with -prof, and came
across the ghc manual "7.9.4. Using Template Haskell with Profiling".
Unfortunately I can't use its advice directly since I put profiling
and non-profiling .o files into different directories.  But in
principle it seems it should work, I just have to get ghc to load TH
from the debug build directory, which is built with -dynamic, while
continuing to load from the profile build directory.

But are there flags to get it to do that?  I'm using "-osuf .hs.o
-ibuild/profile/obj".  If I put ":build/debug/obj" on the -i line, it
still seems to find the profiling one.  The ghc manual advice probably
gets around it by using different -osufs... I guess TH somehow ignores
-osuf?  Except when I compile the debug version with osuf, if finds
them fine, so I don't really know how it works.

Is there a way I can directly tell TH where to look?  It seems awkward
to rely on all these implicit and seemingly undocumented heuristics.

And, this is somewhat beside the point, but shouldn't TH theoretically
be able to load directly from .hs and compile to bytecode like ghci
can do if it doesn't find the .o file?

And, even more beside the point, the only reason I'm messing with TH
is for a really simple (one line) multi-line string literal
quasiquote.  Surely I'm not the only person who would enjoy a
-XMultiLineStringLiteral extension?  The alternative seems to be a
program to add or strip all of the "\n\"s, and when I want to edit,
copy out, strip, edit, paste back in, add back.  At that point maybe
it's easier to just get used to all the \s... but then indentation is
all a bit off due to the leading \.
(Continue reading)

John Wiegley | 22 Jan 19:41 2015

ANN: git-monitor

git-monitor auto-commits all changes to a Git working tree, within a special
branch named "refs/snapshots/refs/heads/≤branch>".  It has no impact on the
Git repository otherwise, and will not effect your real branches.

It has the following features:

  - It is designed to be extremely resource efficient, both in CPU cost and
    memory.  I wanted something I could run several instances of on my laptop,
    without paying much of a battery cost.

    This efficiency is achieved by using gitlib with the libgit2 backend.  The
    current state of the working tree is maintained as a Git object in memory,
    and is updated in place before being written back out to disk.  Thus, the
    amount of computation done remains minimal, as we do not need to rebuild
    the Git tree at each iteration (as "git-commit" would do).

  - Whenever git-monitor is exited and restarted, the previous snapshot
    "branch" is discarded.  These are only intended to be viable during and
    between runs.

  - By having such a branch, you can easily browse through the diffs of your
    changes throughout the day.

By default, every action taken is printed to the console where git-monitor is
run, but it can also be run in silent mode, for example if you choose to
background it for the rest of the day.

    http://hackage.haskell.org/package/git-monitor

    https://github.com/jwiegley/git-monitor
(Continue reading)

Volker Wysk | 21 Jan 16:36 2015
Picon

How to remove a cabal package from the local system?

Hi!

I have installed/registered a new version of a package with cabal by accident. 
How can I remove it again?

There is something in ~/.cabal/packages/hackage.haskell.org, but the defective 
version isn't included. 

bye
V.W.
Volker Wysk | 20 Jan 19:36 2015
Picon

"Found hole"

Hello!

What is a "hole"? 

This program fails to compile:

main = _exit 0

I get this error message:

ex.hs:1:8:
    Found hole ‘_exit’ with type: t
    Where: ‘t’ is a rigid type variable bound by
               the inferred type of main :: t at ex.hs:1:1
    Relevant bindings include main :: t (bound at ex.hs:1:1)
    In the expression: _exit
    In an equation for ‘main’: main = _exit

When I replace "_exit" with "foo", it produces a "not in scope" error, as 
expected. What is special about "_exit"? It doesn't occur in the Haskell 
Hierarchical Libraries.

Bye
Volker

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
(Continue reading)

Nicholas Clarke | 20 Jan 14:08 2015
Picon

Fwd: UNPACK Existential datatype

I'd like to be able to use the UNPACK pragma on an existentially quantified datatype. So as in the below example:

{-# LANGUAGE ExistentialQuantification #-}

data Foo = forall a. Show a => Foo !a
instance Show Foo where
  show (Foo a) = "Foo! " ++ show a

data Bar =
    Bar {-# UNPACK #-} !Foo
  deriving (Show)

main :: IO ()
main = do
  let foo = Foo "Hello"
      bar = Bar foo
  print bar

I would expect the `Foo` constructor to be unpacked into Bar, as if I had written:

data Bar = forall a. Show a => Bar !a

However, instead I get the 'Ignoring unusable UNPACK pragma on the first argument of ‘Bar’' warning. Is there a reason this shouldn't work, or a workaround to get it to do so?

Cheers,

Nick


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Björn Peemöller | 20 Jan 12:20 2015
Picon

GHC 7.10 regression when using foldr

I just discovered that the following program compiled fine using GHC
7.8.4 but was rejected by GHC 7.10.1-rc1:

~~~
data List a = Nil | Cons a (List a)

instance Read a => Read (List a) where
  readsPrec d s = map convert (readsPrec d s)
    where
    convert (xs, s2) = (foldr Cons Nil xs, s2)
~~~

GHC 7.10 now complains:

~~~
Read.hs:5:23:
    Could not deduce (Foldable t0) arising from a use of ‘convert’
    from the context (Read a)
      bound by the instance declaration at Read.hs:4:10-32
    The type variable ‘t0’ is ambiguous
    Note: there are several potential instances:
      instance Foldable (Either a) -- Defined in ‘Data.Foldable’
      instance Foldable Data.Proxy.Proxy -- Defined in ‘Data.Foldable’
      instance GHC.Arr.Ix i => Foldable (GHC.Arr.Array i)
        -- Defined in ‘Data.Foldable’
      ...plus three others
    In the first argument of ‘map’, namely ‘convert’
    In the expression: map convert (readsPrec d s)
    In an equation for ‘readsPrec’:
        readsPrec d s
          = map convert (readsPrec d s)
          where
              convert (xs, s2) = (foldr Cons Nil xs, s2)

Read.hs:5:32:
    Could not deduce (Read (t0 a)) arising from a use of ‘readsPrec’
    from the context (Read a)
      bound by the instance declaration at Read.hs:4:10-32
    The type variable ‘t0’ is ambiguous
    Relevant bindings include
      readsPrec :: Int -> ReadS (List a) (bound at Read.hs:5:3)
    Note: there are several potential instances:
      instance (Read a, Read b) => Read (Either a b)
        -- Defined in ‘Data.Either’
      instance forall (k :: BOX) (s :: k). Read (Data.Proxy.Proxy s)
        -- Defined in ‘Data.Proxy’
      instance (GHC.Arr.Ix a, Read a, Read b) => Read (GHC.Arr.Array a b)
        -- Defined in ‘GHC.Read’
      ...plus 18 others
    In the second argument of ‘map’, namely ‘(readsPrec d s)’
    In the expression: map convert (readsPrec d s)
    In an equation for ‘readsPrec’:
        readsPrec d s
          = map convert (readsPrec d s)
          where
              convert (xs, s2) = (foldr Cons Nil xs, s2)
~~~

The reason is the usage of foldr, which changed its type from

  foldr :: (a -> b -> b) -> b -> [a] -> b -- GHC 7.8.4

to

  foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b -- GHC 7.10.1

Thus, the use of foldr is now ambiguous. I can fix this by providing a
type signature

  convert :: ([a], String) -> (List a, String)

However, is this breaking change intended?

Regards,
Björn

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
adam vogt | 20 Jan 06:29 2015
Picon

ghc-7.10.0 type inference regression when faking injective type families

Hello List,

With ghc - 7.8 and 7.6 the following program is accepted:

{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}

class (UnF (F a) ~ a, Show a) => C a where
    type F a
    f :: F a -> a

type family UnF a

g :: forall a. C a => a -> String
g _ = show a
  where a = f (undefined :: F a) -- :: a

ghc-7.10.0.20141222 does not accept the program unless I uncomment the
type signature (a :: a).

I believe this is the main difference that prevents HList from
compiling with 7.10, but I could have made a mistake in coming up with
this minimal example.

Regards,
Adam
Volker Wysk | 20 Jan 05:14 2015
Picon

Package version question with Cabal

Hi!

I've uploaded my library to Hackage, and now I'm trying to install it via 
cabal:

~/src/hsshellscript $ cabal install 
Resolving dependencies...
In order, the following will be installed:
hsshellscript-3.3.3 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring hsshellscript-3.3.3...
Building hsshellscript-3.3.3...
Preprocessing library hsshellscript-3.3.3...
In-place registering hsshellscript-3.3.3...
Creating package registration file: /tmp/pkgConf-hsshellscript-3.37397.3
Installing library in
/home/v/.cabal/lib/x86_64-linux-ghc-7.8.3/hsshellscript-3.3.3
Registering hsshellscript-3.3.3...
Installed hsshellscript-3.3.3

~/src/hsshellscript $ cabal list hsshellscript
* hsshellscript
    Synopsis: Haskell for Unix shell scripting tasks
    Default available version: 3.3.2
    Installed versions: 3.3.1, 3.3.2, 3.3.3
    Homepage: http://www.volker-wysk.de/hsshellscript/
    License:  LGPL

The thing wich looks like a problem is, that the new version isn't made the 
"Default available version". It is 3.3.3, but "Default available version" is 
still 3.3.2.

Is this a problem? How do I register a new default version?

Bye
Volker
George Colpitts | 17 Jan 13:36 2015
Picon

Re: ANNOUNCE: GHC 7.10.1 Release Candidate 1 - questions on Mac OS platform

  • Has anybody successfully used llvm on the Mac with 7.10.1 RC1? My problem is described below.
  • Which is the recommended gcc to use when building source?
    • GNU gcc  4.9.2
    • Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
  • When using ghci with 7.10.1 RC1 I get the following errors intermittently. Is anybody else seeing these?
    • Too late for parseStaticFlags: call it before runGhc or runGhcT
      *** Exception: ExitFailure 1
    • ld: library not found for -l:ghc31505_10.dylib
      collect2: error: ld returned 1 exit status
      phase `Linker' failed (exitcode = 1)
​Thanks​

On Fri, Jan 2, 2015 at 9:12 AM, George Colpitts <george.colpitts <at> gmail.com> wrote:
Only problem remaining is compiling with -fllvm and running resulting executable

​.
​..​


  • llvm , compiling with llvm (3.4.2) gives the following warnings:
    • $ ghc  -fllvm cubeFast.hs
      [1 of 1] Compiling Main             ( cubeFast.hs, cubeFast.o )
      clang: warning: argument unused during compilation: '-fno-stack-protector'
      clang: warning: argument unused during compilation: '-D TABLES_NEXT_TO_CODE'
      clang: warning: argument unused during compilation: '-I .'
      clang: warning: argument unused during compilation: '-fno-common'
      clang: warning: argument unused during compilation: '-U __PIC__'
      clang: warning: argument unused during compilation: '-D __PIC__'
      Linking cubeFast ...
    • running the resulting executable crashes (compiling without -fllvm gives no warnings and executable works properly)
    •  cat bigCube.txt | ./cubeFast > /dev/null
      Segmentation fault: 11
    • Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
      Exception Codes:       KERN_INVALID_ADDRESS at 0xfffffffd5bfd8460
  • ​...

​Configuration details:

  • Mac OS 10.10.1 (Yosemite)
  •  uname -a
    Darwin iMac27-5.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
  • llvm info:
  •  opt --version
    LLVM (http://llvm.org/):
      LLVM version 3.4.2
      Optimized build with assertions.
      Built Oct 31 2014 (23:14:30).
      Default target: x86_64-apple-darwin14.0.0
      Host CPU: corei7
  •  gcc --version
    gcc (Homebrew gcc 4.9.1) 4.9.1
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  • ​ /usr/bin/ghc --info
     [("Project name","The Glorious Glasgow Haskell Compilation System")
     ,("GCC extra via C opts"," -fwrapv")
     ,("C compiler command","/usr/bin/gcc")
     ,("C compiler flags"," -m64 -fno-stack-protector")
     ,("C compiler link flags"," -m64")
     ,("Haskell CPP command","/usr/bin/gcc")
     ,("Haskell CPP flags","-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs")
     ,("ld command","/usr/bin/ld")
     ,("ld flags"," -arch x86_64")
     ,("ld supports compact unwind","YES")
     ,("ld supports build-id","NO")
     ,("ld supports filelist","YES")
     ,("ld is GNU ld","NO")
     ,("ar command","/usr/bin/ar")
     ,("ar flags","clqs")
     ,("ar supports at file","NO")
     ,("touch command","touch")
     ,("dllwrap command","/bin/false")
     ,("windres command","/bin/false")
     ,("libtool command","libtool")
     ,("perl command","/usr/bin/perl")
     ,("target os","OSDarwin")
     ,("target arch","ArchX86_64")
     ,("target word size","8")
     ,("target has GNU nonexec stack","False")
     ,("target has .ident directive","True")
     ,("target has subsections via symbols","True")
     ,("Unregisterised","NO")
     ,("LLVM llc command","llc")
     ,("LLVM opt command","opt")
     ,("Project version","7.8.3")
     ,("Booter version","7.6.3")
     ,("Stage","2")
     ,("Build platform","x86_64-apple-darwin")
     ,("Host platform","x86_64-apple-darwin")
     ,("Target platform","x86_64-apple-darwin")
     ,("Have interpreter","YES")
     ,("Object splitting supported","YES")
     ,("Have native code generator","YES")
     ,("Support SMP","YES")
     ,("Tables next to code","YES")
     ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn")
     ,("Support dynamic-too","YES")
     ,("Support parallel --make","YES")
     ,("Dynamic by default","NO")
     ,("GHC Dynamic","YES")
     ,("Leading underscore","YES")
     ,("Debug on","False")
     ,("LibDir","/Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3")
     ,("Global Package DB","/Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3/package.conf.d")
     ]
  • Not sure I found the correct instructions for building from source,  I used the following:
    • $ autoreconf $ ./configure $ make $ make install


On Tue, Dec 23, 2014 at 10:36 AM, Austin Seipp <austin <at> well-typed.com> wrote:
We are pleased to announce the first release candidate for GHC 7.10.1:

    https://downloads.haskell.org/~ghc/7.10.1-rc1/

This includes the source tarball and bindists for 64bit/32bit Linux
and Windows. Binary builds for other platforms will be available
shortly. (CentOS 6.5 binaries are not available at this time like they
were for 7.8.x). These binaries and tarballs have an accompanying
SHA256SUMS file signed by my GPG key id (0x3B58D86F).

We plan to make the 7.10.1 release sometime in February of 2015. We
expect another RC to occur during January of 2015.

Please test as much as possible; bugs are much cheaper if we find them
before the release!

--
Regards,

Austin Seipp, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/
_______________________________________________
ghc-devs mailing list
ghc-devs <at> haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs



_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Gmane