summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-07-10 15:24:06 +0000
committerIan Lynagh <igloo@earth.li>2007-07-10 15:24:06 +0000
commit72b5392f4103dc895d569bfad647ddec2de67dec (patch)
treea6a430aa5c9dba9c954b098b845e267456eea7ff
parentec70ee9f1fb57cfbaffe7187f1bd4440903a49d7 (diff)
downloadhaskell-72b5392f4103dc895d569bfad647ddec2de67dec.tar.gz
Be finer-grained when turning on extensions for generated code
-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") ;