- 29 Sep, 2017 1 commit
-
-
Ben Gamari authored
This trailing comma snuck in in a recent patch. There is nothing wrong with the comma; it's perfectly valid C99, yet nevertheless Mac OS X's dtrace utility chokes on it with, dtrace: failed to compile script rts/RtsProbes.d: "includes/rts/EventLogFormat.h", line 245: syntax error near "}" make[1]: *** [rts/dist/build/RtsProbes.h] Error 1 (cherry picked from commit be514a69)
-
- 28 Sep, 2017 1 commit
-
-
Simon Marlow authored
The strictness signature for a data con wrapper wasn't including any dictionary arguments, which meant that bangs on the fields of a constructor with an existential context would be moved to the wrong fields. See T14290 for an example. Test Plan: * New test T14290 * validate Reviewers: simonpj, niteria, austin, bgamari, erikd Reviewed By: simonpj, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14290 Differential Revision: https://phabricator.haskell.org/D4040 (cherry picked from commit 5935acdb)
-
- 27 Sep, 2017 4 commits
-
-
Ben Gamari authored
Fixes #13929. (cherry picked from commit 018c40fb)
-
Ben Gamari authored
Test Plan: Validate Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #13929 Differential Revision: https://phabricator.haskell.org/D3993 (cherry picked from commit d86b237d)
-
Richard Eisenberg authored
test case: typecheck/should_fail/T13929 (cherry picked from commit fa626f3b)
-
Tamar Christina authored
Summary: It seems the call that caused issues with the gcc wrapper before was needed for the ghci wrapper in order for the child process to be the one handling console events. This code slightly refactors the wrappers to make sure only ghci calls FreeConsole and nothing else. Test Plan: ./validate , open ghci.exe press ctrl+c Reviewers: RyanGlScott, austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd GHC Trac Issues: #14150 Differential Revision: https://phabricator.haskell.org/D4028 (cherry picked from commit 3ec579d5)
-
- 26 Sep, 2017 5 commits
-
-
niteria authored
If you go to https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/index.html the window title has `<release>` in it. I don't understand how it all works, but inspired by the line below which produces a correct string in the docs I just blindly changed it in the same way. Cabal appears to have the same problem. Test Plan: it'd be nice if I could check the result on harbormaster, can I? Reviewers: thomie, bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, simonmar Differential Revision: https://phabricator.haskell.org/D3458
-
Simon Peyton Jones authored
This bug was shown up by Trac #14237. It turned out to be an outright error in TcSimplify.neededEvVars, easily fixed. I improved the comments. (cherry picked from commit 1db0f4a4)
-
Simon Peyton Jones authored
For reasons explained in TcHsType Note [Extra-constraint holes in partial type signatures], if we had f :: (_) => blahs and the '_' was filled in by more than a 62-tuple of contraints, GHC crashed. The same Note explains the hacky solution I have adopted to evade this. Maybe there is some better way, but I couldn't see one that didn't involve a great deal of work. And the problem is a very narrow one! If the hack bites us we'll need to think again. (cherry picked from commit 3c74a512)
-
Ben Gamari authored
Test Plan: Read it Reviewers: dfeuer, goldfire, austin, hvr Reviewed By: dfeuer Subscribers: rwbarton, thomie GHC Trac Issues: #14199 Differential Revision: https://phabricator.haskell.org/D3991 (cherry picked from commit 6de1a5a9)
-
Ben Gamari authored
-
- 19 Sep, 2017 16 commits
-
-
Ben Gamari authored
This reverts commit eb870ae0. This reverts commit 6a024a55. There was some disagreement in #11198 regarding whether this patch was in fact the right solution to the issue at hand.
-
Alan Zimmerman authored
Summary: Previously the renamed source decls only were dumped, now the imports, exports and doc_hdr are too. Test Plan: ./validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14197 Differential Revision: https://phabricator.haskell.org/D3949 (cherry picked from commit 2fe6f6ba)
-
Ben Gamari authored
Previously SetLevels.lvlMFE would fail to substitute in ticks, unlike lvlExpr. This lead to #13481. Fix this. Test Plan: `make test TEST=T12622 WAY=ghci` Reviewers: austin, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #13481 Differential Revision: https://phabricator.haskell.org/D3920 (cherry picked from commit cd857dd4)
-
Ben Gamari authored
Test Plan: Build, program with `-eventlog`, try running with `+RTS -h` Reviewers: austin, erikd, simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #14096 Differential Revision: https://phabricator.haskell.org/D3922 (cherry picked from commit 24e50f98)
-
Ben Gamari authored
Reviewers: austin, erikd, simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #14096 Differential Revision: https://phabricator.haskell.org/D3923 (cherry picked from commit 822abbb1)
-
David Feuer authored
The renamer wasn't able to deal with more than a couple strict patterns in a row with `ApplicativeDo` when using the heuristic splitter. Update it to work with them properly. Reviewers: simonmar, austin, bgamari, hvr Reviewed By: simonmar Subscribers: RyanGlScott, lippling, rwbarton, thomie GHC Trac Issues: #14163 Differential Revision: https://phabricator.haskell.org/D3900 (cherry picked from commit 011e15aa)
-
Ben Gamari authored
As pointed out in #14199 these are rather non-trivial; extra documentation is in order. [skip ci] Test Plan: Read it Reviewers: dfeuer, austin, hvr Subscribers: rwbarton, thomie GHC Trac Issues: #14199 Differential Revision: https://phabricator.haskell.org/D3943 (cherry picked from commit f9bf621c)
-
Simon Peyton Jones authored
I dug more into how #14158 started working. I temporarily reverted the patch that "fixed" it, namely commit a6c448b4 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Mon Aug 28 17:33:59 2017 +0100 Small refactor of getRuntimeRep Sure enough, there was a real bug, described in the new TcExpr Note [Visible type application zonk] In general, syntactic substituion should be kind-preserving! Maybe we should check that invariant... (cherry picked from commit 2c133b67)
-
Simon Peyton Jones authored
This bug was revealed by Trac #14162. In a GADT-style data-family instance we ended up a data constructor whose type mentioned an out-of-scope variable. (This variable was in the kind of a variable in the kind of a variable.) Only Lint complained about this (actually only when the data constructor was injected into the bindings by CorePrep). So it doesn't matter much -- but it's a solid bug and might bite us some day. It took me quite a while to unravel because the test case was itself quite tricky. But the fix is easy; just add a missing binding to the substitution we are building up. It's in the regrettably-subtle mkGADTVars function. (cherry picked from commit 3a27e34f)
-
Alan Zimmerman authored
Prior to this, in the RenamedSource for module Renaming.RenameInExportedType ( MyType (NT) ) where data MyType = MT Int | NT The (NT) was given the location of MyType earlier on the line in the export list. Also the location was discarded for any field labels, and replaced with a `noLoc`. Test Plan: ./validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14189 Differential Revision: https://phabricator.haskell.org/D3968 (cherry picked from commit 9498c50e)
-
Ryan Scott authored
`isIrrefutableHsPat` should always return `False` for unboxed sum patterns (`SumPat`s), since they always have at least one other corresponding pattern of the same arity (since the minimum arity for a `SumPat` is 2). Failure to do so causes incorrect code to be generated for pattern synonyms that use unboxed sums, as shown in #14228. Test Plan: make test TEST=T14228 Reviewers: austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #14228 Differential Revision: https://phabricator.haskell.org/D3951 (cherry picked from commit f4d50a0e)
-
Ben Gamari authored
I prematurely committed the D3892 before adding a Note. Fix this. (cherry picked from commit 6f1ccaa5)
-
Ben Gamari authored
Reviewers: austin, goldfire Subscribers: rwbarton, thomie GHC Trac Issues: #14128 Differential Revision: https://phabricator.haskell.org/D3890 (cherry picked from commit 248ad303)
-
Ben Gamari authored
Consider that we have two modules, A and B, both with hs-boot files, * A.hs contains a SOURCE import of B * B.hs-boot contains a SOURCE import of A * A.hs-boot declares an orphan instance * A.hs defines the orphan instance In this case, B's dep_orphs will contain A due to its SOURCE import of A. Consequently, A will contain itself in its imp_orphs due to its import of B. This fact would end up being recorded in A's interface file. This would then break the invariant asserted by calculateAvails that a module does not itself in its dep_orphs. This was the cause of #14128. The solution is to remove self-references from imp_orphs when constructing dep_orphs; we already did a similar thing for dep_mods. I believe we should do the same for dep_finsts, although I'm treating this as a separate bug. Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3892 (cherry picked from commit db3a8e16)
-
Richard Eisenberg authored
I believe this was fixed with the fix for #11198. (cherry picked from commit 9a549756)
-
Ben Gamari authored
-
- 31 Aug, 2017 1 commit
-
-
Richard Eisenberg authored
Previously, when canonicalizing (or unifying, in uType) a heterogeneous equality, we emitted a kind equality and used the resulting coercion to cast one side of the heterogeneous equality. While sound, this led to terrible error messages. (See the bugs listed below.) The problem is that using the coercion built from the emitted kind equality is a bit like a wanted rewriting a wanted. The solution is to keep heterogeneous equalities as irreducible. See Note [Equalities with incompatible kinds] in TcCanonical. This commit also removes a highly suspicious switch to FM_SubstOnly when flattening in the kinds of a type variable. I have no idea why this was there, other than as a holdover from pre-TypeInType. I've not left a Note because there is simply no reason I can conceive of that the FM_SubstOnly should be there. One challenge with this patch is that the emitted derived equalities might get emitted several times: when a heterogeneous equality is in an implication and then gets floated out from the implication, the Derived is present both in and out of the implication. This causes a duplicate error message. (Test case: typecheck/should_fail/T7368) Solution: track the provenance of Derived constraints and refuse to float out a constraint that has an insoluble Derived. Lastly, this labels one test (dependent/should_fail/RAE_T32a) as expect_broken, because the problem is really #12919. The different handling of constraints in this patch exposes the error. This fixes bugs #11198, #12373, #13530, and #13610. test cases: typecheck/should_fail/{T8262,T8603,tcail122,T12373,T13530,T13610} (cherry picked from commit 8e15e3d3)
-
- 29 Aug, 2017 3 commits
-
-
Tamar Christina authored
Summary: Fix the path decomposition error that occurs when the Symlink resolver fails. `Win32.try` throws an exception, so catch it and assume the path isn't a symlink to use the old behavior. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14159 Differential Revision: https://phabricator.haskell.org/D3891 (cherry picked from commit 3c6b2fc3)
-
Simon Peyton Jones authored
Instead of using a string argument, use HasDebugCallStack. (Oddly, some functions were using both!) Plus, use getRuntimeRep rather than getRuntimeRep_maybe when if the caller panics on Nothing. Less code, and a better debug stack. (cherry picked from commit a6c448b4)
-
Simon Peyton Jones authored
In tcDataConPat we were creating an ill-kinded substitution -- or at least one that is well kinded only after you have solved other equalities. THat led to a crash, because the instantiated data con type was ill-kinded. This patch guarantees that the instantiating substitution is well-kinded. Fixed Trac #14154 (cherry picked from commit 4455c86d)
-
- 25 Aug, 2017 9 commits
-
-
Simon Peyton Jones authored
Trac #14000 showed up two errors * In TcRnTypes.dropInsolubles we dropped all implications, which might contain the very insolubles we wanted to keep. This was an outright error, and is why the out-of-scope error was actually lost altogether in Trac #14000 * In TcSimplify.simplifyInfer, if there are definite (insoluble) errors, it's better to suppress the following ambiguity test, because the type may be bogus anyway. See TcSimplify Note [Quantification with errors]. This fix seems a bit clunky, but it'll do for now. (cherry picked from commit 452755de)
-
Dmitry Malikov authored
It seems to that double quotes is not escaped well at the moment. We'd noticed this with @alexbiehl during the work on https://github.com/haskell/haddock/pull/645 (cherry picked from commit e8fe12f8)
-
Ben Gamari authored
ld.gold is particularly picky that we declare all of our link dependencies on Nix. See #14022. Test Plan: Validate on Nix Reviewers: austin Subscribers: hvr, rwbarton, thomie GHC Trac Issues: #14022 Differential Revision: https://phabricator.haskell.org/D3787 (cherry picked from commit 0e3c1016)
-
Ryan Scott authored
Commit 2484d4da accidentally dropped a call to `isUnboundName` in an important location. This re-adds it. Fixes #13947. Test Plan: make test TEST=T13947 Reviewers: adamgundry, austin, bgamari Reviewed By: adamgundry Subscribers: rwbarton, thomie GHC Trac Issues: #13947 Differential Revision: https://phabricator.haskell.org/D3718 (cherry picked from commit 85ac65c5)
-
Richard Eisenberg authored
This is a straightforward fix -- there were just some omitted checks. test case: typecheck/should_fail/T11963 (cherry picked from commit 10d13b62)
-
Ryan Scott authored
Summary: Commit 3540d1e1 inadvertently broke the ability for newtype instances to be used as marshallable types in FFI declarations. The reason is a bit silly: an extra check was added for type synonyms with no type families on the RHS in `normalise_tc_app`, but this check would only skip over type families, not //data// families, since the predicate being used was `not . isTypeFamilyCon`. The fix is simple: just use `not . isFamilyCon` instead so that data families are also skipped by this check. Test Plan: make test TEST=T14125 Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: rwbarton, thomie GHC Trac Issues: #14125 Differential Revision: https://phabricator.haskell.org/D3865 (cherry picked from commit 6982ee99)
-
Edward Z. Yang authored
The parallel codepath was incorrectly retypechecking the hs-boot ModIface prior to typechecking the hs file, which was inconsistent with the non-parallel case. The non-parallel case gets it right: you don't want to retypecheck the hs-boot file itself (forwarding its declarations to hs) because you need it to be consistently knot-tied with itself when you compare the interfaces. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, simonpj, austin Reviewed By: bgamari Subscribers: duog, rwbarton, thomie GHC Trac Issues: #14075 Differential Revision: https://phabricator.haskell.org/D3815 (cherry picked from commit 4717ce86)
-
Ben Gamari authored
For some reason these weren't handled. I seem to remember thinking I had a reason for omitting them when writing the original patch, but I don't recall what that reason was at this point and clearly workers do show up in interface files. Test Plan: Validate against T14051 Reviewers: austin Subscribers: rwbarton, thomie, RyanGlScott GHC Trac Issues: #14051 Differential Revision: https://phabricator.haskell.org/D3805 (cherry picked from commit 5a7af95a)
-
Ben Gamari authored
Test Plan: Validate Reviewers: austin, erikd, simonmar, dfeuer Reviewed By: dfeuer Subscribers: rwbarton, andrewthad, thomie, dfeuer GHC Trac Issues: #13860, #13857 Differential Revision: https://phabricator.haskell.org/D3888 (cherry picked from commit 5f3d2d3b)
-