From 8e73f2c0cf07a4b235fcc1d1903ec69b41107dee Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 10 Jul 2007 18:01:30 +0000 Subject: [PATCH] Implement -XDeriveDataTypeable flag --- compiler/main/DynFlags.hs | 3 +++ compiler/typecheck/TcDeriv.lhs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index b3bea06..4225678 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -187,6 +187,7 @@ data DynFlag | Opt_RecordPuns | Opt_GADTs | Opt_RelaxedPolyRec -- -X=RelaxedPolyRec + | Opt_DeriveDataTypeable | Opt_TypeSynonymInstances | Opt_FlexibleContexts | Opt_FlexibleInstances @@ -1167,6 +1168,7 @@ xFlags = [ ( "UnboxedTuples", Opt_UnboxedTuples ), ( "ExpressionSignaturesUnboxedTuples", Opt_ExpressionSignaturesUnboxedTuples ), ( "TypeSynonymUnboxedTuples", Opt_TypeSynonymUnboxedTuples ), + ( "DeriveDataTypeable", Opt_DeriveDataTypeable ), ( "TypeSynonymInstances", Opt_TypeSynonymInstances ), ( "FlexibleContexts", Opt_FlexibleContexts ), ( "FlexibleInstances", Opt_FlexibleInstances ), @@ -1195,6 +1197,7 @@ glasgowExtsFlags = [ Opt_GlasgowExts , Opt_ExpressionSignaturesUnboxedTuples , Opt_TypeSynonymUnboxedTuples , Opt_TypeSynonymInstances + , Opt_DeriveDataTypeable , Opt_FlexibleContexts , Opt_FlexibleInstances , Opt_ConstrainedClassMethods diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 71123d3..0acf31c 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -409,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 -- 1.7.10.4