day4/haskell: fix typo
This commit is contained in:
parent
49192977f4
commit
771072c130
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@ fieldSpecs = [ ("byr", BirthYear <$> parseYearIn 1920 2002)
|
||||||
Centimeter -> guard $ within 150 193 h
|
Centimeter -> guard $ within 150 193 h
|
||||||
return $ Height h u)
|
return $ Height h u)
|
||||||
, ("hcl", char '#' >> HairColour <$> count 6 parseHexDigit)
|
, ("hcl", char '#' >> HairColour <$> count 6 parseHexDigit)
|
||||||
, ("ecl", EyeColour <$> parseCoulourSpec)
|
, ("ecl", EyeColour <$> parseColourSpec)
|
||||||
, ("pid", PassportID <$> count 9 (satisfy $ const True))
|
, ("pid", PassportID <$> count 9 (satisfy $ const True))
|
||||||
, ("cid", CountryID <$> munch1 (/= ' '))
|
, ("cid", CountryID <$> munch1 (/= ' '))
|
||||||
]
|
]
|
||||||
|
@ -56,8 +56,8 @@ parseHeightUnit = choice [ string "cm" >> return Centimeter
|
||||||
, string "in" >> return Inch
|
, string "in" >> return Inch
|
||||||
]
|
]
|
||||||
|
|
||||||
parseCoulourSpec :: ReadP ColourSpec
|
parseColourSpec :: ReadP ColourSpec
|
||||||
parseCoulourSpec = choice [ string "amb" >> return Amber
|
parseColourSpec = choice [ string "amb" >> return Amber
|
||||||
, string "blu" >> return Blue
|
, string "blu" >> return Blue
|
||||||
, string "brn" >> return Brown
|
, string "brn" >> return Brown
|
||||||
, string "gry" >> return Gray
|
, string "gry" >> return Gray
|
||||||
|
|
Loading…
Reference in a new issue