Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data SNat n
- snat :: KnownNat n => SNat n
- withSNat :: KnownNat n => (SNat n -> a) -> a
- snatToInteger :: SNat n -> Integer
- data UNat :: Nat -> * where
- toUNat :: SNat n -> UNat n
- addUNat :: UNat n -> UNat m -> UNat (n + m)
- multUNat :: UNat n -> UNat m -> UNat (n * m)
- powUNat :: UNat n -> UNat m -> UNat (n ^ m)
Documentation
Singleton value for a type-level natural number n
- CLaSH.Promoted.Nat.Literals contains a list of predefined
SNat
literals - CLaSH.Promoted.Nat.TH has functions to easily create large ranges of new
SNat
literals
withSNat :: KnownNat n => (SNat n -> a) -> a Source
Supply a function with a singleton natural n
according to the context
snatToInteger :: SNat n -> Integer Source