From 279ff9a6d28c87e1a6c105d9d33df2511fb8f132 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 5 Jul 2009 15:44:52 +0000 Subject: PGF.Type.Hypo now can represent explicit and implicit arguments and argument without bound variable --- src/PGF/Binary.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/PGF/Binary.hs') diff --git a/src/PGF/Binary.hs b/src/PGF/Binary.hs index b99296db5..bd896817f 100644 --- a/src/PGF/Binary.hs +++ b/src/PGF/Binary.hs @@ -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) -- cgit v1.2.3