@@ -1,3 +1,4 @@
1+{-# OPTIONS_GHC -Wall #-}
1module Type.Solve (solve) where
2module Type.Solve (solve) where
3import Control.Monad
4import Control.Monad
@@ -178,7 +179,7 @@ actuallySolve constraint =
179 CLet [Scheme [] fqs constraint' _] CTrue ->
180 CLet [Scheme [] fqs constraint' _] CTrue ->
180 do oldEnv <- TS.getEnv
181 do oldEnv <- TS.getEnv
181− mapM TS.introduce fqs
182+ mapM_ TS.introduce fqs
182 actuallySolve constraint'
183 actuallySolve constraint'
183 TS.modifyEnv (\_ -> oldEnv)
184 TS.modifyEnv (\_ -> oldEnv)
@@ -187,7 +188,7 @@ actuallySolve constraint =
187 headers <- Map.unions <$> mapM solveScheme schemes
188 headers <- Map.unions <$> mapM solveScheme schemes
188 TS.modifyEnv $ \env -> Map.union headers env
189 TS.modifyEnv $ \env -> Map.union headers env
189 actuallySolve constraint'
190 actuallySolve constraint'
190− mapM occurs $ Map.toList headers
191+ mapM_ occurs $ Map.toList headers
191 TS.modifyEnv (\_ -> oldEnv)
192 TS.modifyEnv (\_ -> oldEnv)
193 CInstance region name term ->
194 CInstance region name term ->
@@ -226,14 +227,14 @@ solveScheme scheme =
226 -- fill in a new pool when working on this scheme's constraints
227 -- fill in a new pool when working on this scheme's constraints
227 freshPool <- TS.nextRankPool
228 freshPool <- TS.nextRankPool
228 TS.switchToPool freshPool
229 TS.switchToPool freshPool
229− mapM TS.introduce quantifiers
230+ mapM_ TS.introduce quantifiers
230 header' <- T.traverse flatten header
231 header' <- T.traverse flatten header
231 actuallySolve constraint
232 actuallySolve constraint
233 youngPool <- TS.getPool
234 youngPool <- TS.getPool
234 TS.switchToPool oldPool
235 TS.switchToPool oldPool
235 generalize youngPool
236 generalize youngPool
236− mapM isGeneric rigidQuantifiers
237+ mapM_ isGeneric rigidQuantifiers
237 return header'
238 return header'