Re: [Haskell] ANNOUNCE: GHC version 7.8.3

On Fri, Jul 11, 2014 at 6:40 AM, Austin Seipp
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 :-(

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

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 -- Miëtek

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.

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.

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
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.

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

On Sun, Jul 13, 2014 at 10:08 AM, Mark Lentczner
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.

I'm just surprised that this wasn't caught before.... Would have been easy
to fix.
On Sunday, July 13, 2014, Bryan O'Sullivan
On Sun, Jul 13, 2014 at 10:08 AM, Mark Lentczner
javascript:_e(%7B%7D,'cvml','mark.lentczner@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.

I'm pretty sure I tested on clang only though
On Sunday, July 13, 2014, Carter Schonwald
I'm just surprised that this wasn't caught before.... Would have been easy to fix.
On Sunday, July 13, 2014, Bryan O'Sullivan
javascript:_e(%7B%7D,'cvml','bos@serpentine.com');> wrote: On Sun, Jul 13, 2014 at 10:08 AM, Mark Lentczner < mark.lentczner@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.

Bryan: what version of cabal-install do you have? I suspect it might be
because you have an older version of cabal install?
On Sunday, July 13, 2014, Carter Schonwald
I'm pretty sure I tested on clang only though
On Sunday, July 13, 2014, Carter Schonwald
javascript:_e(%7B%7D,'cvml','carter.schonwald@gmail.com');> wrote: I'm just surprised that this wasn't caught before.... Would have been easy to fix.
On Sunday, July 13, 2014, Bryan O'Sullivan
wrote: On Sun, Jul 13, 2014 at 10:08 AM, Mark Lentczner < mark.lentczner@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.

On Sun, Jul 13, 2014 at 10:51 AM, Carter Schonwald < carter.schonwald@gmail.com> wrote:
Bryan: what version of cabal-install do you have? I suspect it might be because you have an older version of cabal install?
I have the very latest version. I'll have to retry with clang's cpp, though, as cpphs prints annoying warnings during every compile :-(

On Sun, Jul 13, 2014 at 10:08 AM, Mark Lentczner
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.

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 "stat"s 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 read(11, "module B where\nimport D\n", 8096) = 24 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) = 24 12124 close(11) = 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 read(11, "module B where\nimport D\n", 8096) = 24 12124 close(11) = 0 12124 stat("./B.o", 0x7f28b26fa780) = -1 ENOENT (No such file or directory) 12124 stat("Prelude.hs", 0x7f28b26fa900) = -1 ENOENT (No such file or directory) 12124 stat("Prelude.lhs", 0x7f28b26faaa0) = -1 ENOENT (No such file or directory) 12124 mkdir("/tmp/ghc12124_0", 0777) = 0 12124 stat("/tmp/ghc12124_0/ghc12124_1.o", 0x7f28b26facf0) = -1 ENOENT (No such file or directory) 12124 open("./D.hi", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 11 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=500, ...}) = 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=500, ...}) = 0 12124 read(11, "\1\372\316d\0\0\0\0\0\0\0\0\4\0"..., 8096) = 500 12124 close(11) = 0 12124 select(2, [], [1], NULL, {0, 0}) = 1 (out [1], left {0, 0}) 12124 write(1, "[1 of 4] Compiling D ( D.hs, interpreted )\n", 58) = 58 [...] ------------------------------------------------------------------------------------------------- This looks wrong to me. Did I miss something and/or did something stupid? Known bug?

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 "stat"s 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 read(11, "module B where\nimport D\n", 8096) = 24 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) = 24 12124 close(11) = 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 read(11, "module B where\nimport D\n", 8096) = 24 12124 close(11) = 0 12124 stat("./B.o", 0x7f28b26fa780) = -1 ENOENT (No such file or directory) 12124 stat("Prelude.hs", 0x7f28b26fa900) = -1 ENOENT (No such file or directory) 12124 stat("Prelude.lhs", 0x7f28b26faaa0) = -1 ENOENT (No such file or directory) 12124 mkdir("/tmp/ghc12124_0", 0777) = 0 12124 stat("/tmp/ghc12124_0/ghc12124_1.o", 0x7f28b26facf0) = -1 ENOENT (No such file or directory) 12124 open("./D.hi", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 11 12124 fstat(11, {st_mode=S_IFREG|0640, st_size=500, ...}) = 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=500, ...}) = 0 12124 read(11, "\1\372\316d\0\0\0\0\0\0\0\0\4\0"..., 8096) = 500 12124 close(11) = 0 12124 select(2, [], [1], NULL, {0, 0}) = 1 (out [1], left {0, 0}) 12124 write(1, "[1 of 4] Compiling D ( D.hs, interpreted )\n", 58) = 58 [...] -------------------------------------------------------------------------------------------------
This looks wrong to me. Did I miss something and/or did something stupid? Known bug? _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

2014-09-01 9:26 GMT+02:00 Simon Marlow
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.

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#ce...).
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
2014-09-01 9:26 GMT+02:00 Simon Marlow
: 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

On 01/09/2014 12:30, Sven Panne wrote:
2014-09-01 9:26 GMT+02:00 Simon Marlow
: 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
participants (9)
-
Bryan O'Sullivan
-
Carter Schonwald
-
Gabor Greif
-
Herbert Valerio Riedel
-
Mark Lentczner
-
Mateusz Kowalczyk
-
Miëtek Bak
-
Simon Marlow
-
Sven Panne