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/Rename/Module.hs | |
parent | 2972fd66f91cb51426a1df86b8166a067015e231 (diff) | |
download | haskell-wip/sand-witch/modern-STV-extension-shuffling.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/Rename/Module.hs')
-rw-r--r-- | compiler/GHC/Rename/Module.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs index 319dececdd..69e312a6e3 100644 --- a/compiler/GHC/Rename/Module.hs +++ b/compiler/GHC/Rename/Module.hs @@ -198,7 +198,7 @@ rnSrcDecls group@(HsGroup { hs_valds = val_decls, -- (H) Rename Everything else - (rn_rule_decls, src_fvs2) <- setXOptM LangExt.ScopedTypeVariables $ + (rn_rule_decls, src_fvs2) <- setXOptM LangExt.PatternSignatures $ rnList rnHsRuleDecls rule_decls ; -- Inside RULES, scoped type variables are on (rn_foreign_decls, src_fvs3) <- rnList rnHsForeignDecl foreign_decls ; |