Update examples
This commit is contained in:
16
testsuite/eval/unsafeidir/Main.hs
Normal file
16
testsuite/eval/unsafeidir/Main.hs
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
import System.Plugins.Make
|
||||
import System.Eval.Haskell
|
||||
|
||||
main = do make "a/Extra.hs" []
|
||||
|
||||
i <- unsafeEval_ "show (Just (1 + 6 :: Int)) ++ extra"
|
||||
["Data.Maybe", "Extra"]
|
||||
["-ia"] -- no make flags
|
||||
[] -- no package.confs
|
||||
["a"] -- include paths to load from
|
||||
:: IO (Either [String] String)
|
||||
|
||||
case i of
|
||||
Right i -> putStrLn $ show i
|
||||
Left es -> mapM_ putStrLn es
|
2
testsuite/eval/unsafeidir/Makefile
Normal file
2
testsuite/eval/unsafeidir/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
TOP=../../..
|
||||
include ../../eval.mk
|
3
testsuite/eval/unsafeidir/a/Extra.hs
Normal file
3
testsuite/eval/unsafeidir/a/Extra.hs
Normal file
@ -0,0 +1,3 @@
|
||||
module Extra where
|
||||
|
||||
extra = "an extra value"
|
1
testsuite/eval/unsafeidir/expected
Normal file
1
testsuite/eval/unsafeidir/expected
Normal file
@ -0,0 +1 @@
|
||||
"Just 7an extra value"
|
Reference in New Issue
Block a user