From e9b5e5760d338ef05886a3186344dccebfb6aaee Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Thu, 14 Mar 2019 17:20:29 -0700 Subject: [PATCH] Update VariableDeclarations --- src/Data/Syntax/Declaration.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Data/Syntax/Declaration.hs b/src/Data/Syntax/Declaration.hs index a4efa1ea8..c02022498 100644 --- a/src/Data/Syntax/Declaration.hs +++ b/src/Data/Syntax/Declaration.hs @@ -165,9 +165,8 @@ instance Evaluatable VariableDeclaration where eval _ _ (VariableDeclaration []) = unit eval eval _ (VariableDeclaration decs) = do for_ decs $ \declaration -> do - name <- maybeM (throwNoNameError declaration) (declaredName declaration) - let declarationSpan = getSpan declaration - declare (Declaration name) Default ScopeGraph.Public declarationSpan ScopeGraph.VariableDeclaration Nothing + let span = getSpan declaration + _ <- declareMaybeName (declaredName declaration) Default ScopeGraph.Public span ScopeGraph.VariableDeclaration Nothing eval declaration unit