From 115b4213d515ce308568fd71e362f6ce2881fb50 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 12 Nov 2010 19:37:19 +0000 Subject: operations in the abstract syntax --- src/compiler/GF/Grammar/Binary.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/compiler/GF/Grammar/Binary.hs') diff --git a/src/compiler/GF/Grammar/Binary.hs b/src/compiler/GF/Grammar/Binary.hs index 70282d128..0cee6f2c6 100644 --- a/src/compiler/GF/Grammar/Binary.hs +++ b/src/compiler/GF/Grammar/Binary.hs @@ -88,7 +88,7 @@ instance Binary Options where instance Binary Info where put (AbsCat x) = putWord8 0 >> put x - put (AbsFun x y z) = putWord8 1 >> put (x,y,z) + put (AbsFun w x y z) = putWord8 1 >> put (w,x,y,z) put (ResParam x y) = putWord8 2 >> put (x,y) put (ResValue x) = putWord8 3 >> put x put (ResOper x y) = putWord8 4 >> put (x,y) @@ -98,15 +98,15 @@ instance Binary Info where put (AnyInd x y) = putWord8 8 >> put (x,y) get = do tag <- getWord8 case tag of - 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) - 4 -> get >>= \(x,y) -> return (ResOper x y) - 5 -> get >>= \(x,y) -> return (ResOverload x y) - 6 -> get >>= \(x,y,z) -> return (CncCat x y z) - 7 -> get >>= \(x,y,z) -> return (CncFun x y z) - 8 -> get >>= \(x,y) -> return (AnyInd x y) + 0 -> get >>= \x -> return (AbsCat x) + 1 -> get >>= \(w,x,y,z) -> return (AbsFun w x y z) + 2 -> get >>= \(x,y) -> return (ResParam x y) + 3 -> get >>= \x -> return (ResValue x) + 4 -> get >>= \(x,y) -> return (ResOper x y) + 5 -> get >>= \(x,y) -> return (ResOverload x y) + 6 -> get >>= \(x,y,z) -> return (CncCat x y z) + 7 -> get >>= \(x,y,z) -> return (CncFun x y z) + 8 -> get >>= \(x,y) -> return (AnyInd x y) _ -> decodingError instance Binary a => Binary (L a) where -- cgit v1.2.3