diff --git a/src/Constraints.hs b/src/Constraints.hs index 851b1234..a56ea57d 100644 --- a/src/Constraints.hs +++ b/src/Constraints.hs @@ -177,6 +177,8 @@ solveOneInternal mappings constraint = Left err -> Left err Right ok -> foldM (\m (aa, bb) -> solveOneInternal m (Constraint aa bb i1 i2 ctx ord)) ok (zip args [b, ltB]) -- Else + Constraint _ CTy _ _ _ _ -> Right mappings + Constraint CTy _ _ _ _ _ -> Right mappings Constraint aTy bTy _ _ _ _ -> if aTy == bTy then Right mappings diff --git a/src/Types.hs b/src/Types.hs index 8c82322f..319d2389 100644 --- a/src/Types.hs +++ b/src/Types.hs @@ -291,6 +291,8 @@ areUnifiable (FuncTy argTysA retTyA ltA) (FuncTy argTysB retTyB ltB) ltBool = areUnifiable ltA ltB in all (== True) (ltBool : retBool : argBools) areUnifiable FuncTy {} _ = False +areUnifiable CTy _ = True +areUnifiable _ CTy = True areUnifiable a b | a == b = True | otherwise = False