digit-0.4.0: A data-type representing digits 0-9 and other combinations

Safe HaskellNone
LanguageHaskell2010

Data.Digit.DBb

Synopsis

Documentation

type DBb a = (DB a, Db a) Source #

parseBb :: (DBb d, CharParsing p) => p d Source #

>>> parse (parseBb <* eof) "test" "B" :: Either ParseError (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> parse (parseBb <* eof) "test" "b" :: Either ParseError (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> parse parseBb "test" "Bxyz" :: Either ParseError (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> parse parseBb "test" "bxyz" :: Either ParseError (HeXaDeCiMaLDigit' ())
Right (Left ())
>>> isn't _Right (parse parseBb "test" "xyz" :: Either ParseError (HeXaDeCiMaLDigit' ()))
True
\c -> (c `notElem` "Bb") ==> isn't _Right (parse parseBb "test" [c] :: Either ParseError (HeXaDeCiMaLDigit' ()))