@@ -406,9 +406,9 @@ inferBinder val (PositionedBinder pos _ binder) =
406-- change the definition of `binderRequiresMonotype`,
406-- change the definition of `binderRequiresMonotype`,
407-- and use `kindOfWithScopedVars`.
407-- and use `kindOfWithScopedVars`.
408inferBinder val (TypedBinder ty binder) = do
408inferBinder val (TypedBinder ty binder) = do
410+ checkTypeKind ty kind
409 ty1 <- replaceAllTypeSynonyms <=< replaceTypeWildcards $ ty
411 ty1 <- replaceAllTypeSynonyms <=< replaceTypeWildcards $ ty
411− checkTypeKind ty1 kind
412 unifyTypes val ty1
412 unifyTypes val ty1
413 inferBinder val binder
413 inferBinder val binder