summaryrefslogtreecommitdiff
path: root/compiler/rename/RnUnbound.hs
Commit message (Collapse)AuthorAgeFilesLines
* 'forall' always a keyword, plus the dot type operatorVladislav Zavialov2019-02-151-12/+3
|
* Misleading msg with qualified imports "No module named X imported"Roland Senn2018-12-111-22/+28
| | | | | | | | | | | | | | | | | | | | To check whether a given module has been imported, we do the following: From the list of all qualified names we extract the distinct module names to a list of module names. Then we check whether the given module name is in this list of module names. Test Plan: make test TEST=T14225 Reviewers: mpickering, hvr, monoidal, osa1, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #14225 Differential Revision: https://phabricator.haskell.org/D5331
* Respect naming conventions in module RnUnbound.hs in fix for #15611Roland Senn2018-11-111-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The patch https://phabricator.haskell.org/D5284 didn't respect the local naming conventions in module compiler/rename/RnUnbound.hs: - Top level functions names are written in camelCase. - Local function names in where clauses are written as names_with_underscores. This patch restores these conventions. Test Plan: make test TESTS="T15611a T15611b" Reviewers: DavidEichmann, monoidal, hvr, mpickering, bgamari Reviewed By: mpickering Subscribers: rwbarton, carter GHC Trac Issues: #15611 Differential Revision: https://phabricator.haskell.org/D5308
* Fix for Trac #15611: Scope errors lie about what modules are imported.roland2018-11-041-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For the error message: Not in scope X.Y Module X does not export Y No module named ‘X’ is imported: there are 2 cases, where we don't show the last "no module named is imported" line: 1. If the module X has been imported. 2. If the module X is the current module. There are 2 subcases: 2.1 If the unknown module name is in a input source file, then we can use the getModule function to get the current module name. 2.2 If the unknown module name has been entered by the user in GHCi, then the getModule function returns something like "interactive:Ghci1", and we have to check the current module in the last added entry of the HomePackageTable. Test Plan: make test TESTS="T15611a T15611b" Reviewers: monoidal, hvr, thomie, dfeuer, bgamari, DavidEichmann Reviewed By: monoidal, DavidEichmann Subscribers: rwbarton, carter GHC Trac Issues: #15611 Differential Revision: https://phabricator.haskell.org/D5284
* Buglet in reporting out of scope errors in rulesSimon Peyton Jones2018-09-231-5/+6
| | | | | | | | Most out of scope errors get reported by the type checker these days, but not all. Example, the function on the LHS of a RULE. Trace #15659 pointed out that this less-heavily-used code path produce a "wacky" error message. Indeed so. Easily fixed.
* compiler: introduce custom "GhcPrelude" PreludeHerbert Valerio Riedel2017-09-191-0/+2
| | | | | | | | | | | | | | | | | | This switches the compiler/ component to get compiled with -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all modules. This is motivated by the upcoming "Prelude" re-export of `Semigroup((<>))` which would cause lots of name clashes in every modulewhich imports also `Outputable` Reviewers: austin, goldfire, bgamari, alanz, simonmar Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari Differential Revision: https://phabricator.haskell.org/D3989
* Split up RnEnv into 4 modules, RnUnbound, RnUtils and RnFixityMatthew Pickering2017-04-121-0/+340
Summary: RnEnv contains functions which convertn RdrNames into Names. RnUnbound contains helper functions for reporting and creating unbound variables. RnFixity contains code which maintains the fixity environent whilst renaming. RnUtils contains the other stuff in RnEnv. Reviewers: austin, goldfire, bgamari Subscribers: goldfire, rwbarton, thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3436