| Opt_GeneralizedNewtypeDeriving
| Opt_RecursiveDo
| Opt_PatternGuards
+ | Opt_PartiallyAppliedClosedTypeSynonyms
| Opt_Rank2Types
| Opt_RankNTypes
| Opt_TypeOperators
( "FFI", Opt_FFI ), -- ...and also `-fffi'
( "ForeignFunctionInterface", Opt_FFI ),
+ ( "PartiallyAppliedClosedTypeSynonyms", Opt_PartiallyAppliedClosedTypeSynonyms ),
( "Rank2Types", Opt_Rank2Types ),
( "RankNTypes", Opt_RankNTypes ),
( "TypeOperators", Opt_TypeOperators ),
, Opt_ExistentialQuantification
, Opt_UnicodeSyntax
, Opt_PatternGuards
+ , Opt_PartiallyAppliedClosedTypeSynonyms
, Opt_RankNTypes
, Opt_TypeOperators
, Opt_RecursiveDo
&& tyConArity tc <= length tys) $
failWithTc arity_msg
- ; gla_exts <- doptM Opt_GlasgowExts
- ; if gla_exts && not (isOpenTyCon tc) then
- -- If -fglasgow-exts then don't check the type arguments of
- -- *closed* synonyms.
+ ; ok <- doptM Opt_PartiallyAppliedClosedTypeSynonyms
+ ; if ok && not (isOpenTyCon tc) then
+ -- Don't check the type arguments of *closed* synonyms.
-- This allows us to instantiate a synonym defn with a
-- for-all type, or with a partially-applied type synonym.
-- e.g. type T a b = a