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
|
Reference in New Issue
Block a user