Small personal project to document Haskell & Stack usage.
On Ubuntu:
sudo apt install haskell-stack
On openSUSE:
sudo zypper install stack
First cd
into the project directory, than run:
stack setup
stack build
stack install intero
stack install QuickCheck
Install VSCode
and the vscode Haskero
extension. Done.
To open the Haskell-REPL:
stack ghci
To run tests:
stack test
To build the binary:
stack install --local-bin-path [dir]
Hoogle is a Haskell API search engine, which makes developing Haskell much more enjoyable. Beside searching for a function name, it is possible to search for a function signature, e.g.:
[Maybe a] -> Maybe [a]
Returns among other things: sequence :: Monad m => [m a] -> m [a]
Command | Function |
---|---|
:r |
reload |
:i something |
print info about something |
:m +Control.Applicative |
load the Control.Applicative library |
:t variable |
show type of variable |
Title | Type |
---|---|
Effectful Haskell: Reader, Transformers, Typeclasses | Text |
Wrangling Monad Transformer Stacks | Video |
Behavior-driven development (BDD) in Haskell with Hspec | Text |