mirror of
https://github.com/github/semantic.git
synced 2024-12-14 08:25:32 +03:00
Move the Path instances into a deriving clause.
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
This commit is contained in:
parent
b28d877845
commit
adfcb37231
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user