Skip to content

Instantly share code, notes, and snippets.

Created December 22, 2012 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4361571 to your computer and use it in GitHub Desktop.
Save anonymous/4361571 to your computer and use it in GitHub Desktop.
module Bar where
bar = answer * 2
{-# LANGUAGE NoMonomorphismRestriction #-}
import Language.Haskell.Interpreter
foo = runInterpreter (do
reset
loadModules ["Bar", "Prelude"]
setTopLevelModules ["Bar"]
eval "bar")
{-# LANGUAGE PackageImports #-}
module Prelude (String, Show(..), Num(..), answer) where
import "base" Prelude (String, Show(..), Num(..))
answer = 42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment