diff options
-rw-r--r-- | compiler/typecheck/TcType.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs index ab2f8430d8..bd72981511 100644 --- a/compiler/typecheck/TcType.hs +++ b/compiler/typecheck/TcType.hs @@ -2152,7 +2152,9 @@ isInsolubleOccursCheck eq_rel tv ty go (CoercionTy _) = False -- ToDo: what about the coercion go (TyConApp tc tys) | isGenerativeTyCon tc role = any go tys - | otherwise = False + | otherwise = any go (drop (tyConArity tc) tys) + -- (a ~ F b a), where F has arity 1, + -- has an insoluble occurs check role = eqRelRole eq_rel |