Commit 9bf00304 authored by Björn Peemöller 's avatar Björn Peemöller

Fixed bug in missing type signatures check for ambiguous identifier

parent 4e12c0a6
......@@ -403,11 +403,9 @@ checkFieldExpression (Field _ _ e) = checkExpr e -- Hier auch "visitId ident" ?
-- Check for missing type signatures
-- -----------------------------------------------------------------------------
-- check if a type signature was specified for every top-level function
-- declaration
-- for external function declarations this check is already performed
-- during syntax checking
-- |Check if every top-level function has an accompanying type signature.
-- For external function declarations, this check is already performed
-- during syntax checking.
checkMissingTypeSignatures :: [Decl] -> WCM ()
checkMissingTypeSignatures decls = warnFor WarnMissingSignatures $ do
let typedFs = [f | TypeSig _ fs _ <- decls, f <- fs]
......@@ -419,8 +417,9 @@ checkMissingTypeSignatures decls = warnFor WarnMissingSignatures $ do
getTyScheme :: Ident -> WCM TypeScheme
getTyScheme q = do
m <- getModuleIdent
tyEnv <- gets valueEnv
return $ case lookupValue q tyEnv of
return $ case qualLookupValue (qualifyWith m q) tyEnv of
[Value _ _ tys] -> tys
_ -> internalError $
"Checks.WarnCheck.getTyScheme: " ++ show q
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment