instance CasType Bool where encodeCas i = runPut $ putWord8 (if i then 1 else 0) decodeCas i = 1 == runGet getWord8 i perhaps there's a better way, I'm not sure.
instance CasType Bool where
encodeCas i = runPut $ putWord8 (if i then 1 else 0)
decodeCas i = 1 == runGet getWord8 i
perhaps there's a better way, I'm not sure.