Commit 51eb9ced authored by Leif-Erik Krüger's avatar Leif-Erik Krüger Committed by Leif-Erik Krüger
Browse files

Fix `Binary` instance for `NewtypeDecl`

- `put clss` is now executed only once rather than twice
- Additionally, the variable `cls` has been renamed to `clss` to reflect the fact that multiple classes can be derived


(cherry picked from commit c507ca0a)
parent 5b486146
......@@ -1185,12 +1185,12 @@ instance Binary Import where
instance Binary a => Binary (Decl a) where
put (InfixDecl spi i pr is) =
putWord8 0 >> put spi >> put i >> put pr >> put is
put (DataDecl spi idt vs cns cls) =
putWord8 1 >> put spi >> put idt >> put vs >> put cns >> put cls
put (DataDecl spi idt vs cns clss) =
putWord8 1 >> put spi >> put idt >> put vs >> put cns >> put clss
put (ExternalDataDecl spi idt vs) =
putWord8 2 >> put spi >> put idt >> put vs
put (NewtypeDecl spi idt vs cn cls) =
putWord8 3 >> put spi >> put idt >> put vs >> put cn >> put cls >> put cls
put (NewtypeDecl spi idt vs cn clss) =
putWord8 3 >> put spi >> put idt >> put vs >> put cn >> put clss
put (TypeDecl spi idt vs ty) =
putWord8 4 >> put spi >> put idt >> put vs >> put ty
put (TypeSig spi fs ty) =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment