1
0
forked from GitHub/gf-core

PGF.Type.Hypo now can represent explicit and implicit arguments and argument without bound variable

This commit is contained in:
krasimir
2009-07-05 15:44:52 +00:00
parent 3394c171ed
commit 279ff9a6d2
8 changed files with 56 additions and 40 deletions

View File

@@ -146,8 +146,14 @@ instance Binary Type where
get = liftM3 DTyp get get get
instance Binary Hypo where
put (Hyp v t) = put (v,t)
get = liftM2 Hyp get get
put (Hyp t) = putWord8 0 >> put t
put (HypV v t) = putWord8 1 >> put (v,t)
put (HypI v t) = putWord8 2 >> put (v,t)
get = do tag <- getWord8
case tag of
0 -> liftM Hyp get
1 -> liftM2 HypV get get
2 -> liftM2 HypI get get
instance Binary FFun where
put (FFun fun prof lins) = put (fun,prof,lins)