Update examples
This commit is contained in:
10
testsuite/eval/eval_fn/Main.hs
Normal file
10
testsuite/eval/eval_fn/Main.hs
Normal file
@ -0,0 +1,10 @@
|
||||
--
|
||||
-- lambda abstraction!
|
||||
--
|
||||
--
|
||||
-- needs unsafeEval because eval has a broken Dynamic check
|
||||
--
|
||||
import System.Eval.Haskell
|
||||
|
||||
main = do fn <- unsafeEval "(\\x -> (x,x::Int))" [] :: IO (Maybe (Int -> (Int,Int)))
|
||||
when (isJust fn) $ putStrLn $ show $ (fromJust fn) 7
|
2
testsuite/eval/eval_fn/Makefile
Normal file
2
testsuite/eval/eval_fn/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
TOP=../../..
|
||||
include ../../eval.mk
|
1
testsuite/eval/eval_fn/expected
Normal file
1
testsuite/eval/eval_fn/expected
Normal file
@ -0,0 +1 @@
|
||||
(7,7)
|
Reference in New Issue
Block a user