-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A data-type representing digits 0-9 and other combinations -- -- -- Digit is a data-type that represents the digits 0-9 and other -- combinations. @package digit @version 0.2.0 -- | A data type with ten nullary constructors [0-9] and combinators. module Data.Digit -- | A data type with ten nullary constructors. data Digit -- | Catamorphism for Digit. -- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d0 == x0 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d1 == x1 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d2 == x2 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d3 == x3 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d4 == x4 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d5 == x5 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d6 == x6 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d7 == x7 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d8 == x8 ---- --
-- foldDigit x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 d9 == x9 --foldDigit :: a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> Digit -> a class D0 d d0 :: D0 d => Prism' d () x0 :: D0 d => d class D1 d d1 :: D1 d => Prism' d () x1 :: D1 d => d class D2 d d2 :: D2 d => Prism' d () x2 :: D2 d => d class D3 d d3 :: D3 d => Prism' d () x3 :: D3 d => d class D4 d d4 :: D4 d => Prism' d () x4 :: D4 d => d class D5 d d5 :: D5 d => Prism' d () x5 :: D5 d => d class D6 d d6 :: D6 d => Prism' d () x6 :: D6 d => d class D7 d d7 :: D7 d => Prism' d () x7 :: D7 d => d class D8 d d8 :: D8 d => Prism' d () x8 :: D8 d => d class D9 d d9 :: D9 d => Prism' d () x9 :: D9 d => d -- | A prism for using Int as Digit. -- --
-- >>> 5 ^? digit -- Just 5 ---- --
-- >>> 0 ^? digit -- Just 0 ---- --
-- >>> 9 ^? digit -- Just 9 ---- --
-- >>> 10 ^? digit -- Nothing ---- --
-- >>> (-5) ^? digit -- Nothing --digit :: Prism' Int Digit -- | A prism for using Char as Digit. -- --
-- >>> '5' ^? digitC -- Just 5 ---- --
-- >>> '0' ^? digitC -- Just 0 ---- --
-- >>> '9' ^? digitC -- Just 9 ---- --
-- >>> 'a' ^? digitC -- Nothing ---- --
-- >>> '@' ^? digitC -- Nothing --digitC :: Prism' Char Digit -- | A QuasiQuoter for any range of Digit. -- --