@@ -133,13 +133,10 @@ instance Binary Canonical where
134instance Binary Value where
134instance Binary Value where
135 put portable =
135 put portable =
136− let put' n info = putWord8 n >> put info in
137 case portable of
136 case portable of
138− Value name -> put' 0 name
137+ Value name -> putWord8 0 >> put name
139− Alias name -> put' 1 name
138+ Alias name -> putWord8 1 >> put name
140− ADT name ctors ->
139+ ADT name ctors -> putWord8 2 >> put name >> put ctors
144 get = do tag <- getWord8
141 get = do tag <- getWord8
145 case tag of
142 case tag of
@@ -150,7 +147,6 @@ instance Binary Value where
151instance (Binary a) => Binary (Listing a) where
148instance (Binary a) => Binary (Listing a) where
152 put (Listing explicits open) =
149 put (Listing explicits open) =
153− do put explicits
150+ put explicits >> put open
156 get = Listing <$> get <*> get
152 get = Listing <$> get <*> get