Fix list encoding
This commit is contained in:
parent
61a2808d71
commit
2d46e5039e
@ -105,7 +105,7 @@ instance Encode a => Encode [a] where
|
|||||||
_ -> fail "Unexpected end of stream"
|
_ -> fail "Unexpected end of stream"
|
||||||
sencode [] = [T0]
|
sencode [] = [T0]
|
||||||
sencode [x] = T1:sencode x
|
sencode [x] = T1:sencode x
|
||||||
sencode xs = (sencode $ length xs - 2) ++ concat (map sencode xs)
|
sencode xs = T2:T2:(sencode $ length xs - 2) ++ concat (map sencode xs)
|
||||||
|
|
||||||
instance Encode Int where
|
instance Encode Int where
|
||||||
sdecode = do
|
sdecode = do
|
||||||
|
Loading…
Reference in New Issue
Block a user