mstksg / typelits-witnesses

Existential witnesses, singletons, and classes for operations on GHC TypeLits
http://hackage.haskell.org/package/typelits-witnesses
MIT License
10 stars 13 forks source link

Only coerce the SNat, not the Either constructor. #4

Closed matt-noonan closed 2 years ago

matt-noonan commented 3 years ago

Without this change, minusSNat always returns a Left value, either because it should return Left, or else because we've coerced a SNat into an Either , which gives us something Left(!)

mstksg commented 2 years ago

Great catch, thanks!