1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 13:21:59 +03:00

Temporarily move reference call to eval in Evaluatable Identifier

Because we don't set up the Reader Span property when calling `ref`.
This commit is contained in:
joshvera 2018-12-20 19:35:19 -05:00
parent 39a4ec0479
commit 6ebbc848e9

View File

@ -166,11 +166,13 @@ instance Ord1 Identifier where liftCompare = genericLiftCompare
instance Show1 Identifier where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable Identifier where
eval eval ref' = ref eval ref' >=> deref
ref _ _ (Identifier name) = do
eval eval ref' term@(Identifier name) = do
-- FIXME: Set the span up correctly in ref so we can move the `reference` call there.
span <- ask @Span
reference (Reference name) span ScopeGraph.Identifier (Declaration name)
deref =<< ref eval ref' term
ref _ _ (Identifier name) = do
lookupDeclaration (Declaration name)