| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Digit.Hexadecimal
- type HexadecimalNoZero d = (D1 d, D2 d, D3 d, D4 d, D5 d, D6 d, D7 d, D8 d, D9 d, Da d, Db d, Dc d, Dd d, De d, De d, Df d)
- type Hexadecimal d = (D0 d, HexadecimalNoZero d)
- parseHexadecimalNoZero :: (HexadecimalNoZero d, CharParsing p) => p d
- parseHexadecimal :: (Hexadecimal d, CharParsing p) => p d
Documentation
type HexadecimalNoZero d = (D1 d, D2 d, D3 d, D4 d, D5 d, D6 d, D7 d, D8 d, D9 d, Da d, Db d, Dc d, Dd d, De d, De d, Df d) Source #
type Hexadecimal d = (D0 d, HexadecimalNoZero d) Source #
parseHexadecimalNoZero :: (HexadecimalNoZero d, CharParsing p) => p d Source #
>>>parse (parseHexadecimalNoZero <* eof) "test" "1" :: Either ParseError DigitRight 1
>>>parse parseHexadecimalNoZero "test" "1xyz" :: Either ParseError DigitRight 1
>>>parse (parseHexadecimalNoZero <* eof) "test" "2" :: Either ParseError DigitRight 2
>>>parse parseHexadecimalNoZero "test" "2xyz" :: Either ParseError DigitRight 2
>>>parse (parseHexadecimalNoZero <* eof) "test" "3" :: Either ParseError DigitRight 3
>>>parse parseHexadecimalNoZero "test" "3xyz" :: Either ParseError DigitRight 3
>>>parse (parseHexadecimalNoZero <* eof) "test" "4" :: Either ParseError DigitRight 4
>>>parse parseHexadecimalNoZero "test" "4xyz" :: Either ParseError DigitRight 4
>>>parse (parseHexadecimalNoZero <* eof) "test" "5" :: Either ParseError DigitRight 5
>>>parse parseHexadecimalNoZero "test" "5xyz" :: Either ParseError DigitRight 5
>>>parse (parseHexadecimalNoZero <* eof) "test" "6" :: Either ParseError DigitRight 6
>>>parse parseHexadecimalNoZero "test" "6xyz" :: Either ParseError DigitRight 6
>>>parse (parseHexadecimalNoZero <* eof) "test" "7" :: Either ParseError DigitRight 7
>>>parse parseHexadecimalNoZero "test" "7xyz" :: Either ParseError DigitRight 7
>>>parse (parseHexadecimalNoZero <* eof) "test" "8" :: Either ParseError DigitRight 8
>>>parse parseHexadecimalNoZero "test" "8xyz" :: Either ParseError DigitRight 8
>>>parse (parseHexadecimalNoZero <* eof) "test" "9" :: Either ParseError DigitRight 9
>>>parse parseHexadecimalNoZero "test" "9xyz" :: Either ParseError DigitRight 9
>>>parse (parseHexadecimalNoZero <* eof) "test" "a" :: Either ParseError DigitRight a
>>>parse parseHexadecimalNoZero "test" "axyz" :: Either ParseError DigitRight a
>>>parse (parseHexadecimalNoZero <* eof) "test" "b" :: Either ParseError DigitRight b
>>>parse parseHexadecimalNoZero "test" "bxyz" :: Either ParseError DigitRight b
>>>parse (parseHexadecimalNoZero <* eof) "test" "c" :: Either ParseError DigitRight c
>>>parse parseHexadecimalNoZero "test" "cxyz" :: Either ParseError DigitRight c
>>>parse (parseHexadecimalNoZero <* eof) "test" "d" :: Either ParseError DigitRight d
>>>parse parseHexadecimalNoZero "test" "dxyz" :: Either ParseError DigitRight d
>>>parse (parseHexadecimalNoZero <* eof) "test" "e" :: Either ParseError DigitRight e
>>>parse parseHexadecimalNoZero "test" "exyz" :: Either ParseError DigitRight e
>>>parse (parseHexadecimalNoZero <* eof) "test" "f" :: Either ParseError DigitRight f
>>>parse parseHexadecimalNoZero "test" "fxyz" :: Either ParseError DigitRight f
>>>isn't _Right (parse parseHexadecimalNoZero "test" "xyz" :: Either ParseError Digit)True
\c -> (c `notElem` "123456789abcdef") ==> isn't _Right (parse parseHexadecimalNoZero "test" [c] :: Either ParseError Digit)
parseHexadecimal :: (Hexadecimal d, CharParsing p) => p d Source #
>>>parse (parseHexadecimal <* eof) "test" "0" :: Either ParseError DigitRight 0
>>>parse parseHexadecimal "test" "0xyz" :: Either ParseError DigitRight 0
>>>parse (parseHexadecimal <* eof) "test" "1" :: Either ParseError DigitRight 1
>>>parse parseHexadecimal "test" "1xyz" :: Either ParseError DigitRight 1
>>>parse (parseHexadecimal <* eof) "test" "2" :: Either ParseError DigitRight 2
>>>parse parseHexadecimal "test" "2xyz" :: Either ParseError DigitRight 2
>>>parse (parseHexadecimal <* eof) "test" "3" :: Either ParseError DigitRight 3
>>>parse parseHexadecimal "test" "3xyz" :: Either ParseError DigitRight 3
>>>parse (parseHexadecimal <* eof) "test" "4" :: Either ParseError DigitRight 4
>>>parse parseHexadecimal "test" "4xyz" :: Either ParseError DigitRight 4
>>>parse (parseHexadecimal <* eof) "test" "5" :: Either ParseError DigitRight 5
>>>parse parseHexadecimal "test" "5xyz" :: Either ParseError DigitRight 5
>>>parse (parseHexadecimal <* eof) "test" "6" :: Either ParseError DigitRight 6
>>>parse parseHexadecimal "test" "6xyz" :: Either ParseError DigitRight 6
>>>parse (parseHexadecimal <* eof) "test" "7" :: Either ParseError DigitRight 7
>>>parse parseHexadecimal "test" "7xyz" :: Either ParseError DigitRight 7
>>>parse (parseHexadecimal <* eof) "test" "8" :: Either ParseError DigitRight 8
>>>parse parseHexadecimal "test" "8xyz" :: Either ParseError DigitRight 8
>>>parse (parseHexadecimal <* eof) "test" "9" :: Either ParseError DigitRight 9
>>>parse parseHexadecimal "test" "9xyz" :: Either ParseError DigitRight 9
>>>parse (parseHexadecimal <* eof) "test" "a" :: Either ParseError DigitRight a
>>>parse parseHexadecimal "test" "axyz" :: Either ParseError DigitRight a
>>>parse (parseHexadecimal <* eof) "test" "b" :: Either ParseError DigitRight b
>>>parse parseHexadecimal "test" "bxyz" :: Either ParseError DigitRight b
>>>parse (parseHexadecimal <* eof) "test" "c" :: Either ParseError DigitRight c
>>>parse parseHexadecimal "test" "cxyz" :: Either ParseError DigitRight c
>>>parse (parseHexadecimal <* eof) "test" "d" :: Either ParseError DigitRight d
>>>parse parseHexadecimal "test" "dxyz" :: Either ParseError DigitRight d
>>>parse (parseHexadecimal <* eof) "test" "e" :: Either ParseError DigitRight e
>>>parse parseHexadecimal "test" "exyz" :: Either ParseError DigitRight e
>>>parse (parseHexadecimal <* eof) "test" "f" :: Either ParseError DigitRight f
>>>parse parseHexadecimal "test" "fxyz" :: Either ParseError DigitRight f
>>>isn't _Right (parse parseHexadecimal "test" "xyz" :: Either ParseError Digit)True
\c -> (c `notElem` "0123456789abcdef") ==> isn't _Right (parse parseHexadecimal "test" [c] :: Either ParseError Digit)