Created
February 10, 2018 21:23
-
-
Save fredshonorio/dac4f27a1c0896048121ea4f039f1989 to your computer and use it in GitHub Desktop.
Haskell Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack script --resolver lts-10.1 --install-ghc | |
--package <package dependency 1> | |
--package <package dependency 2> | |
-} | |
main :: IO () | |
main = do | |
putStrLn "Hello" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A Haskell script, downloads everything it needs, requires
stack
.Typecheck:
$ stack ghc hello.hs -- -Wall
REPL:
$ stack ghci hello.hs
Run:
$ ./hello.hs
(must be runnable:chmod +x hello.hs
)