- Jun 17, 2018
-
-
sgillespie authored
If a module cannot be found because it is ignored or from an unusable package, report this to the user and the reason it is unusable. Currently, GHC displays the standard "Cannot find module error". For example: ``` <no location info>: error: Could not find module ‘Control.Monad.Random’ Perhaps you meant Control.Monad.Reader (from mtl-2.2.2) Control.Monad.Cont (from mtl-2.2.2) Control.Monad.Error (from mtl-2.2.2) ``` GHC does, however, indicate unusable/ignored packages with the -v flag: ``` package MonadRandom-0.5.1-1421RgpXdhC8e8UI7D3emA is unusable due to missing dependencies: fail-4.9.0.0-BAHmj60kS5K7NVhhKpm9J5 ``` With this change, I took that message and added it to the output of the "Cannot find module" message. Reviewers: bgamari, dfeuer Reviewed By: bgamari Subscribers: Phyx, dfeuer, rwbarton, thomie, carter GHC Trac Issues: #4806 Differential Revision: https://phabricator.haskell.org/D4783
-
filterImports needed a small adjustment to correctly handle record field definitions arising from modules with DuplicateRecordFields enabled. Previously hiding fields was not possible with DuplicateRecordFields enabled. Test Plan: new test rename/should_compile/T14487 Reviewers: bgamari Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #14487 Differential Revision: https://phabricator.haskell.org/D4805
-
Ben Gamari authored
Due to #15061.
-
Ben Gamari authored
Due to #15063.
-
Ben Gamari authored
See #15281
-
Ben Gamari authored
-
Ben Gamari authored
This reverts commit 86210b23.
-
According to an accepted proposal https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/002 4-no-kind-vars.rst With -Wcompat, warn if a kind variable is brought into scope implicitly in a type with an explicit forall. This applies to type signatures and to other contexts that allow a forall with the forall-or-nothing rule in effect (for example, class instances). Test Plan: Validate Reviewers: goldfire, hvr, bgamari, RyanGlScott Reviewed By: goldfire Subscribers: RyanGlScott, rwbarton, thomie, carter GHC Trac Issues: #15264 Differential Revision: https://phabricator.haskell.org/D4834
-
Fixes #12970 and will provide a reasonable migration path for the eventual remove of this function. Test Plan: Validate Reviewers: ekmett, hvr Subscribers: rwbarton, thomie, carter GHC Trac Issues: #12970 Differential Revision: https://phabricator.haskell.org/D4857
-
Ben Gamari authored
This appears to inexplicably break the OS X build, which fails with: ``` make[1]: *** No rule to make target `utils/unlit/fs.c', needed by `utils/unlit/dist/build/.depend.c_asm'. Stop. make[1]: *** Waiting for unfinished jobs.... make: *** [all] Error 2 ``` This reverts commit 8ee9c574.
-
Sylvain Henry authored
Until now GHC only supported basic constant folding (lit op lit, expr op 0, etc.). This patch uses laws of +/-/* (associativity, commutativity, distributivity) to support some constant folding into nested expressions. Examples of new transformations: - simple nesting: (10 + x) + 10 becomes 20 + x - deep nesting: 5 + x + (y + (z + (t + 5))) becomes 10 + (x + (y + (z + t))) - distribution: (5 + x) * 6 becomes 30 + 6*x - simple factorization: 5 + x + (x + (x + (x + 5))) becomes 10 + (4 *x) - siblings: (5 + 4*x) - (3*x + 2) becomes 3 + x Test Plan: validate Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie GHC Trac Issues: #9136 Differential Revision: https://phabricator.haskell.org/D2858 (cherry picked from commit fea04def)
-
- Jun 16, 2018
-
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
As pointed out in #12951, this was a temporary measure to allow GHC to be bootstrapped on Windows with GHC 7.10. This release is now out of our bootstrap support window so let's remove it.
-
Azel authored
Fixes #15134. Reviewers: dfeuer, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15134 Differential Revision: https://phabricator.haskell.org/D4737
-
Ben Gamari authored
-
Zubin authored
Preserve HsPars while typechecking Test Plan: T15242 Reviewers: bgamari, alanz, simonpj Reviewed By: alanz, simonpj Subscribers: simonpj, AndreasK, rwbarton, thomie, carter GHC Trac Issues: #15242 Differential Revision: https://phabricator.haskell.org/D4822
-
Test Plan: Validate using LLVM assembler Reviewers: carter, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #15207 Differential Revision: https://phabricator.haskell.org/D4781
-
Test Plan: Validate on i386 Reviewers: simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15255 Differential Revision: https://phabricator.haskell.org/D4855
-
Test Plan: Validate Reviewers: hvr Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15062 Differential Revision: https://phabricator.haskell.org/D4854
-
Test Plan: ./validate Reviewers: bgamari Subscribers: rwbarton, thomie, erikd, carter GHC Trac Issues: #15257 Differential Revision: https://phabricator.haskell.org/D4853
-
Richard Eisenberg authored
This is a small change in user-facing behavior. When we have a unification variable left over in a CUSK, we previously would issue an error. But, we can just quantify. This also teaches kcLHsQTyVars to use quantifyTyVars instead of its own, ad-hoc quantification scheme. Fixes #15273. test case: polykinds/T11648b
-
- Jun 15, 2018
-
-
Sylvain Henry authored
Add support for built-in Natural literals in Core. - Replace MachInt,MachWord, LitInteger, etc. with a single LitNumber constructor with a LitNumType field - Support built-in Natural literals - Add desugar warning for negative literals - Move Maybe(..) from GHC.Base to GHC.Maybe for module dependency reasons This patch introduces only a few rules for Natural literals (compared to Integer's rules). Factorization of the built-in rules for numeric literals will be done in another patch as this one is already big to review. Test Plan: validate test build with integer-simple Reviewers: hvr, bgamari, goldfire, Bodigrim, simonmar Reviewed By: bgamari Subscribers: phadej, simonpj, RyanGlScott, carter, hsyl20, rwbarton, thomie GHC Trac Issues: #14170, #14465 Differential Revision: https://phabricator.haskell.org/D4212
-
Test Plan: ./validate Reviewers: bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #13833 Differential Revision: https://phabricator.haskell.org/D4823
-
Test Plan: new tests rename/should_compile/{T14747,T15149} Reviewers: simonpj, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14747, #15149 Differential Revision: https://phabricator.haskell.org/D4821
-
Ben Gamari authored
Fixes #15040. Reviewers: bgamari, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4772
-
Tao He authored
This patch adds "quantified constraint" context in error message when UndecidableInstances checking fails for quantified constraints. See Trac #15231:comment#1. This patch also pretty-prints the instance head for better error messages. Test Plan: make test TEST="T15231" Reviewers: bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #15231 Differential Revision: https://phabricator.haskell.org/D4819
-
Matthew Pickering authored
Reviewers: adamgundry, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4826
-
Unicode characters in Parser.y cause build failures on systems where the locale does not support Unicode. See https://mail.haskell.org/pipermail/ghc-devs/2018-June/015874.html Test Plan: ./validate Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, mpickering, carter Differential Revision: https://phabricator.haskell.org/D4850
-
Ben Gamari authored
This seems to fix a number of segmentation faults.
-
Ben Gamari authored
There are some rather suspicious failures in the 64-bit case. See #15184 for details.
-
The docs said that it took a file argument, as in `-dth-dec-file=<file>`, but it does not take a file argument!
-
Ben Gamari authored
Lest we end up with a non-functional user/group lookup, resulting in #15230.
-
Simon Peyton Jones authored
Consider (Trac #15215) data T a = MkT ... data S a = ...T...MkT.... If there is an error in the definition of 'T' we add a "fake type constructor" to the type environment, so that we can continue to typecheck 'S'. But we /were not/ adding a fake anything for 'MkT' and so there was an internal error when we met 'MkT' in the body of 'S'. The fix is to add fake tycons for all the 'implicits' of 'T'. This is done by mk_fake_tc in TcTyClsDecls.checkValidTyCl, which now returns a /list/ of TyCons rather than just one. On the way I did some refactoring: * Rename TcTyDecls.tcAddImplicits to tcAddTyConsToGblEnv and make it /include/ the TyCons themeselves as well as their implicits * Some incidental refactoring about tcRecSelBinds. The main thing is that I've avoided creating a HsValBinds that we immediately decompose. That meant moving some deck chairs around. NB: The new error message for the regression test T15215 has the opaque error "Illegal constraint in a type:", flagged in Trac #14845. But that's the fault of the latter ticket. The fix here not to blame.
-
Simon Peyton Jones authored
This is a continuation of commit 9d600ea6 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Fri Jun 1 16:36:57 2018 +0100 Expand type synonyms when Linting a forall That patch pointed out that there was a lurking hole in typeKind, where it could return an ill-scoped kind, because of not expanding type synonyms enough. This patch fixes it, quite nicely * Use occCheckExpand to expand those synonyms (it was always designed for that exact purpose), and call it from Type.typeKind CoreUtils.coreAltType CoreLint.lintTYpe * Consequently, move occCheckExpand from TcUnify.hs to Type.hs, and generalise it to take a list of type variables. I also tidied up lintType a bit.
-
Simon Peyton Jones authored
This patch uses (forall (a::*). a) for the type to use when recovering from an error in a binding. Previously (Trac #15276) we had (forall r (a :: TYPE r). a), which is ill-kinded. It's quite hard to provoke an error arising from this, because it only happens in programs that have a type error anyway, but in a subequent patch I make typeKind fall over if it returns an ill-scoped kind, and that makes ghci/scripts/T13202 crash without this fix.
-
Sergei Trofimovich authored
Fix UNREG build failure for 32-bit targets. This change is an equivalent of commit 0238a6c7 ("UNREG: PprC: add support for of W32 literals") The change allows combining two subwords into one word on 32-bit targets. Tested on nios2-unknown-linux-gnu. GHC Trac Issues: #15237 Signed-off-by:
Sergei Trofimovich <slyfox@gentoo.org>
-
- Jun 14, 2018
-
-
Tao He authored
The ghc.mk file is generated by `./boot` and should be excluded from git via .gitignore, since the file `ghc.mk` may have different line ends on windows. The file GNUmakefile and dir dist, dist-install should also be excluded via .gitignore, just as other libraries. Test Plan: [skip ci] Reviewers: bgamari Reviewed By: bgamari Subscribers: osa1, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4814
-
Nathan Collins authored
See https://ghc.haskell.org/trac/ghc/ticket/12578.
-
Ben Gamari authored
-