[Haskell-cafe] How to turn Integer into Proxy (n :: KnownNat) with n equal to the integer?

Divesh Otwani dotwani at haverford.edu
Wed Aug 15 19:43:31 UTC 2018


Use  `someNatVal :: Integer
<http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelude.html#t:Integer>
-> Maybe
<http://hackage.haskell.org/package/base-4.11.1.0/docs/Data-Maybe.html#t:Maybe>
SomeNat
<http://hackage.haskell.org/package/base-4.11.1.0/docs/GHC-TypeLits.html#t:SomeNat>
`

from http://hackage.haskell.org/package/base-4.11.1.0/docs/GHC-TypeLits.html





Cordially, Divesh Otwani



On Wed, Aug 15, 2018 at 9:32 PM, Johannes Waldmann <
johannes.waldmann at htwk-leipzig.de> wrote:

> > How can I convert an Integer into a Proxy (n :: KnownNat)
> > with n equal to the integer?
>
> Data.Reflection.reifyNat ?
>
> https://mail.haskell.org/pipermail/haskell-cafe/2017-November/128152.html
>
> - J.W.
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180815/4a376eac/attachment.html>


More information about the Haskell-Cafe mailing list