Issue #1 resolved

lifting unknown integer values to Nat types at run-time

Masahiro Sakai
created an issue

I'm using type-level-numbers for my finite-field package hackage.haskell.org/package/finite-field , and I wrote a function that lifts unknown integer values to Nat types at run-time (see http://hackage.haskell.org/packages/archive/finite-field/0.6.0/doc/html/src/Data-FiniteField-SomeNat.html for actual implementation):

data SomeNat where
  SomeNat :: Nat n => n -> SomeNat

fromInteger :: Integer -> SomeNat 
fromInteger = ...

I think it would be nice if type-level-numbers package itself provided such functionality.

Comments (2)

  1. Log in to comment