on master help sign in
Trim out some code in TopLevelTypes
5af390dEvan Czaplicki
src/Nitpick/TopLevelTypes.hs+3−6
@@ -1,6 +1,7 @@
1{-# OPTIONS_GHC -Wall #-}
1{-# OPTIONS_GHC -Wall #-}
2module Nitpick.TopLevelTypes (topLevelTypes) where
2module Nitpick.TopLevelTypes (topLevelTypes) where
3
3
4+import Data.Map ((!))
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))
43− Nothing ->
44− return ()
45
44
46− Just tipe ->
47− Result.warn region (Warning.MissingTypeAnnotation name tipe)
48 _ ->
45 _ ->
49− return ()
46+ return ()
50
47
51
48
52
49