Re: [Haskell] ANNOUNCE: GHC version 7.8.3
On 01/09/2014 12:30, Sven Panne wrote: 2014-09-01 9:26 GMT+02:00 Simon Marlow marlo...@gmail.com: Hi Sven - you would need to compile the module with -dynamic or -dynamic-too to have it be picked up by the new dynamically-linked GHCi in 7.8. Ah, OK... Adding -dynamic makes this work, but with -dynamic-too, ghci still loads the interpreted version. I didn't follow the linking story in detail, so this is all a bit confusing. I think that at least http://www.haskell.org/ghc/docs/7.8.3/html/users_guide/ghci-compiled.html needs some update, because as it is, it doesn't reflect reality. Yes, -dynamic-too doesn't work: https://ghc.haskell.org/trac/ghc/ticket/8736 You're right about the docs, I'll take a look at fixing that. Cheers, Simon ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
Hi Sven - you would need to compile the module with -dynamic or -dynamic-too to have it be picked up by the new dynamically-linked GHCi in 7.8. Cheers, Simon On 05/08/2014 12:32, Sven Panne wrote: Coming a bit late to the party, but I've just realized this when playing around with the platform release candidate: I've successfully built and installed the 2014 RC3 on x64 Ubuntu Linux 12.04 LTS using ghc-7.8.3-x86_64-unknown-linux-centos65.tar.bz2 from the GHC download page. But somehow loading compiled code into ghci doesn't work, ghci always uses interpreted code. To verify this I've followed the simple example at http://www.haskell.org/ghc/docs/7.8.3/html/users_guide/ghci-compiled.html: - svenpanne@svenpanne:~/ghci-test$ ll total 16 -rw-r- 1 svenpanne eng 33 Aug 5 13:01 A.hs -rw-r- 1 svenpanne eng 24 Aug 5 13:02 B.hs -rw-r- 1 svenpanne eng 24 Aug 5 13:02 C.hs -rw-r- 1 svenpanne eng 15 Aug 5 13:02 D.hs svenpanne@svenpanne:~/ghci-test$ more *.hs :: A.hs :: module A where import B import C :: B.hs :: module B where import D :: C.hs :: module C where import D :: D.hs :: module D where svenpanne@svenpanne:~/ghci-test$ ghci-7.6.3 GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude :! ghc-7.6.3 -c D.hs Prelude :load A [2 of 4] Compiling C( C.hs, interpreted ) [3 of 4] Compiling B( B.hs, interpreted ) [4 of 4] Compiling A( A.hs, interpreted ) Ok, modules loaded: D, C, A, B. *A :show modules D( D.hs, D.o ) C( C.hs, interpreted ) A( A.hs, interpreted ) B( B.hs, interpreted ) *A Leaving GHCi. svenpanne@svenpanne:~/ghci-test$ rm *.hi *.o svenpanne@svenpanne:~/ghci-test$ ghci-7.8.3 GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude :! ghc-7.8.3 -c D.hs Prelude :load A [1 of 4] Compiling D( D.hs, interpreted ) [2 of 4] Compiling C( C.hs, interpreted ) [3 of 4] Compiling B( B.hs, interpreted ) [4 of 4] Compiling A( A.hs, interpreted ) Ok, modules loaded: D, C, A, B. *A :show modules D( D.hs, interpreted ) C( C.hs, interpreted ) A( A.hs, interpreted ) B( B.hs, interpreted ) *A Leaving GHCi. - Using strace showed that ghci-7.8.3 reads D.hs twice (huh?) and D.hi once, but only stats D.o (never reads its contents): - [...] 12124 stat(D.hs, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 stat(./D.hs, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 open(./D.hs, O_RDONLY|O_NOCTTY|O_NONBLOCK) = 11 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff90c12938) = -1 ENOTTY (Inappropriate ioctl for device) 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 lseek(11, 0, SEEK_CUR)= 0 12124 read(11, module D where\n, 8096) = 15 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 lseek(11, 0, SEEK_CUR)= 15 12124 close(11) = 0 12124 open(./D.hs, O_RDONLY|O_NOCTTY|O_NONBLOCK) = 11 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff90c12938) = -1 ENOTTY (Inappropriate ioctl for device) 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=15, ...}) = 0 12124 read(11, module D where\n, 8096) = 15 12124 close(11) = 0 12124 stat(./D.o, {st_mode=S_IFREG|0640, st_size=933, ...}) = 0 12124 stat(Prelude.hs, 0x7f28b26e2b30) = -1 ENOENT (No such file or directory) 12124 stat(Prelude.lhs, 0x7f28b26e2cd0) = -1 ENOENT (No such file or directory) 12124 stat(B.hs, {st_mode=S_IFREG|0640, st_size=24, ...}) = 0 12124 stat(./B.hs, {st_mode=S_IFREG|0640, st_size=24, ...}) = 0 12124 open(./B.hs, O_RDONLY|O_NOCTTY|O_NONBLOCK) = 11 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=24, ...}) = 0 12124 ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff90c12938) = -1 ENOTTY (Inappropriate ioctl for device) 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=24, ...}) = 0 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=24, ...}) = 0 12124 lseek(11, 0, SEEK_CUR)= 0 12124
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
2014-09-01 9:26 GMT+02:00 Simon Marlow marlo...@gmail.com: Hi Sven - you would need to compile the module with -dynamic or -dynamic-too to have it be picked up by the new dynamically-linked GHCi in 7.8. Ah, OK... Adding -dynamic makes this work, but with -dynamic-too, ghci still loads the interpreted version. I didn't follow the linking story in detail, so this is all a bit confusing. I think that at least http://www.haskell.org/ghc/docs/7.8.3/html/users_guide/ghci-compiled.html needs some update, because as it is, it doesn't reflect reality. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
This makes me thinking: Can we employ this technique (or some variation of it) to have an *interpreter-only* version of TH for cross-compiled targets? Many TH use-cases do not necessitate the loading and running of native libraries, and e.g. for generating some lenses the interpreter-only TH solution would be a great progress already. So, instead of adding the TH-feature to cross-compilation, one could strip a normal stage-2 build from its ability to load TH dylibs, and see how far we get compiling `lens` (this reminds me of https://www.fpcomplete.com/user/edwardk/editorial/procrustean-mathematics#centipede-mathematics). Then we could try to figure out what it takes to transfer this feature set back to cross targets. Just my 2 cents, Gabor On 9/1/14, Sven Panne svenpa...@gmail.com wrote: 2014-09-01 9:26 GMT+02:00 Simon Marlow marlo...@gmail.com: Hi Sven - you would need to compile the module with -dynamic or -dynamic-too to have it be picked up by the new dynamically-linked GHCi in 7.8. Ah, OK... Adding -dynamic makes this work, but with -dynamic-too, ghci still loads the interpreted version. I didn't follow the linking story in detail, so this is all a bit confusing. I think that at least http://www.haskell.org/ghc/docs/7.8.3/html/users_guide/ghci-compiled.html needs some update, because as it is, it doesn't reflect reality. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
On 2014-07-13 at 05:52:09 +0200, Bryan O'Sullivan wrote: [...] haddock 2.14.3 that ships with it seems to be quite broken. Perhaps it's a bad interaction with cabal, it's hard to say from the outside, but here are some details. Here's the kind of error I get from haddock when I try to use cabal to install a package (primitive, in this case): module ‘primitive-0.5.3.0:Main’ is defined in multiple files: [...] The result is that I have no haddock docs for any packages now :-( I can't reproduce that here with a ghc-7.8.3/haddock-2.14.3 install on Linux. However, this sounds *alot* like a Clang/CPP issue, specifically https://github.com/haskell/cabal/issues/1740#issuecomment-39559026 ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
On 07/13/2014 01:06 PM, Miëtek Bak wrote: haddock 2.14.3 that ships with it seems to be quite broken. Perhaps it's a bad interaction with cabal, it's hard to say from the outside, but here are some details. Here's the kind of error I get from haddock when I try to use cabal to install a package (primitive, in this case): module ‘primitive-0.5.3.0:Main’ is defined in multiple files: I can't reproduce that here with a ghc-7.8.3/haddock-2.14.3 install on Linux. However, this sounds *alot* like a Clang/CPP issue, specifically https://github.com/haskell/cabal/issues/1740#issuecomment-39559026 This is a Clang/CPP issue. A workaround is to pass `—ghc-options=-optP-P` to `cabal haddock`. The corresponding GHC issue was closed 5 weeks ago: https://ghc.haskell.org/trac/ghc/ticket/9174 Right, as pointed out, this has been hacked around in cabal. I was under the impression that the mentioned commit was going into whatever the next cabal version is and that it would be in the cabal distributed with 7.8.3. Is that not the case? -- Mateusz K. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
If this is happening on OS X and your computer is really clang (gcc -version will say clang somewhere) ... then please try this simple fix: Edit the compiler settings file, find the line with Haskell CPP Flags, and add -P to the list of flags. If that works, then the upcoming Haskell Platform release will take care of doing this, no need to hack this into cabal. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
It was exactly the clang cpp issue. Since I didn't know what I was doing, I reinstalled GHC telling it to use cpphs (at Carter's suggestion), and that worked. Thanks! On Jul 13, 2014, at 7:35, Mark Lentczner mark.lentcz...@gmail.com wrote: If this is happening on OS X and your computer is really clang (gcc -version will say clang somewhere) ... then please try this simple fix: Edit the compiler settings file, find the line with Haskell CPP Flags, and add -P to the list of flags. If that works, then the upcoming Haskell Platform release will take care of doing this, no need to hack this into cabal. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
Glad that worked for you... I'd like to be sure that my -P fix as part of the Platform fixes things. Can you point me to a small package that that haddock fails on? Then I can repro with the 7.8.3 bindist, and test the fix. - Mark ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
On Sun, Jul 13, 2014 at 10:08 AM, Mark Lentczner mark.lentcz...@gmail.com wrote: I'd like to be sure that my -P fix as part of the Platform fixes things. Can you point me to a small package that that haddock fails on? Then I can repro with the 7.8.3 bindist, and test the fix. Haddock was failing on just about everything I tried - a suitably quick repro with no dependencies would be primitive. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
On Sun, Jul 13, 2014 at 10:08 AM, Mark Lentczner mark.lentcz...@gmail.com wrote: I'd like to be sure that my -P fix as part of the Platform fixes things. Can you point me to a small package that that haddock fails on? Then I can repro with the 7.8.3 bindist, and test the fix. Using -P seems to work for me - thanks. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: [Haskell] ANNOUNCE: GHC version 7.8.3
On Fri, Jul 11, 2014 at 6:40 AM, Austin Seipp aus...@well-typed.com wrote: The GHC Team is pleased to announce a new patchlevel release of GHC, 7.8.3. haddock 2.14.3 that ships with it seems to be quite broken. Perhaps it's a bad interaction with cabal, it's hard to say from the outside, but here are some details. Here's the kind of error I get from haddock when I try to use cabal to install a package (primitive, in this case): module ‘primitive-0.5.3.0:Main’ is defined in multiple files: dist/build/tmp-92638/Control/Monad/Primitive.hs dist/build/tmp-92638/Data/Primitive/MachDeps.hs dist/build/tmp-92638/Data/Primitive/Types.hs dist/build/tmp-92638/Data/Primitive/Array.hs dist/build/tmp-92638/Data/Primitive/ByteArray.hs dist/build/tmp-92638/Data/Primitive/Internal/Compat.hs The result is that I have no haddock docs for any packages now :-( ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs