1
0
forked from GitHub/gf-core

no need to keep the list of constructors per category in .gfo

This commit is contained in:
krasimir
2010-02-16 09:34:02 +00:00
parent 61287f3925
commit 19b17dceb6
11 changed files with 25 additions and 29 deletions

View File

@@ -87,7 +87,7 @@ instance Binary Options where
Bad msg -> fail msg
instance Binary Info where
put (AbsCat x y) = putWord8 0 >> put (x,y)
put (AbsCat x) = putWord8 0 >> put x
put (AbsFun x y z) = putWord8 1 >> put (x,y,z)
put (ResParam x y) = putWord8 2 >> put (x,y)
put (ResValue x) = putWord8 3 >> put x
@@ -98,7 +98,7 @@ instance Binary Info where
put (AnyInd x y) = putWord8 8 >> put (x,y)
get = do tag <- getWord8
case tag of
0 -> get >>= \(x,y) -> return (AbsCat x y)
0 -> get >>= \x -> return (AbsCat x)
1 -> get >>= \(x,y,z) -> return (AbsFun x y z)
2 -> get >>= \(x,y) -> return (ResParam x y)
3 -> get >>= \x -> return (ResValue x)