Hi,Say I have code already like:
data STH = A
| B
| C
instance Serialize STH where
put A = putWord8 1
put B = putWord8 66
put C = putWord8 111
Then what is the better way to do `get`? Is following the only one?
get = do
i <- getWord8
case i of
1 -> return A
66 -> return B
111 -> return C
Thanks.