@@ -1,6 +1,7 @@
11{-# OPTIONS_GHC -Wall #-}
22module Nitpick.TopLevelTypes (topLevelTypes) where
33
4+import Data.Map ((!))
45import Prelude hiding (maybe)
56import qualified Data.Foldable as F
67import qualified Data.Map as Map
@@ -39,14 +40,10 @@ warnMissingAnnotation
3940warnMissingAnnotation typeEnv (A.A (region,_) decl) =
4041 case decl of
4142 Decl.Def (Valid.Definition (A.A _ (P.Var name)) _ Nothing) ->
42− case Map.lookup name typeEnv of
43− Nothing ->
44− return ()
43+ Result.warn region (Warning.MissingTypeAnnotation name (typeEnv ! name))
4544
46− Just tipe ->
47− Result.warn region (Warning.MissingTypeAnnotation name tipe)
4845 _ ->
49− return ()
46+ return ()
5047
5148
5249