1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Define an Eq1 instance for empty unions.

These can never be constructed, so we just return False in case somebody decides to apply this to bottom.
This commit is contained in:
Rob Rix 2017-04-06 11:19:57 -04:00
parent 349214b5c5
commit 3d1feb70a4

View File

@ -65,3 +65,6 @@ instance (Eq1 f, Eq1 (Union fs)) => Eq1 (Union (f ': fs)) where
liftEq eq (Here f) (Here g) = liftEq eq f g liftEq eq (Here f) (Here g) = liftEq eq f g
liftEq eq (There f) (There g) = liftEq eq f g liftEq eq (There f) (There g) = liftEq eq f g
liftEq _ _ _ = False liftEq _ _ _ = False
instance Eq1 (Union '[]) where
liftEq _ _ _ = False -- We can never get here anyway.