From adfcb372312de7887bacaecbcdc9adf49348476e Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 6 Dec 2018 13:11:44 -0500 Subject: [PATCH] Move the Path instances into a deriving clause. Co-Authored-By: Rick Winfrey --- src/Data/Abstract/ScopeGraph.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Data/Abstract/ScopeGraph.hs b/src/Data/Abstract/ScopeGraph.hs index 3d59ea159..5d88828c3 100644 --- a/src/Data/Abstract/ScopeGraph.hs +++ b/src/Data/Abstract/ScopeGraph.hs @@ -72,17 +72,11 @@ data Path scope | DPath Declaration Position -- | Construct an edge from a scope to another declaration path. | EPath EdgeLabel scope (Path scope) + deriving (Eq, Functor, Generic, NFData, Ord, Show) instance AbstractHole (Path scope) where hole = Hole -deriving instance Eq scope => Eq (Path scope) -deriving instance Show scope => Show (Path scope) -deriving instance Ord scope => Ord (Path scope) -deriving instance Generic (Path scope) -deriving instance NFData scope => NFData (Path scope) -deriving instance Functor Path - -- Returns the declaration of a path. pathDeclaration :: Path scope -> Declaration pathDeclaration (DPath d _) = d