Skip to content

Instantly share code, notes, and snippets.

@Chetan496
Last active February 16, 2017 17:30
Show Gist options
  • Save Chetan496/881575b55953529459812f6077c94d64 to your computer and use it in GitHub Desktop.
Save Chetan496/881575b55953529459812f6077c94d64 to your computer and use it in GitHub Desktop.
COmmonHaskellHowTos

Enable multiline input in GHCI

use the command :set +m

Starting the yesod-web minimal template

use the command stack runghc Main.hs

running Stack repl in context of Yesod packages

use the command stack repl This will allow you to inspect the functions in the code and run them

building the executable

Use the stack build command

finding which files are hidden

fmap (fmap isHiddenFile ) $ FS.getDirectoryContents "/home/chetan"

getting non-hidden files

fmap (filter $ not. isHiddenFile ) $ FS.getDirectoryContents "/home/chetan"

enabling Overloaded Strings in GHCI - Haskell REPL

Use this command :set -XOverloadedStrings

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