@@ -230,7 +230,6 @@ solveScheme scheme =
230 header' <- T.traverse flatten header
230 header' <- T.traverse flatten header
231 actuallySolve constraint
231 actuallySolve constraint
233− allDistinct rigidQuantifiers
234 youngPool <- TS.getPool
233 youngPool <- TS.getPool
235 TS.switchToPool oldPool
234 TS.switchToPool oldPool
236 generalize youngPool
235 generalize youngPool
@@ -240,34 +239,6 @@ solveScheme scheme =
241-- ADDITIONAL CHECKS
240-- ADDITIONAL CHECKS
243−-- Checks that all of the given variables belong to distinct equivalence classes.
244−-- Also checks that their structure is Nothing, so they represent a variable, not
245−-- a more complex term.
246−allDistinct :: [Variable] -> TS.Solver ()
248− do seenMark <- TS.uniqueMark
249− forM_ vars $ \var ->
250− do desc <- liftIO $ UF.descriptor var
251− case _content desc of
253− crash "Can only generalize type variables, not structures."
256− crash "Can only generalize type variables, not structures."
259− crash "Can only generalize type variables, not aliases."
262− crash "Can only generalize type variables, not error types."
265− if _mark desc == seenMark then
266− crash "Duplicate variable during generalization."
269− liftIO (UF.setDescriptor var (desc { _mark = seenMark }))
272-- Check that a variable has rank == noRank, meaning that it can be generalized.
243-- Check that a variable has rank == noRank, meaning that it can be generalized.
273isGeneric :: Variable -> TS.Solver ()
244isGeneric :: Variable -> TS.Solver ()