diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-05-17 13:44:23 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2023-05-17 16:30:54 -0400 |
commit | 0190e9fe6f6f5989fbd016881388c20a7fde3bcb (patch) | |
tree | 34701dd8040defeb0907558c55843f066f0ba45d /compiler/GHC/Driver/Flags.hs | |
parent | 2972fd66f91cb51426a1df86b8166a067015e231 (diff) | |
download | haskell-0190e9fe6f6f5989fbd016881388c20a7fde3bcb.tar.gz |
Extension shuffling (#23291)wip/sand-witch/modern-STV-extension-shuffling
Where introduced 4 new extensions:
- PatternSignatures
- ExtendedForAllScope
- MethodTypeVariables
- ImplicitForAll
Tasks of ScopedTypeVariables extension were distributed between
PatternSignatures, ExtendedForAllScope and MethodTypeVariables according
to the proposal. Now ScopedTypeVaribles only implies these three exntesions.
Extension ImplicitForAll saves current behavior. NoImplicitForAll
disables implicit bounding of type variables in many contexts.
Was introduced one new warning option: -Wpattern-signature-binds
It warns when pattern signature binds into scope new type variable. For
example:
f (a :: t) = ...
Diffstat (limited to 'compiler/GHC/Driver/Flags.hs')
-rw-r--r-- | compiler/GHC/Driver/Flags.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs index 759c137eb5..8d33c63c95 100644 --- a/compiler/GHC/Driver/Flags.hs +++ b/compiler/GHC/Driver/Flags.hs @@ -637,6 +637,7 @@ data WarningFlag = | Opt_WarnLoopySuperclassSolve -- Since 9.6 | Opt_WarnTermVariableCapture -- Since 9.8 | Opt_WarnMissingRoleAnnotations -- Since 9.8 + | Opt_WarnPatternSignatureBinds -- Since 9.8 deriving (Eq, Ord, Show, Enum) -- | Return the names of a WarningFlag @@ -744,6 +745,7 @@ warnFlagNames wflag = case wflag of Opt_WarnLoopySuperclassSolve -> "loopy-superclass-solve" :| [] Opt_WarnTypeEqualityRequiresOperators -> "type-equality-requires-operators" :| [] Opt_WarnMissingRoleAnnotations -> "missing-role-annotations" :| [] + Opt_WarnPatternSignatureBinds -> "pattern-signature-binds" :| [] -- ----------------------------------------------------------------------------- -- Standard sets of warning options |