To build the whole package, issue the following command:
$ cabal build
To build only one project component:
$ cabal build hello
To run a component:
$ cabal run hello
Up to date
Hello, world
$ cabal -v0 run hello
Hello, world
$ cabal run stockquotes -- data/quotes.csv -c
...
$ file chart.svg
chart.svg: SVG Scalable Vector Graphics image
To explore a component in REPL:
$ cabal repl hello
...
$ cabal repl stockquotes
ghci> :m StatReport
ghci> :type mean
mean :: (Fractional a, Foldable t) => t a -> a
请发表评论