hyper-haskell
hyper-haskell copied to clipboard
Paths on Mac?
I was very impressed by your demo of HyperHaskell at ICFP, Heinrich! I have just tried installing it (Mac 10.14.5, GHC 8.4.3) using cabal. The install went smoothly, but on starting up the front end, the Imports and options -> Status box reports
Interpreter not running (Error: spawn /Users/jg/.cabal/bin/hyper-haskell-server ENOENT)
Indeed, that path won't find my server:
jg$ which hyper-haskell-server /Users/jg/Library/Haskell/bin/hyper-haskell-server jg$ ls ~/.cabal/ config logs where-is-my-stuff.txt config.platform packages
Did I do something wrong?
Thanks! 😊
You did not do something wrong, it's just that there several ways of installing Cabal on macOS, and they seem to use different paths. In the HyperHaskell.app
bundle (it's a folder), can you change this line in the file Contents/Resources/app/src/interpreter.js
to use the path /Library/Haskell/bin/hyper-haskell-server
instead? This is probably the easiest way to fix it for you.
Ideally, I would bundle a separate GHC with HyperHaskell, so that people can start right away. But that's not entirely trivial. #10
Thanks. That fixed that error message. But now the status box says: "Could not load imports: Interpreter not running (Error 0)". I suspect this may be a basic misunderstanding on my part... am I supposed to launch hyper-haskell-server as a daemon somehow? Just running hyper-haskell-server from a Terminal window yields an error ("lookupSymbol failed in relocateSection ... ___gmp_rands")
am I supposed to launch hyper-haskell-server as a daemon somehow?
No, you're not supposed to launch this binary by yourself, the HyperHaskell app is supposed to do that automatically.
However, running in the Terminal should work, and the error message
Just running hyper-haskell-server from a Terminal window yields an error ("lookupSymbol failed in relocateSection ... ___gmp_rands")
indicates that something went wrong, perhaps while compiling or even linking the binary. Since hyper-haskell-server
uses the GHC API (via the hint
package), it is important that the supporting hyper
package is compiled with the exact same GHC version as the binary itself.
(Running the hyper-haskell-server
binary in the terminal should give a result similar to
$ hyper-haskell-server
Setting phasers to stun... (port 8024) (ctrl-c to quit)
Waiting for Haskell expression
)
I installed hyper, hyper-haskell-server, and hyper-extra on the same day, using cabal as per the instructions at https://github.com/HeinrichApfelmus/hyper-haskell. So I'm pretty sure they all used the same GHC version (8.4.3). I didn't notice any compilation or installation errors, and ~/Library/Haskell/logs/build.log shows "install-outcome: InstallOK" for every package.
That is very strange. Can you post the output that you get when running hyper-haskell-server
in the Terminal.
$ hyper-haskell-server Setting phasers to stun... (port 8024) (ctrl-c to quit) hyper-haskell-server: lookupSymbol failed in relocateSection (RELOC_GOT) /Library/Frameworks/GHC.framework/Versions/8.4.3-x86_64/usr/lib/ghc-8.4.3/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o: unknown symbol `___gmp_rands'
Seems to be a known issue: https://gitlab.haskell.org/ghc/ghc/issues/15105
I have hidden the offending file HSinteger-gmp-1.0.2.0.o (by gzipping it). Now hyper-haskell-server and HyperHaskell work! I hope I haven't broken anything else.
Great! Let me know if there is any other issue.