ghclive
ghclive copied to clipboard
ghclive complains about not finding 'Text.Blaze.Internal'
When I fire up ghclive in my browser and type anything, like '1+1' in the expression buffer I get the following response:
Could not find module `Text.Blaze.Internal' Use -v to see a list of the files searched for. hint> 1+1 Not in scope: type constructor or class `DisplayResult' Not in scope: `displaying' Not in scope: `+' Perhaps you meant `P.+' (imported from Prelude)
When you go to localhost:3000/loader what do you see?
This is usually a sign that the contents of the edit buffer failed to compile
@shapr I wonder if when we fail to reload Main if we should somehow rollback to the old state to avoid breaking the REPL
I get a very similar error message:
Could not find module `Network.Web.GHCLive.Display'
Use -v to see a list of the files searched for.
hint> ()
Not in scope: type constructor or class `DisplayResult'
Not in scope: `displaying'
hint>
localhost:3000/loader says:
"Could not find module `Network.Web.GHCLive.Display'\nUse -v to see a list of the files searched for.\n"
I installed ghclive with cabal-dev, so most of the dependencies are in a non-standard location. It would be nice to be able to use ghclive with cabal-dev, as I couldn't install ghclive with cabal normally due to cabal dependency problems.
From localhost:3000/loader, even before I've entered anything into the edit page:
"Could not find module `Text.Blaze.Internal'\nUse -v to see a list of the files searched for.\n"
Just like soenkehahn I've built ghclive with cabal-dev.
The problem is that the cabal-dev
installed packages are in a different package db, and hint
looks in the default package db. Unfortunately, hint
doesn't appear to have an option to change this directly, but it does have Language.Haskell.Interpreter.Unsafe.unsafeRunInterpreterWithArgs
. An quick fix would be to pass all command line arguments to this, you'd start ghclive with something like:
ghclive -package-conf ./cabal-dev/packages-7.4.2.conf
perhaps it would also be a good idea to split the ghclive
package into two separate packages, ghclive
with all the Yesod and hint dependencies (which can be safely installed with cabal-dev), and ghclive-lib
with only those required for the Display
class and the provided instances (which should then be installed with cabal).
oh something i haven't tried, but which might work already:
export GHC_PACKAGE_PATH=$HOME/ghclive/cabal-dev/packages-7.4.2.conf
Using the -package-conf
parameter doesn't help with my problem.
When I tried exporting the environment variable something strange happened. I got the edit page just fine but when I opened the loader page, ghclive didn't respond. I could kill it with ^C either, it froze up pretty hard.