2005-04-24 08:51:33 +00:00
|
|
|
--
|
|
|
|
-- lambda abstraction!
|
|
|
|
--
|
|
|
|
--
|
|
|
|
-- needs unsafeEval because eval has a broken Dynamic check
|
|
|
|
--
|
2005-05-15 06:03:55 +00:00
|
|
|
import System.Eval.Haskell
|
2005-04-24 08:51:33 +00:00
|
|
|
|
2005-04-24 10:06:44 +00:00
|
|
|
main = do fn <- unsafeEval "(\\x -> (x,x::Int))" [] :: IO (Maybe (Int -> (Int,Int)))
|
2005-04-24 08:51:33 +00:00
|
|
|
when (isJust fn) $ putStrLn $ show $ (fromJust fn) 7
|