@@ -372,7 +372,9 @@ inferBinder val (PositionedBinder pos _ binder) =
372 warnAndRethrowWithPosition pos $ inferBinder val binder
372 warnAndRethrowWithPosition pos $ inferBinder val binder
373-- TODO: When adding support for polymorphic types, check subsumption here
373-- TODO: When adding support for polymorphic types, check subsumption here
374-- and change the definition of `binderRequiresMonotype`
374-- and change the definition of `binderRequiresMonotype`
375−inferBinder val (TypedBinder ty binder) = val =?= ty >> inferBinder val binder
375+inferBinder val (TypedBinder ty binder) = do
376+ ty' <- replaceAllTypeSynonyms ty
377+ val =?= ty' >> inferBinder val binder
377-- | Returns true if a binder requires its argument type to be a monotype.
379-- | Returns true if a binder requires its argument type to be a monotype.
378-- | If this is the case, we need to instantiate any polymorphic types before checking binders.
380-- | If this is the case, we need to instantiate any polymorphic types before checking binders.