Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
imageId :: (Monad f, CharParsing f) => f ImageId Source #
>>>
parse imageId "test" "2062"
Right (ImageId 2 [0,6,2])
>>>
parse imageId "test" "2"
Right (ImageId 2 [])
>>>
parse imageId "test" "a"
Left "test" (line 1, column 2): expecting image ID not a digit: a
>>>
parse imageId "test" ""
Left "test" (line 1, column 1): unexpected end of input expecting image ID