Introduce GHC.TypeNats module with natVal
See libraries thread
Currently we have in the GHC.TypeLits module
natVal :: forall n proxy. KnowNat n => proxy n -> Integer
However, the result integer is never negative. Numeric.Natural module is in base since base-4.8.0.0.
I propose that we introduce new module GHC.TypeNats with natVal and natVal'
natVal :: forall n proxy. KnownNat n => proxy n -> Natural
and
natVal' :: forall n. KnownNat n => Proxy# n -> Natural
and other KnownNat related terms and type families.
Trac metadata
Trac field | Value |
---|---|
Version | |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |