From ddec76336e5bd4d245f0bbc57950be55e8432fb9 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 10 May 2018 23:43:40 -0400 Subject: [PATCH] Revert ":fire: the Generic1 instance for Environment." This reverts commit bdc444379c51aef592e5fb004d11137ad4fff1cc. --- src/Data/Abstract/Environment.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Abstract/Environment.hs b/src/Data/Abstract/Environment.hs index 28fc27990..663521664 100644 --- a/src/Data/Abstract/Environment.hs +++ b/src/Data/Abstract/Environment.hs @@ -38,11 +38,11 @@ import qualified Data.List.NonEmpty as NonEmpty -- All behaviors can be assumed to be frontmost-biased: looking up "a" will check the most specific -- scope for "a", then the next, and so on. newtype Environment location value = Environment { unEnvironment :: NonEmpty (Map.Map Name location) } - deriving (Eq, Ord, Show) + deriving (Eq, Generic1, Ord, Show) -instance Eq location => Eq1 (Environment location) where liftEq _ a b = unEnvironment a == unEnvironment b -instance Ord location => Ord1 (Environment location) where liftCompare _ a b = unEnvironment a `compare` unEnvironment b -instance Show location => Show1 (Environment location) where liftShowsPrec _ _ = showsPrec +instance Eq location => Eq1 (Environment location) where liftEq = genericLiftEq +instance Ord location => Ord1 (Environment location) where liftCompare = genericLiftCompare +instance Show location => Show1 (Environment location) where liftShowsPrec = genericLiftShowsPrec -- | The provided list will be put into an Environment with one member, so fromList is total -- (despite NonEmpty's instance being partial). Don't pass in multiple Addresses for the