-- 
-- (c) Susumu Katayama 2009
--
-- -profするときに-auto-allするとPAPにenterしてしまう部分をわけてみた．最初MyDynamicに入れようと思ったのだが，cyclicになったので．

module MagicHaskeller.ReadDynamic where
-- import ReadType
import MagicHaskeller.MyDynamic
import Language.Haskell.TH
dynS = $(dynamic [|undefined|] [| s :: (b->c->a) -> (b->c) -> b -> a |])
dynK = $(dynamic [|undefined|] [| const :: a->b->a |])
dynI = $(dynamic [|undefined|] [| id :: a->a |])
dynB = $(dynamic [|undefined|] [| (.) :: (c->a) -> (b->c) -> b -> a |])
dynC = $(dynamic [|undefined|] [| flip :: (b->c->a) -> c -> b -> a |])
dynS' = $(dynamic [|undefined|] [| sprime :: (a->b->c)->(d->a)->(d->b)->d->c |])
dynB' = $(dynamic [|undefined|] [| bprime :: (a->b->c)->a->(d->b)->d->c |])
dynC' = $(dynamic [|undefined|] [| cprime :: (a->b->c)->(d->a)->b->d->c |])
-- readType assumes the tcl is undefined, so it cannot be used when type constructors other than -> are used.
s = \f g x -> f x (g x)
sprime = (\f g h x -> f (g x) (h x))
bprime = (\f g h x -> f  g    (h x))
cprime = (\f g h x -> f (g x)  h)
