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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to