Commit 63ecc797 authored by Adam Vogt's avatar Adam Vogt

move IHaskell stuff to src/

parent 09f23ace
:set -package ghc
:set -package ghc-paths
:set -optP-include -optPdist/build/autogen/cabal_macros.h
:set -i. -isrc -idist/build/autogen
:set -XDoAndIfThenElse -XNoImplicitPrelude -XOverloadedStrings
......@@ -46,6 +46,7 @@ data-files:
profile/profile.tar
library
hs-source-dirs: src
build-depends: base ==4.6.*,
hlint,
cmdargs >= 0.10,
......@@ -81,6 +82,7 @@ library
executable IHaskell
-- .hs or .lhs file containing the Main module.
hs-source-dirs: src
main-is: Main.hs
build-tools: happy, cpphs
......
......@@ -69,8 +69,7 @@ Compilation Tools
---
Install the `happy` parser generator tool and `cpphs` preprocessor:
```bash
cabal install happy
cabal install cpphs
cabal install happy cpphs
```
IHaskell Installation
......@@ -148,10 +147,17 @@ The will hide all packages not listed in the
**Using GHCi directly**
If you don't want to use cabal repl, you can just call ghci with the appropriate options. You can find these in the IHaskell.cabal file.
If you don't want to use `cabal repl`, you can just call ghci which can read the `.ghci` file included in the repository for the options.
```bash
ghci -XDoAndIfThenElse -XNoImplicitPrelude -XOverloadedStrings -package ghc -optP-include -optPdist/build/autogen/cabal_macros.h
cd <path-to-IHaskell>
chmod 600 .ghci # trust the .ghci file
ghci
```
Then in the ghci session you can type things like:
If you just call ghci, it will use the options present in the .ghci file that comes with the IHaskell repo.
```
:load src/Hspec.hs
hspec parserTests
:browse IHaskell.Types
```
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE DoAndIfThenElse, NoOverloadedStrings #-}
{- | Description : Wrapper around GHC API, exposing a single `evaluate` interface that runs
a statement, declaration, import, or directive.
......
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