Skip to content

Instantly share code, notes, and snippets.

@fredshonorio
Created February 10, 2018 21:23
Show Gist options
  • Save fredshonorio/dac4f27a1c0896048121ea4f039f1989 to your computer and use it in GitHub Desktop.
Save fredshonorio/dac4f27a1c0896048121ea4f039f1989 to your computer and use it in GitHub Desktop.
Haskell Script
#!/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"
@fredshonorio
Copy link
Author

fredshonorio commented Feb 10, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment