Hello,

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?

Best regards,
Marcin Mrotek