Closed RyanGlScott closed 2 years ago
eliminators already defines elimNat, which pretends Nat is an inductive data type through clever use of unsafeCoerce. Now that GHC 9.2+ defines a ConsSymbol type family, we can define an analogous eliminator function for Symbol.
eliminators
elimNat
Nat
unsafeCoerce
ConsSymbol
Symbol
eliminators
already defineselimNat
, which pretendsNat
is an inductive data type through clever use ofunsafeCoerce
. Now that GHC 9.2+ defines aConsSymbol
type family, we can define an analogous eliminator function forSymbol
.