summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcDeriv.lhs7
-rw-r--r--compiler/typecheck/TcRnDriver.lhs8
2 files changed, 8 insertions, 7 deletions
diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs
index fc41c8a14a..71123d3f60 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
diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs
index 8bb8d3e903..86594018bc 100644
--- a/compiler/typecheck/TcRnDriver.lhs
+++ b/compiler/typecheck/TcRnDriver.lhs
@@ -695,10 +695,10 @@ tcTopSrcDecls boot_details
(tc_val_binds, tcl_env) <- tcTopBinds val_binds ;
setLclTypeEnv tcl_env $ do {
- -- Now GHC-generated derived bindings and generics
- -- Do not generate warnings from compiler-generated code
- (tc_deriv_binds, tcl_env) <- discardWarnings $ setOptM Opt_GlasgowExts $
- tcTopBinds deriv_binds ;
+ -- Now GHC-generated derived bindings and generics.
+ -- Do not generate warnings from compiler-generated code.
+ (tc_deriv_binds, tcl_env) <- discardWarnings $
+ tcTopBinds deriv_binds ;
-- Second pass over class and instance declarations,
traceTc (text "Tc6") ;