Commit 5fde8556 authored by Adam Vogt's avatar Adam Vogt

Add .ghci to repo and suggest the more reliable `cabal repl`

parent 4d6ebdd0
:set -package ghc
:set -package ghc-paths
:set -optP-include -optPdist/build/autogen/cabal_macros.h
:set -XOverloadedStrings
...@@ -100,18 +100,8 @@ cabal build ...@@ -100,18 +100,8 @@ cabal build
``` ```
Loading IHaskell into GHCi for testing: Loading IHaskell into GHCi for testing:
If you want to play around with IHaskell by loading it into GHCi, you need to include the ghc package and the cabal macros file. cabal_macros.h is generated by the ```cabal build``` command and the file is placed in the build directory. You will also need to use the OverloadedStrings language extension. So if you are at the top level of the IHaskell project, you can load GHCi as follows: If you are at the top level of the IHaskell project, you can load GHCi with
```bash `cabal repl` or `ghci`. The first option hides all packages not listed in the
ghci -XOverloadedStrings -package ghc -optP-include -optPdist/build/autogen/cabal_macros.h `IHaskell.cabal`, while the second option only sets a couple options given in
``` the `.ghci` file in the repo. Once in ghci, it can then be useful to `:load
*IHaskell/Config` or similar.
or you can create a .ghci file in the top level directory, like so:
```bash
# In the IHaskell .ghci file
:set -package ghc
:set -package ghc-paths
:set -optP-include -optPdist/build/autogen/cabal_macros.h
:set -XOverloadedStrings
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment