[Haskell-cafe] Using Data,TypeLevel.Num

Richard O'Keefe ok at cs.otago.ac.nz
Thu Dec 1 05:55:18 CET 2011


I'd like to write a small module using Data.TypeLevel.Num.
It has type level constants, variables, addition, and maximum, which is pretty much
all I need.  But I've never used it before, and there's one thing I want to do that
I don't understand how to do.

	val :: Nat t => t -> Int
	val _ = t as an Int

e.g., if x :: D8 then val x = 8.

The "value-level reflection functions" in Data.TypeLevel.Num.Ops all seem to be
'undefined'.





More information about the Haskell-Cafe mailing list