-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A data-type representing digits 0-9 -- -- A data-type with 10 nullary constructors @package Digit @version 0.0.1 -- | A data type with ten nullary constructors and combinators. module Data.Digit -- | A data type with ten nullary constructors. data Digit -- | Zero. d0 :: Digit -- | One. d1 :: Digit -- | Two. d2 :: Digit -- | Three. d3 :: Digit -- | Four. d4 :: Digit -- | Five. d5 :: Digit -- | Six. d6 :: Digit -- | Seven. d7 :: Digit -- | Eight d8 :: Digit -- | Nine. d9 :: Digit -- | Catamorphism for Digit. foldDigit :: a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> Digit -> a -- | Return the first argument if zero, otherwise the second argument. if0 :: x -> x -> Digit -> x -- | Return the first argument if one, otherwise the second argument. if1 :: x -> x -> Digit -> x -- | Return the first argument if two, otherwise the second argument. if2 :: x -> x -> Digit -> x -- | Return the first argument if three, otherwise the second argument. if3 :: x -> x -> Digit -> x -- | Return the first argument if four, otherwise the second argument. if4 :: x -> x -> Digit -> x -- | Return the first argument if five, otherwise the second argument. if5 :: x -> x -> Digit -> x -- | Return the first argument if six, otherwise the second argument. if6 :: x -> x -> Digit -> x -- | Return the first argument if seven, otherwise the second argument. if7 :: x -> x -> Digit -> x -- | Return the first argument if eight, otherwise the second argument. if8 :: x -> x -> Digit -> x -- | Return the first argument if nine, otherwise the second argument. if9 :: x -> x -> Digit -> x -- | Return the first argument if even, otherwise the second argument. ifEven :: x -> x -> Digit -> x -- | Return the first argument if odd, otherwise the second argument. ifOdd :: x -> x -> Digit -> x instance Eq Digit instance Ord Digit instance Enum Digit instance Bounded Digit instance Read Digit instance Show Digit module Test.Data.Digit main :: IO () digitTests :: [Test] prop_fold :: Digit -> Bool prop_if :: Int -> Int -> Digit -> Bool prop_even_odd :: Int -> Int -> Digit -> Bool instance Arbitrary Digit