Portability | see LANGUAGE pragmas (... GHC) |
---|---|
Stability | experimental |
Maintainer | nicolas.frisby@gmail.com |
Safe Haskell | None |
Type-level numerals built from type-level digits of an arbitrary radix.
- module Type.Digits.Aux
- digit :: (Show a, Eq a, Num a) => a -> Name
- toType :: [Name] -> Type -> Type
- toType_ :: [Name] -> Type
- toDigits :: (a -> [Name]) -> a -> Type -> Type
- toDigits_ :: (a -> [Name]) -> a -> Type
- flexible :: (Show a, Eq a, Integral a) => a -> [Name]
- fixed :: forall a. (Bounded a, Show a, Eq a, Integral a) => a -> [Name]
- flexible' :: Enum a => a -> [Name]
- fixed' :: Enum a => a -> [Name]
- exactly :: Int -> [Name] -> [Name]
Documentation
module Type.Digits.Aux
digit :: (Show a, Eq a, Num a) => a -> NameSource
Convert a number to the name of the corresponding digit -- error if the argument is out of range.
flexible :: (Show a, Eq a, Integral a) => a -> [Name]Source
Converts an Integral
to a type-level numeral using as many digits as it
takes that particular number.