diff --git a/semantic-python/src/Language/Python/Core.hs b/semantic-python/src/Language/Python/Core.hs index 57230b3dd..5e4b577b6 100644 --- a/semantic-python/src/Language/Python/Core.hs +++ b/semantic-python/src/Language/Python/Core.hs @@ -118,7 +118,8 @@ instance Compile (Py.Assignment Span) where , Py.right = Just rhs } cc = do value <- compile rhs - locate it =<< ((Name.named' name :<- value) >>>=) <$> local (def name) cc + let assigning n = (Name.named' name :<- value) >>>= n + locate it =<< assigning <$> local (def name) cc compileCC other _ = fail ("Unhandled assignment case: " <> show other) compile t = compileCC t (pure none)