- Jul 05, 2018
-
-
Ryan Scott authored
Summary: `nlHsFunTy` wasn't parenthesizing its arguments at all, which led to `-ddump-deriv` producing incorrectly parenthesized types (since it uses `nlHsFunTy` to construct those types), as demonstrated in #15307. Fix this by changing `nlHsFunTy` to add parentheses à la `ppr_ty`: always parenthesizing the argument type with function precedence, and recursively processing the result type, adding parentheses for each function type it encounters. Test Plan: make test TEST=T14578 Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15307 Differential Revision: https://phabricator.haskell.org/D4890
-
Simon Peyton Jones authored
There are several changes here. * TcInteract has gotten too big, so I moved all the class-instance matching out of TcInteract into a new module ClsInst. It parallels the FamInst module. The main export of ClsInst is matchGlobalInst. This now works in TcM not TcS. * A big reason to make matchGlobalInst work in TcM is that we can then use it from TcValidity.checkSimplifiableClassConstraint. That extends checkSimplifiableClassConstraint to work uniformly for built-in instances, which means that we now get a warning if we have givens (Typeable x, KnownNat n); see Trac #15322. * This change also made me refactor LookupInstResult, in particular by adding the InstanceWhat field. I also changed the name of the type to ClsInstResult. Then instead of matchGlobalInst reporting a staging error (which is inappropriate for the call from TcValidity), we can do so in TcInteract.checkInstanceOK. * In TcValidity, we now check quantified constraints for termination. For example, this signature should be rejected: f :: (forall a. Eq (m a) => Eq (m a)) => blah as discussed in Trac #15316. The main change here is that TcValidity.check_pred_help now uses classifyPredType, and has a case for ForAllPred which it didn't before. This had knock-on refactoring effects in TcValidity.
-
- Jul 04, 2018
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
See Note [Typeable for Nat and Symbol] in TcInteract, which I added after discussion on Trac #15322
-
Ömer Sinan Ağacan authored
This reverts commit 6bb0c5db. See discussion in D4905.
-
Ömer Sinan Ağacan authored
-
Ömer Sinan Ağacan authored
-
This is a one line fix (and a note) that fixes four tickets, #15007, #15321 and #15202, #15314 The issue was that errors caused by illegal candidates (according to GHC stage or being internal names) were leaking to the user, causing bewildering error messages. If a candidate causes the type checker to error, it is not a valid hole fit, and should be discarded. As mentioned in #15321, this can cause a pattern of omissions, which might be hard to discover. A better approach would be to gather the error messages, and ask users to report them as GHC bugs. This will be implemented in a subsequent change. Reviewers: bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #15007, #15321, #15202, #15314 Differential Revision: https://phabricator.haskell.org/D4909
-
Ömer Sinan Ağacan authored
`extractSubTerms` (which is extracting pointer and non-pointer fields of a closure) was computing the alignment incorrectly when aligning a 64-bit value (e.g. a Double) on i386 by aligning it to 64-bits instead of to word size (32-bits). This is documented in `mkVirtHeapOffsetsWithPadding`: > Align the start offset (eg, 2-byte value should be 2-byte aligned). > But not more than to a word. Fixes #15061 Test Plan: Validated on both 32-bit and 64-bit. 32-bit fails with various unrelated stat failures, but no actual test failures. Reviewers: hvr, bgamari Reviewed By: bgamari Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #15061 Differential Revision: https://phabricator.haskell.org/D4906
-
Ömer Sinan Ağacan authored
Details are not documented, only the high-level functions Reviewers: simonpj, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4911
-
- Jul 01, 2018
-
-
Ömer Sinan Ağacan authored
-
- Jun 29, 2018
-
-
Alan Zimmerman authored
A GADT declaration surrounded in parens does not det the con_forall field correctly. e.g. data MaybeDefault v where TestParens :: (forall v . (Eq v) => MaybeDefault v) Closes #15323
-
David Feuer authored
It shouldn't be necessary to lock the `MVar` closure on `tryReadMVar`, since it just reads one field of the structure and doesn't make any modifications. So let's not. Reviewers: bgamari, erikd, simonmar, fryguybob, osa1 Reviewed By: osa1 Subscribers: osa1, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4905
-
Gabor Greif authored
-
Ömer Sinan Ağacan authored
Reviewers: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4903
-
- Jun 28, 2018
-
-
Ömer Sinan Ağacan authored
Reviewers: simonmar, bgamari, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4893
-
Richard Eisenberg authored
Comments only: [ci skip]
-
- Jun 27, 2018
-
-
Ömer Sinan Ağacan authored
Remove unsafeCoerce introduced by a54c94f0 Reviewers: simonmar, bgamari Reviewed By: simonmar Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4901
-
Ömer Sinan Ağacan authored
Reviewers: simonmar, bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4892
-
Ömer Sinan Ağacan authored
-
- Jun 26, 2018
-
-
Simon Peyton Jones authored
...provoked by Trac #15308
-
Ömer Sinan Ağacan authored
-
Gabor Greif authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
The level numbers we were getting simply didn't obey the invariant (ImplicInv) in TcType Note [TcLevel and untouchable type variables] That leads to chaos. Easy to fix. I improved the documentation. I also added an assertion in TcSimplify that checks that level numbers go up by 1 as we dive inside implications, so that we catch the problem at source rather than than through its obscure consequences. That in turn showed up that TcRules was also generating constraints that didn't obey (ImplicInv), so I fixed that too. I have no idea what consequences were lurking behing that bug, but anyway now it's fixed. Hooray.
-
Alan Zimmerman authored
Make sure the original annotations are still accessible for a promoted type. Closes #15303
-
- Jun 25, 2018
-
-
Simon Peyton Jones authored
I wondered if some transformations (ticks) might be "innocuous", in the sense that they do not unlock a later transformation that does not occur in the same pass. If so, we could refrain from bumping the overall tick-count for such innocuous transformations, and perhaps terminate the simplifier one pass earlier. BUt alas I found that virtually nothing was innocuous! This commit just adds a Note to record what I learned, in case anyone wants to try again.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
... plus, reorder equations in toIfaceVar to improve legibility. No change in behaviour.
-
Simon Peyton Jones authored
See Trac #15205
-
Simon Peyton Jones authored
The refactoring here is driven by the ghastly mess described in comment:24 of Trac #1520. The overall goal is to simplify the kind-checking of typev-variable binders, and in particular to narrow the use of the "in-scope tyvar binder" stuff, which is needed only for associated types: see the new Note [Kind-checking tyvar binders for associated types] in TcHsType. Now * The "in-scope tyvar binder" stuff is done only in - kcLHsQTyVars, which is used for the LHsQTyVars of a data/newtype, or type family declaration. - tcFamTyPats, which is used for associated family instances; it now calls tcImplicitQTKBndrs, which in turn usese newFlexiKindedQTyVar * tcExpicitTKBndrs (which is used only for function signatures, data con signatures, pattern synonym signatures, and expression type signatures) now does not go via the "in-scope tyvar binder" stuff at all. While I'm still not happy with all this code, the code is generally simpler, and I think this is a useful step forward. It does cure the problem too. (It's hard to trigger the problem in vanilla Haskell code, because the renamer would normally use different names for nested binders, so I can't offer a test.)
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
As Trac #15289 showed, we were carrying on after a type error in a pattern synonym, and then crashing. This patch improves error handling for pattern synonyms. I also moved a bit of code from TcBinds into TcPatSyn, which helpfully narrows the API.
-
- Jun 24, 2018
-
-
Alan Zimmerman authored
-
- Jun 22, 2018
-
-
Roland Senn authored
Test Plan: "ghc -Wamp XXX.hs" should give "unrecognised warning flag" Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #11477 Differential Revision: https://phabricator.haskell.org/D4785
-
SantiM authored
protect mmaped addresses from writes after being initially manipulated Test Plan: ./validate Reviewers: bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: angerman, carlostome, rwbarton, thomie, carter GHC Trac Issues: #14069 Differential Revision: https://phabricator.haskell.org/D4817
-
Currently we belch some output to stderr but fail to abort, resulting in a busy loop. Fixes #15292. Test Plan: * Validate * try running program under environment without timerfd capabilities; ensure we don't busy-loop Reviewers: simonmar, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15929 Differential Revision: https://phabricator.haskell.org/D4875
-
Tao He authored
Previously, the `make clean` (as well as `make dist-clean`) doesn't work for ghc-heap and libiserv, due to these two libraries are not presented in the "packages" file. Test Plan: [skip ci] Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4878
-
Andreas Klebinger authored
We just update the docs to reflect the state of affairs. opt-cmm is run by the NCG backend so not always run. ddump-cmm-verbose only dumps passes of the cmm pipeline so it's not included there. [skip-ci] Test Plan: doc change Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4879
-