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