mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
fix the grammar serialization for nonExist and BIND
This commit is contained in:
@@ -148,8 +148,8 @@ instance Binary Symbol where
|
|||||||
put (SymVar n l) = putWord8 2 >> put (n,l)
|
put (SymVar n l) = putWord8 2 >> put (n,l)
|
||||||
put (SymKS ts) = putWord8 3 >> put ts
|
put (SymKS ts) = putWord8 3 >> put ts
|
||||||
put (SymKP d vs) = putWord8 4 >> put (d,vs)
|
put (SymKP d vs) = putWord8 4 >> put (d,vs)
|
||||||
put SymNE = putWord8 5
|
put SymBIND = putWord8 5
|
||||||
put SymBIND = putWord8 6
|
put SymNE = putWord8 6
|
||||||
get = do tag <- getWord8
|
get = do tag <- getWord8
|
||||||
case tag of
|
case tag of
|
||||||
0 -> liftM2 SymCat get get
|
0 -> liftM2 SymCat get get
|
||||||
@@ -157,8 +157,8 @@ instance Binary Symbol where
|
|||||||
2 -> liftM2 SymVar get get
|
2 -> liftM2 SymVar get get
|
||||||
3 -> liftM SymKS get
|
3 -> liftM SymKS get
|
||||||
4 -> liftM2 (\d vs -> SymKP d vs) get get
|
4 -> liftM2 (\d vs -> SymKP d vs) get get
|
||||||
5 -> return SymNE
|
5 -> return SymBIND
|
||||||
6 -> return SymBIND
|
6 -> return SymNE
|
||||||
_ -> decodingError
|
_ -> decodingError
|
||||||
|
|
||||||
instance Binary PArg where
|
instance Binary PArg where
|
||||||
|
|||||||
Reference in New Issue
Block a user