foscam-filename-0.0.4: Foscam File format

Safe HaskellNone
LanguageHaskell2010

Data.Foscam.File.ImageId

Synopsis

Documentation

class AsImageId p f s where Source #

Methods

_ImageId :: Optic' p f s ImageId Source #

Instances

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