[<<][meta][>>][..]
Fri Oct 14 13:08:59 EDT 2011
Remove existential type
The Env doesn't need static types I think... Can the existential be
removed by using typeOf earlier?
data Bind = forall term. Show term => Bind TypeName VarName term
instance (Show Bind) where
show (Bind typ var term) = (typed typ var) ++ " <- " ++ (show term) ++ "\n"
newtype Env = Env [Bind]
instance (Show Env) where
show (Env e) = concat $ map show (reverse e)
This probably means adding an indirection for the phantom type.
I.e. the type below can't represent casts..
data Term t = Var TypeName VarName
| Lit TypeName LitRep
| Op TypeName OpName [Term t]
| Res [Term t]
deriving (Eq)
Got it. Replaced by:
data STerm = Var TypeName VarName
| Lit TypeName LitRep
| Op TypeName OpName [STerm]
| Res STerm
deriving (Eq)
data Term t = Term STerm
[Reply][About]
[<<][meta][>>][..]