Skip to content

Instantly share code, notes, and snippets.

@mgsloan
Forked from anonymous/Bar.hs
Last active December 10, 2015 01:48
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 mgsloan/4361578 to your computer and use it in GitHub Desktop.
Save mgsloan/4361578 to your computer and use it in GitHub Desktop.
module Bar where
bar = answer * 20
import Language.Haskell.Interpreter
foo :: IO (Either InterpreterError String)
foo = runInterpreter $ do
reset
loadModules ["Bar", "Prelude"]
setTopLevelModules ["Bar"]
eval "bar"
{-# LANGUAGE PackageImports #-}
module Prelude (module P, answer) where
import "base" Prelude as P
answer = 42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment