@@ -1,6 +1,7 @@
1{-# OPTIONS_GHC -Wall #-}
1{-# OPTIONS_GHC -Wall #-}
2module Nitpick.TopLevelTypes (topLevelTypes) where
2module Nitpick.TopLevelTypes (topLevelTypes) where
4import Prelude hiding (maybe)
5import Prelude hiding (maybe)
5import qualified Data.Foldable as F
6import qualified Data.Foldable as F
6import qualified Data.Map as Map
7import qualified Data.Map as Map
@@ -39,14 +40,10 @@ warnMissingAnnotation
39warnMissingAnnotation typeEnv (A.A (region,_) decl) =
40warnMissingAnnotation typeEnv (A.A (region,_) decl) =
40 case decl of
41 case decl of
41 Decl.Def (Valid.Definition (A.A _ (P.Var name)) _ Nothing) ->
42 Decl.Def (Valid.Definition (A.A _ (P.Var name)) _ Nothing) ->
42− case Map.lookup name typeEnv of
43+ Result.warn region (Warning.MissingTypeAnnotation name (typeEnv ! name))
47− Result.warn region (Warning.MissingTypeAnnotation name tipe)
49− return ()
46+ return ()