[commit: ghc] no-pred-ty: ConstraintKind -> ConstraintKinds (0bdafd5)

Simon Peyton Jones simonpj at microsoft.com
Wed Sep 7 17:23:14 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : no-pred-ty

http://hackage.haskell.org/trac/ghc/changeset/0bdafd5c357cba726347f56ebc940842e2d4fb59

>---------------------------------------------------------------

commit 0bdafd5c357cba726347f56ebc940842e2d4fb59
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Sep 7 16:22:46 2011 +0100

    ConstraintKind -> ConstraintKinds

>---------------------------------------------------------------

 compiler/main/DynFlags.hs       |    4 ++--
 compiler/parser/RdrHsSyn.lhs    |    4 ++--
 compiler/typecheck/TcHsType.lhs |    4 ++--
 compiler/typecheck/TcMType.lhs  |   10 +++++-----
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 6d15352..105c592 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -383,7 +383,7 @@ data ExtensionFlag
    | Opt_NPlusKPatterns
    | Opt_DoAndIfThenElse
    | Opt_RebindableSyntax
-   | Opt_ConstraintKind
+   | Opt_ConstraintKinds
    
    | Opt_StandaloneDeriving
    | Opt_DeriveDataTypeable
@@ -1862,7 +1862,7 @@ xFlags = [
   ( "NPlusKPatterns",                   AlwaysAllowed, Opt_NPlusKPatterns, nop ),
   ( "DoAndIfThenElse",                  AlwaysAllowed, Opt_DoAndIfThenElse, nop ),
   ( "RebindableSyntax",                 AlwaysAllowed, Opt_RebindableSyntax, nop ),
-  ( "ConstraintKind",                   AlwaysAllowed, Opt_ConstraintKind, nop ),
+  ( "ConstraintKinds",                  AlwaysAllowed, Opt_ConstraintKinds, nop ),
   ( "MonoPatBinds",                     AlwaysAllowed, Opt_MonoPatBinds, 
     \ turn_on -> when turn_on $ deprecate "Experimental feature now removed; has no effect" ),
   ( "ExplicitForAll",                   AlwaysAllowed, Opt_ExplicitForAll, nop ),
diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs
index e6824e7..1bad47d 100644
--- a/compiler/parser/RdrHsSyn.lhs
+++ b/compiler/parser/RdrHsSyn.lhs
@@ -787,12 +787,12 @@ checkDoAndIfThenElse guardExpr semiThen thenExpr semiElse elseExpr
 checkKindName :: Located FastString -> P (Located Kind)
 checkKindName (L l fs) = do
     pState <- getPState
-    let ext_enabled = xopt Opt_ConstraintKind (dflags pState)
+    let ext_enabled = xopt Opt_ConstraintKinds (dflags pState)
         is_kosher = fs == occNameFS (nameOccName constraintKindTyConName)
     if not ext_enabled || not is_kosher
      then parseErrorSDoc l (text "Unexpected named kind:"
                          $$ nest 4 (ppr fs)
-                         $$ if (not ext_enabled && is_kosher) then text "Perhaps you meant to use -XConstraintKind?" else empty)
+                         $$ if (not ext_enabled && is_kosher) then text "Perhaps you meant to use -XConstraintKinds?" else empty)
      else return (L l constraintKind)
 \end{code}
 
diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs
index 86b3a98..f243b3e 100644
--- a/compiler/typecheck/TcHsType.lhs
+++ b/compiler/typecheck/TcHsType.lhs
@@ -50,7 +50,7 @@ import NameSet
 import TysWiredIn
 import BasicTypes
 import SrcLoc
-import DynFlags ( ExtensionFlag(Opt_ConstraintKind) )
+import DynFlags ( ExtensionFlag( Opt_ConstraintKinds ) )
 import Util
 import UniqSupply
 import Outputable
@@ -373,7 +373,7 @@ kc_hs_type (HsKindSig ty k) = do
     return (HsKindSig ty' k, k)
 
 kc_hs_type (HsTupleTy (HsBoxyTuple _) tys) = do
-    fact_tup_ok <- xoptM Opt_ConstraintKind
+    fact_tup_ok <- xoptM Opt_ConstraintKinds
     if not fact_tup_ok
      then do tys' <- mapM kcLiftedType tys
              return (HsTupleTy (HsBoxyTuple liftedTypeKind) tys', liftedTypeKind)
diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs
index ae822b3..bde0729 100644
--- a/compiler/typecheck/TcMType.lhs
+++ b/compiler/typecheck/TcMType.lhs
@@ -1155,10 +1155,10 @@ check_pred_ty' _ _ctxt (IPPred _ ty) = checkValidMonoType ty
         -- Happily this is not an issue in the new constraint solver.
 
 check_pred_ty' dflags ctxt t@(TuplePred ts)
-  = do { checkTc (xopt Opt_ConstraintKind dflags)
+  = do { checkTc (xopt Opt_ConstraintKinds dflags)
                  (predTupleErr (predTreePredType t))
        ; mapM_ (check_pred_ty' dflags ctxt) ts }
-    -- This case will not normally be executed because without ConstraintKind
+    -- This case will not normally be executed because without -XConstraintKinds
     -- tuple types are only kind-checked as *
 
 check_pred_ty' dflags ctxt (IrredPred pred)
@@ -1178,7 +1178,7 @@ check_pred_ty' dflags ctxt (IrredPred pred)
     --
     -- In both cases it's OK if the predicate is actually a synonym, though.
     -- We'll also allow it if
-  = do checkTc (xopt Opt_ConstraintKind dflags)
+  = do checkTc (xopt Opt_ConstraintKinds dflags)
                (predIrredErr pred)
        case tcView pred of
          Just pred' -> 
@@ -1338,9 +1338,9 @@ eqPredTyErr  pred = ptext (sLit "Illegal equational constraint") <+> pprType pre
 predTyVarErr pred  = sep [ptext (sLit "Non type-variable argument"),
 			  nest 2 (ptext (sLit "in the constraint:") <+> pprType pred)]
 predTupleErr pred  = ptext (sLit "Illegal tuple constraint") <+> pprType pred $$
-                     parens (ptext (sLit "Use -XConstraintKind to permit this"))
+                     parens (ptext (sLit "Use -XConstraintKinds to permit this"))
 predIrredErr pred  = ptext (sLit "Illegal irreducible constraint") <+> pprType pred $$
-                     parens (ptext (sLit "Use -XConstraintKind to permit this"))
+                     parens (ptext (sLit "Use -XConstraintKinds to permit this"))
 predIrredBadCtxtErr pred = ptext (sLit "Illegal irreducible constraint") <+> pprType pred $$
                            ptext (sLit "in superclass/instance head context") <+>
                            parens (ptext (sLit "Use -XUndecidableInstances to permit this"))





More information about the Cvs-ghc mailing list