Import hs-plugins cvs
This commit is contained in:
15
examples/eval/eval_fn1/Main.hs
Normal file
15
examples/eval/eval_fn1/Main.hs
Normal file
@ -0,0 +1,15 @@
|
||||
{-# OPTIONS -fglasgow-exts #-}
|
||||
--
|
||||
-- polymorphic eval!
|
||||
--
|
||||
|
||||
module Main where
|
||||
|
||||
import Poly
|
||||
import Eval.Haskell
|
||||
|
||||
main = do m_f <- eval "Fn (\\x y -> x == y)" ["Poly"]
|
||||
when (isJust m_f) $ do
|
||||
let (Fn f) = fromJust m_f
|
||||
putStrLn $ show (f True True)
|
||||
putStrLn $ show (f 1 2)
|
Reference in New Issue
Block a user