diff options
| author | Matthew Yacavone <matthew@yacavone.net> | 2018-10-27 14:01:42 -0400 |
|---|---|---|
| committer | Richard Eisenberg <rae@cs.brynmawr.edu> | 2018-10-27 14:54:56 -0400 |
| commit | 512eeb9bb9a81e915bfab25ca16bc87c62252064 (patch) | |
| tree | 803e752c6907fdfc89a5f71e6bfda04d7ef86bea /compiler/rename/RnUtils.hs | |
| parent | 23956b2ada690c78a134fe6d149940c777c7efcc (diff) | |
| download | haskell-512eeb9bb9a81e915bfab25ca16bc87c62252064.tar.gz | |
More explicit foralls (GHC Proposal 0007)
Allow the user to explicitly bind type/kind variables in type and data
family instances (including associated instances), closed type family
equations, and RULES pragmas. Follows the specification of GHC
Proposal 0007, also fixes #2600. Advised by Richard Eisenberg.
This modifies the Template Haskell AST -- old code may break!
Other Changes:
- convert HsRule to a record
- make rnHsSigWcType more general
- add repMaybe to DsMeta
Includes submodule update for Haddock.
Test Plan: validate
Reviewers: goldfire, bgamari, alanz
Subscribers: simonpj, RyanGlScott, goldfire, rwbarton,
thomie, mpickering, carter
GHC Trac Issues: #2600, #14268
Differential Revision: https://phabricator.haskell.org/D4894
Diffstat (limited to 'compiler/rename/RnUtils.hs')
| -rw-r--r-- | compiler/rename/RnUtils.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rename/RnUtils.hs b/compiler/rename/RnUtils.hs index 0451e288be..2f27720ee5 100644 --- a/compiler/rename/RnUtils.hs +++ b/compiler/rename/RnUtils.hs @@ -244,11 +244,14 @@ warnUnused1 flag fld_env name = when (reportable name occ) $ addUnusedWarning flag occ (nameSrcSpan name) - (text "Defined but not used") + (text $ "Defined but not used" ++ opt_str) where occ = case lookupNameEnv fld_env name of Just (fl, _) -> mkVarOccFS fl Nothing -> nameOccName name + opt_str = case flag of + Opt_WarnUnusedTypePatterns -> " on the right hand side" + _ -> "" warnUnusedGRE :: GlobalRdrElt -> RnM () warnUnusedGRE gre@(GRE { gre_name = name, gre_lcl = lcl, gre_imp = is }) |
