Closed bodil closed 7 years ago
I'm not necessarily opposed. However this is usually dealt with using proxies, right?
succ :: forall n. Nat n => Proxy n -> Proxy (Succ n)
succ _ = Proxy
I suppose that's cleaner, but decidedly less readable. Not sure which one to prefer.
Given that this library already uses the Proxy
style elsewhere, I would rather have users define their own undefined
if they want to use that style. Or in the case of functions, even unsafeCoerce unit
.
In your example, aren't both types uninhabitable anyway? So an empty case would work as well, and be technically valid to boot.
It would also only apply to types of kind Type
. For example this couldn't be used for anything to do with symbols.
That makes sense.
This thing keeps being useful when I'm doing type level programming, I figured it might be relevant enough to go in typelevel-prelude.