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

Use Declarations for declared names in Go.

This commit is contained in:
Rob Rix 2018-07-16 10:26:12 -04:00
parent 24825d3a6d
commit 5df6613cf0

View File

@ -84,7 +84,7 @@ instance Show1 QualifiedImport where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable QualifiedImport where
eval (QualifiedImport importPath aliasTerm) = do
paths <- resolveGoImport importPath
alias <- either (throwEvalError . FreeVariablesError) pure (freeVariable $ subterm aliasTerm)
alias <- maybeM (throwEvalError (FreeVariablesError [])) (declaredName (subterm aliasTerm))
void . letrec' alias $ \addr -> do
for_ paths $ \p -> do
traceResolve (unPath importPath) p