
11 Sep
2007
11 Sep
'07
6:14 a.m.
sven.panne:
On Monday 10 September 2007 19:50, Thomas Schilling wrote:
[...] instance Binary MP3 where get = MP3 <$> getHeader <*> getData -- [*] where getHeader = do magic <- getWord32le case magic of ...
Of course this works in the sense that "it compiles", but Binary is conceptually the wrong class to use.
I wouldn't go as far as saying `wrong', for protocol-specific data types it seems reasonable for the Haskell serialisation to use an agreed-upon external format, via a Binary instance. It's cute, anyway. -- Don