-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | /Arbitrary/ type-level digits -- -- Arbitrary ype-level digits, for when the radix itself doesn't actually -- matter. It's currently base-128, because that seemed to best expedite -- the compilation of the modules using this package. Please let me know -- what you find if you experiment with this. Type.Digits.radix is -- the (arbitrary) radix. Type.Digits.digit computes the -- NameG of a digit from its value (assuming its less than the -- radix). Combinators are provided to compute a full type-level numeral -- from values (potentially) larger than the radix. @package type-digits @version 0.1 -- | The parameters for the type-digits package. module Type.Digits.Aux -- | The names of the digits. digitNames :: [String] -- | The number of digits. radix :: Num i => i -- | Type-level numerals built from type-level digits of an arbitrary -- radix. module Type.Digits -- | Convert a number to the name of the corresponding digit -- error if -- the argument is out of range. digit :: Num a => a -> Name -- | Give a list of digit names, and a base type, yields a type. toType :: [Name] -> Type -> Type -- | toType_ = ($ TupleT 0) . toType. toType_ :: [Name] -> Type -- |
--   toDigits f = toType . f
--   
toDigits :: (a -> [Name]) -> a -> Type -> Type -- | toDigits_ = (($ TupleT 0) .) . toDigits. toDigits_ :: (a -> [Name]) -> a -> Type -- | Converts an Integral to a type-level numeral using as many -- digits as it takes that particular number. flexible :: Integral a => a -> [Name] -- | Converts a Bounded Integral to a type-level numeral -- using exactly the number of digits it takes to represent each value of -- that type uniquely. fixed :: (Bounded a, Integral a) => a -> [Name] -- |
--   flexible' = flexible . fromEnum
--   
flexible' :: Enum a => a -> [Name] -- |
--   fixed' = fixed . fromEnum
--   
fixed' :: Enum a => a -> [Name] -- | Pads its second argument so that the resulting length is its first -- argument; fails if the second argument is already larger. exactly :: Int -> [Name] -> [Name]