1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Define an Eq1 instance for Env.

This commit is contained in:
Rob Rix 2017-09-11 10:20:42 -04:00
parent 649aad3f8a
commit 98cd5eb860

View File

@ -81,6 +81,9 @@ instance Eq1 f => Eq1 (BindingF f) where
instance (Eq1 f, Eq a) => Eq (BindingF f a) where instance (Eq1 f, Eq a) => Eq (BindingF f a) where
(==) = eq1 (==) = eq1
instance Eq1 Env where
liftEq eq (Env v1) (Env v2) = liftEq (liftEq eq) v1 v2
instance Show1 f => Show1 (BindingF f) where instance Show1 f => Show1 (BindingF f) where
liftShowsPrec sp sl d (Let vars body) = showsBinaryWith (const (liftShowList sp sl)) (liftShowsPrec sp sl) "Let" d vars body liftShowsPrec sp sl d (Let vars body) = showsBinaryWith (const (liftShowList sp sl)) (liftShowsPrec sp sl) "Let" d vars body