1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Generalize Decl over the name type.

This commit is contained in:
Rob Rix 2019-10-11 11:29:23 -04:00
parent 0c1b7bc25f
commit b739911580
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -29,8 +29,8 @@ import Prelude hiding (fail)
import Source.Span
import qualified System.Path as Path
data Decl = Decl
{ declSymbol :: Name
data Decl name = Decl
{ declSymbol :: name
, declPath :: Path.AbsRelFile
, declSpan :: Span
}
@ -42,7 +42,7 @@ data Ref = Ref
}
deriving (Eq, Ord, Show)
newtype ScopeGraph = ScopeGraph { unScopeGraph :: Map.Map Decl (Set.Set Ref) }
newtype ScopeGraph = ScopeGraph { unScopeGraph :: Map.Map (Decl Name) (Set.Set Ref) }
deriving (Eq, Ord, Show)
instance Semigroup ScopeGraph where