Commit dcc4b2de authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot
Browse files

Remove deprecated -XGenerics and -XMonoPatBinds

They have no effect since 2011 (GHC 7.2/7.4),
commits cb698570 and 49dbe605.
parent 18e53386
Pipeline #31234 canceled with stages
......@@ -1612,10 +1612,7 @@ mkFunTyCon name binders rep_nm
tcRepName = rep_nm
}
-- | This is the making of an algebraic 'TyCon'. Notably, you have to
-- pass in the generic (in the -XGenerics sense) information about the
-- type constructor - you can get hold of it easily (see Generics
-- module)
-- | This is the making of an algebraic 'TyCon'.
mkAlgTyCon :: Name
-> [TyConBinder] -- ^ Binders of the 'TyCon'
-> Kind -- ^ Result kind
......
......@@ -1342,8 +1342,6 @@ languageExtensions Nothing
-- http://www.haskell.org/pipermail/haskell-prime/2011-January/003335.html
(languageExtensions (Just Haskell2010))
-- NB: MonoPatBinds is no longer the default
languageExtensions (Just Haskell98)
= [LangExt.ImplicitPrelude,
-- See Note [When is StarIsType enabled]
......@@ -2843,14 +2841,6 @@ dynamic_flags_deps = [
++ map (mkFlag turnOff "XNo" unSetExtensionFlag) xFlagsDeps
++ map (mkFlag turnOn "X" setLanguage ) languageFlagsDeps
++ map (mkFlag turnOn "X" setSafeHaskell ) safeHaskellFlagsDeps
++ [ make_dep_flag defFlag "XGenerics"
(NoArg $ return ())
("it does nothing; look into -XDefaultSignatures " ++
"and -XDeriveGeneric for generic programming support.")
, make_dep_flag defFlag "XNoGenerics"
(NoArg $ return ())
("it does nothing; look into -XDefaultSignatures and " ++
"-XDeriveGeneric for generic programming support.") ]
-- | This is where we handle unrecognised warning flags. We only issue a warning
-- if -Wunrecognised-warning-flags is set. See #11429 for context.
......@@ -3371,8 +3361,6 @@ fLangFlagsDeps = [
(deprecatedForExtension "BangPatterns"),
depFlagSpec' "monomorphism-restriction" LangExt.MonomorphismRestriction
(deprecatedForExtension "MonomorphismRestriction"),
depFlagSpec' "mono-pat-binds" LangExt.MonoPatBinds
(deprecatedForExtension "MonoPatBinds"),
depFlagSpec' "extended-default-rules" LangExt.ExtendedDefaultRules
(deprecatedForExtension "ExtendedDefaultRules"),
depFlagSpec' "implicit-params" LangExt.ImplicitParams
......@@ -3511,9 +3499,6 @@ xFlagsDeps = [
flagSpec "MagicHash" LangExt.MagicHash,
flagSpec "MonadComprehensions" LangExt.MonadComprehensions,
flagSpec "MonoLocalBinds" LangExt.MonoLocalBinds,
depFlagSpecCond "MonoPatBinds" LangExt.MonoPatBinds
id
"Experimental feature now removed; has no effect",
flagSpec "MonomorphismRestriction" LangExt.MonomorphismRestriction,
flagSpec "MultiParamTypeClasses" LangExt.MultiParamTypeClasses,
flagSpec "MultiWayIf" LangExt.MultiWayIf,
......
......@@ -9,10 +9,8 @@
-XAutoDeriveTypeable
-XDoAndIfThenElse
-XDoRec
-XGenerics
-XImplicitPrelude
-XJavaScriptFFI
-XMonoPatBinds
-XMonomorphismRestriction
-XParallelArrays
-XPatternGuards
......@@ -69,7 +67,6 @@
-firrefutable-tuples
-fmax-errors
-fmax-pmcheck-iterations
-fmono-pat-binds
-fmonomorphism-restriction
-fnum-constant-folding
-fpre-inlining
......
......@@ -29,7 +29,6 @@ data Extension
| IncoherentInstances
| UndecidableSuperClasses
| MonomorphismRestriction
| MonoPatBinds
| MonoLocalBinds
| RelaxedPolyRec -- Deprecated
| ExtendedDefaultRules -- Use GHC's extended rules for defaulting
......
......@@ -54,5 +54,6 @@ expectedCabalOnlyExtensions = ["Generics",
"Safe",
"Unsafe",
"Trustworthy",
"MonadFailDesugaring"
"MonadFailDesugaring",
"MonoPatBinds"
]
GenDeprecated.hs:1:14:
Warning: -XGenerics is deprecated: it does nothing; look into -XDefaultSignatures and -XDeriveGeneric for generic programming support.
{-# LANGUAGE BangPatterns, NoMonoLocalBinds, NoMonoPatBinds #-}
{-# LANGUAGE BangPatterns, NoMonoLocalBinds #-}
module T4498 where
......
{-# LANGUAGE NoMonoPatBinds #-}
-- Disable experimental monomorphic pattern bindings
-- Nasty test for type signatures
-- In both groups of declarations below, the type variables 'a' and 'b'
-- end up being unified together.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment