From 6ebbc848e92f9fc7bbacd994ba1d35209808fc20 Mon Sep 17 00:00:00 2001 From: joshvera Date: Thu, 20 Dec 2018 19:35:19 -0500 Subject: [PATCH] Temporarily move `reference` call to eval in Evaluatable Identifier Because we don't set up the Reader Span property when calling `ref`. --- src/Data/Syntax.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Data/Syntax.hs b/src/Data/Syntax.hs index 33269ec00..3f005437b 100644 --- a/src/Data/Syntax.hs +++ b/src/Data/Syntax.hs @@ -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)