X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcDeriv.lhs;h=0acf31c512b3274c50d445d5f65fe9af50c89ff3;hb=b99310f05faee2abec850da4349fcd5c0498f7ca;hp=0272c54b387a97d3373072da84c2017964e20836;hpb=922de8ca1aa3f2a1796e8cfa9bf8e52d7b959d9b;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 0272c54..0acf31c 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -238,10 +238,11 @@ tcDeriving tycl_decls inst_decls deriv_decls ; gen_binds <- mkGenericBinds tycl_decls -- Rename these extra bindings, discarding warnings about unused bindings etc - -- Set -fglasgow exts so that we can have type signatures in patterns, - -- which is used in the generic binds + -- Type signatures in patterns are used in the generic binds ; rn_binds - <- discardWarnings $ setOptM Opt_GlasgowExts $ do + <- discardWarnings $ + setOptM Opt_PatternSignatures $ + do { (rn_deriv, _dus1) <- rnTopBinds (ValBindsIn deriv_binds []) ; (rn_gen, dus_gen) <- rnTopBinds (ValBindsIn gen_binds []) ; keepAliveSetTc (duDefs dus_gen) -- Mark these guys to @@ -408,7 +409,7 @@ mkEqnHelp orig tvs cls cls_tys tc_app ; (rep_tc, rep_tc_args) <- tcLookupFamInstExact tycon full_tc_args - ; mayDeriveDataTypeable <- doptM Opt_GlasgowExts + ; mayDeriveDataTypeable <- doptM Opt_DeriveDataTypeable ; newtype_deriving <- doptM Opt_GeneralizedNewtypeDeriving ; overlap_flag <- getOverlapFlag @@ -656,7 +657,7 @@ mkNewTypeEqn orig mayDeriveDataTypeable newtype_deriving overlap_flag tvs cls cl mb_std_err = checkSideConditions mayDeriveDataTypeable cls cls_tys rep_tycon std_err = derivingThingErr cls cls_tys tc_app $ vcat [fromJust mb_std_err, - ptext SLIT("Try -fglasgow-exts for GHC's newtype-deriving extension")] + ptext SLIT("Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension")] -- Here is the plan for newtype derivings. We see -- newtype T a1...an = MkT (t ak+1...an) deriving (.., C s1 .. sm, ...)