[Haskell-beginners] Type depending on value
marcin.jan.mrotek at gmail.com
Fri May 13 10:19:24 UTC 2016
Well, yes, singleton defined that way doesn't enforce the value to be equal
to the type. Maybe you could use a type class for natVec? It's not a
particularly elegant solution, but it's the only one I came up with. Or
maybe use two different singleton types, one hidden and only used in
SNatClass, and the other exposed and defined the way you did originally?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners