[Haskell-cafe] Attoparsec: Limiting Parsers to N Bytes, or Combing Parsers?
Twan van Laarhoven
twanvl at gmail.com
Mon Sep 26 17:40:26 CEST 2011
On 24/09/11 05:21, Evan Laforge wrote:
> hex2 = (+)<$> ((*16)<$> higit)<*> higit
> higit = subtract (fromEnum '0')<$> satisfy isHexDigit
> color = Color<$> hex2<*> hex2<*> hex2
How is "subtract (fromEnum '0')" supposed to convert a hex digit to an
Int or Word8? I think you need digitToInt (or an equivalent function)
for that.
Twan
More information about the Haskell-Cafe
mailing list