Import hs-plugins cvs

This commit is contained in:
Don Stewart
2005-04-24 08:51:33 +00:00
commit 887fa59389
494 changed files with 23721 additions and 0 deletions

View 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)

View File

@ -0,0 +1,2 @@
TOP=../../..
include ../../eval.mk

View File

@ -0,0 +1,16 @@
{-# OPTIONS -cpp -fglasgow-exts #-}
module Poly where
import AltData.Typeable
data Fn = Fn {fn :: forall t. Eq t => t -> t -> Bool}
--
-- ignore type inside the Fn... is this correct?
--
instance Typeable Fn where
#if __GLASGOW_HASKELL__ >= 603
typeOf _ = mkTyConApp (mkTyCon "Poly.Fn") []
#else
typeOf _ = mkAppTy (mkTyCon "Poly.Fn") []
#endif

View File

@ -0,0 +1,2 @@
True
False