From 081b6b6e90b26a213e8e3065584c552fd2b64d57 Mon Sep 17 00:00:00 2001 From: Manuel M T Chakravarty Date: Sat, 29 Sep 2007 12:26:24 +0000 Subject: [PATCH] FIX #1729: Don't try to expand syn families with -XLiberalTypeSynonyms MERGE TO STABLE --- compiler/typecheck/TcMType.lhs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index dc811cb..ebcf5b3 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -1097,7 +1097,7 @@ check_tau_type rank ubx_tup (NoteTy other_note ty) check_tau_type rank ubx_tup ty@(TyConApp tc tys) | isSynTyCon tc = do { -- Check that the synonym has enough args - -- This applies eqaually to open and closed synonyms + -- This applies equally to open and closed synonyms -- It's OK to have an *over-applied* type synonym -- data Tree a b = ... -- type Foo a = Tree [a] @@ -1106,14 +1106,14 @@ check_tau_type rank ubx_tup ty@(TyConApp tc tys) -- See Note [Liberal type synonyms] ; liberal <- doptM Opt_LiberalTypeSynonyms - ; if not liberal then - -- For H98, do check the type args + ; if not liberal || isOpenSynTyCon tc then + -- For H98 and synonym families, do check the type args mappM_ check_arg_type tys - else -- In the liberal case, expand then check + else -- In the liberal case (only for closed syns), expand then check case tcView ty of Just ty' -> check_tau_type rank ubx_tup ty' - Nothing -> pprPanic "check_tau_type" (ppr ty) + Nothing -> pprPanic "check_tau_type" (ppr ty) } | isUnboxedTupleTyCon tc -- 1.7.10.4