Tutorial by Examples

Parsing input is best achieved through larger parser functions that are composed of smaller, single purpose ones. Let's say we wished to parse the following text which represents working hours: Monday: 0800 1600. We could split these into two "tokens": the day name -- "Monday&q...
Attoparsec makes parsing binary data trivial. Assuming these definitions: import Data.Attoparsec.ByteString (Parser, eitherResult, parse, take) import Data.Binary.Get (getWord32le, runGet) import Data.ByteString (ByteString, readFile) import ...

Page 1 of 1