@hackage hid-examples0.3

Examples to accompany the book "Haskell in Depth"

This is the sample code to accompany the book Haskell in Depth (Vitaly Bragilevsky, Manning Publications 2019).

To get the source code on your system, you may want to run:

cabal get hid-examples

Alternatively, you may clone GitHub repository with the most current version.

To work with the code on your system, you need either:

Using Stack

Building

stack build

Running

stack exec <executable> [ -- <arguments>]

For example:

stack exec stockquotes -- data/quotes.csv -p -v

Exploring in GHCi

stack ghci <module file>

For example:

stack ghci stockquotes/Statistics.hs

Using Cabal sandbox

Building

cabal sandbox init
cabal install --only-dependencies
cabal configure
cabal build

Running

cabal run <executable> [ -- <arguments>]

For example:

cabal run stockquotes -- data/quotes.csv -p -v

Exploring in GHCi

cabal repl <executable>

For example:

cabal repl stockquotes

To work with particular module, you have to load it in GHCi with :load.

Using Cabal new-*

Building

cabal new-build