Commit dfc78d6c authored by Andrew Gibiansky's avatar Andrew Gibiansky

Merge pull request #26 from edechter/master

Add info about using GHCi with this package
parents 11890d29 491fe2e2
......@@ -88,3 +88,31 @@ Module Quickstart:
- `IHaskell.Message.UUID`: UUID generator and data structure.
- `IHaskell.Message.Writer`: `ToJSON` for Messages.
- `IHaskell.ZeroMQ`: Low-level ZeroMQ communication wrapper. `serveProfile` starts listening on all necessary sockets, and returns a `ZeroMQInterface` record. This record exposes reading and writing `Chan Message` messages for all the necessary sockets, so then the rest of the application can simply use that interface.
First steps:
- Fork and clone the repository.
- Build IHaskell.
˝
```bash
cd <path-to-IHaskell>
cabal configure
cabal build
```
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:
```bash
ghci -XOverloadedStrings -package ghc -optP-include -optPdist/build/autogen/cabal_macros.h
```
or you can create a .ghci file in the top level directory, like so:
```bash
# 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