@@ -583,8 +583,9 @@ inferBinder val (ConstructorBinder ctor binders) = do
583 env <- getEnv
583 env <- getEnv
584 case M.lookup ctor (dataConstructors env) of
584 case M.lookup ctor (dataConstructors env) of
585 Just (_, ty) -> do
585 Just (_, ty) -> do
586− (_, fn) <- instantiatePolyTypeWithUnknowns (error "Data constructor types cannot contains constraints") ty
586+ (_, fn) <- instantiatePolyTypeWithUnknowns (error "Data constructor types cannot contain constraints") ty
587+ fn' <- replaceAllTypeSynonyms fn
587− go binders fn
588+ go binders fn'
589 go [] ty' = do
590 go [] ty' = do
590 _ <- subsumes Nothing val ty'
591 _ <- subsumes Nothing val ty'