Rename Opt_Allow* to Opt_* to match the language names
authorIan Lynagh <igloo@earth.li>
Sat, 4 Aug 2007 15:54:25 +0000 (15:54 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 4 Aug 2007 15:54:25 +0000 (15:54 +0000)
compiler/main/DynFlags.hs
compiler/typecheck/Inst.lhs
compiler/typecheck/TcMType.lhs

index bbcf40d..ac8c606 100644 (file)
@@ -160,9 +160,9 @@ data DynFlag
    | Opt_WarnTabs
 
    -- language opts
-   | Opt_AllowOverlappingInstances
-   | Opt_AllowUndecidableInstances
-   | Opt_AllowIncoherentInstances
+   | Opt_OverlappingInstances
+   | Opt_UndecidableInstances
+   | Opt_IncoherentInstances
    | Opt_MonomorphismRestriction
    | Opt_MonoPatBinds
    | Opt_ExtendedDefaultRules          -- Use GHC's extended rules for defaulting
@@ -1162,11 +1162,11 @@ fFlags = [
   -- Deprecated in favour of -XPArr:
   ( "parr",                             Opt_PArr ),
   -- Deprecated in favour of -XOverlappingInstances:
-  ( "AllowOverlappingInstances",        Opt_AllowOverlappingInstances ),
+  ( "AllowOverlappingInstances",        Opt_OverlappingInstances ),
   -- Deprecated in favour of -XUndecidableInstances:
-  ( "AllowUndecidableInstances",        Opt_AllowUndecidableInstances ),
+  ( "AllowUndecidableInstances",        Opt_UndecidableInstances ),
   -- Deprecated in favour of -XIncoherentInstances:
-  ( "AllowIncoherentInstances",         Opt_AllowIncoherentInstances )
+  ( "AllowIncoherentInstances",         Opt_IncoherentInstances )
   ]
 
 
@@ -1222,9 +1222,9 @@ xFlags = [
   ( "MultiParamTypeClasses",            Opt_MultiParamTypeClasses ),
   ( "FunctionalDependencies",           Opt_FunctionalDependencies ),
   ( "GeneralizedNewtypeDeriving",       Opt_GeneralizedNewtypeDeriving ),
-  ( "OverlappingInstances",             Opt_AllowOverlappingInstances ),
-  ( "UndecidableInstances",             Opt_AllowUndecidableInstances ),
-  ( "IncoherentInstances",              Opt_AllowIncoherentInstances )
+  ( "OverlappingInstances",             Opt_OverlappingInstances ),
+  ( "UndecidableInstances",             Opt_UndecidableInstances ),
+  ( "IncoherentInstances",              Opt_IncoherentInstances )
   ]
 
 impliedFlags :: [(DynFlag, [DynFlag])]
index 04dd4a2..8195a82 100644 (file)
@@ -619,8 +619,8 @@ addLocalInst home_ie ispec
 getOverlapFlag :: TcM OverlapFlag
 getOverlapFlag 
   = do         { dflags <- getDOpts
-       ; let overlap_ok    = dopt Opt_AllowOverlappingInstances dflags
-             incoherent_ok = dopt Opt_AllowIncoherentInstances  dflags
+       ; let overlap_ok    = dopt Opt_OverlappingInstances dflags
+             incoherent_ok = dopt Opt_IncoherentInstances  dflags
              overlap_flag | incoherent_ok = Incoherent
                           | overlap_ok    = OverlapOk
                           | otherwise     = NoOverlap
index 955d45c..eee4ec2 100644 (file)
@@ -980,7 +980,7 @@ check_class_pred_tys dflags ctxt tys
        other         -> flexible_contexts || all tyvar_head tys
   where
     flexible_contexts = dopt Opt_FlexibleContexts dflags
-    undecidable_ok = dopt Opt_AllowUndecidableInstances dflags
+    undecidable_ok = dopt Opt_UndecidableInstances dflags
 
 -------------------------
 tyvar_head ty                  -- Haskell 98 allows predicates of form 
@@ -1175,7 +1175,7 @@ instTypeErr pp_ty msg
 \begin{code}
 checkValidInstance :: [TyVar] -> ThetaType -> Class -> [TcType] -> TcM ()
 checkValidInstance tyvars theta clas inst_tys
-  = do { undecidable_ok <- doptM Opt_AllowUndecidableInstances
+  = do { undecidable_ok <- doptM Opt_UndecidableInstances
 
        ; checkValidTheta InstThetaCtxt theta
        ; checkAmbiguity tyvars theta (tyVarsOfTypes inst_tys)