Skip to content

Instantly share code, notes, and snippets.

@sdiehl
Created February 12, 2017 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdiehl/52ce69b09d5744324bb30bbe826e801b to your computer and use it in GitHub Desktop.
Save sdiehl/52ce69b09d5744324bb30bbe826e801b to your computer and use it in GitHub Desktop.
rivendell% stack ghci not sandboxed
Configuring GHCi with the following packages:
GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/sdiehl/.ghci
Loaded GHCi configuration from /tmp/ghci18272/ghci-script
λ> class Foo a where { foo :: a -> Int }
λ> instance Foo () where { foo _ = 3 }
λ> bar = foo ()
λ> bar
3
λ> instance Foo () where { foo _ = 4 }
λ> bar
3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment