[GHC] #15183: Expose the SNat type and the natSing method
GHC
ghc-devs at haskell.org
Fri May 25 08:56:37 UTC 2018
#15183: Expose the SNat type and the natSing method
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.6.1
Component: Core Libraries | Version: 8.2.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
OK. Is your intention to provide an alternative to the current
`Proxy`-based API? (For instance, `natVal :: KnownNat n = Proxy n ->
Natural`, and you're suggesting to augment it with something like
`fromNatSing :: SNat n -> Natural`?) If so, it may also be worth
considering adding `SNat`-consuming counterparts to `sameNat` and
`someNatVal` (the latter of which would require something like `data
SomeNatSing`, which is like `SomeNat`, but having an `SNat` as a field
instead of `Proxy`).
Also, `KnownSymbol`/`symbolSing` has similar design considerations.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15183#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list