Created
December 22, 2012 22:35
-
-
Save anonymous/4361571 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Bar where | |
bar = answer * 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE NoMonomorphismRestriction #-} | |
import Language.Haskell.Interpreter | |
foo = runInterpreter (do | |
reset | |
loadModules ["Bar", "Prelude"] | |
setTopLevelModules ["Bar"] | |
eval "bar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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