summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Always do the worker/wrapper split for NOINLINEswip/ww-noinlineSebastian Graf2019-02-194-7/+19
| | | | | | | | | | Trac #10069 revealed that small NOINLINE functions didn't get split into worker and wrapper. This was due to `certainlyWillInline` saying that any unfoldings with a guidance of `UnfWhen` inline unconditionally. That isn't the case for NOINLINE functions, so we catch this case earlier now. Fixes #10069.
* Remove arc scriptsÖmer Sinan Ağacan2019-02-197-276/+0
|
* base: Document errno behaviour in haddocks.Niklas Hambüchen2019-02-191-1/+5
| | | Also add an implementation comment for details.
* Look through newtype wrappers (Trac #16254)Krzysztof Gogolewski2019-02-197-8/+81
| | | | | | exprIsConApp_maybe could detect that I# 10 is a constructor application, but not that Size (I# 10) is, because it was an application with a nontrivial argument.
* Make constructor wrappers inline only during the final phaseArnaud Spiwack2019-02-1914-61/+289
| | | | | | | For case-of-known constructor to continue triggering early, exprIsConApp_maybe is now capable of looking through lets and cases. See #15840
* Disable binder swap in OccurAnal (Trac #16288)Krzysztof Gogolewski2019-02-196-7/+78
|
* Fix Haddock comment for Integer datatypeAlexandre Baldé2019-02-181-2/+6
| | | | | | | | | | | | Move implementation notes for Integer to Haddock named section Revert documentation named chunk change [skip ci] Haddock's named chunk feature was not used correctly in this case, as it cannot export only parts of a Haddock top level comment. As such, it was removed and replaced by a message informing the end- user to browse the source code for detailed information.
* Uphold AvailTC Invariant for associated data famsAlec Theriault2019-02-182-26/+68
| | | | | | | | | | | | | | | | | | | | The AvailTC was not be upheld for explicit export module export lists when the module contains associated data families. module A (module A) where class C a where { data T a } instance C () where { data T () = D } Used to (incorrectly) report avails as `[C{C, T;}, T{D;}]`. Note that although `T` is exported, the avail where it is the parent does _not_ list it as its first element. This avail is now correctly listed as `[C{C, T;}, T{T, D;}]`. This was induces a [crash in Haddock][0]. See #16077. [0]: https://github.com/haskell/haddock/issues/979
* Fix warnings and fatal parsing errorsVladislav Zavialov2019-02-1722-156/+245
|
* Get rid of tcm_smart from TyCoMapperSimon Peyton Jones2019-02-174-55/+39
| | | | | | | | | | | | | | | Following a succession of refactorings of the type checker, culminating in the patch Make a smart mkAppTyM we have got rid of mkNakedAppTy etc. And that in turn meant that the tcm_smart field of the generic TyCoMapper (in Type.hs) was entirely unused. It was always set to True. So this patch just gets rid of it completely. Less code, less complexity, and more efficient because fewer higher-order function calls. Everyone wins. No change in behaviour; this does not cure any bugs!
* Testsuite: implement use_specs.Tamar Christina2019-02-172-0/+29
|
* Run some of Haddock's tests in the testsuiteAlec Theriault2019-02-163-0/+89
| | | | | | | | The 4 main testsuites in Haddock don't have many dependencies, but are regularly broken in small ways by changes to the GHC AST or the GHC API. The main gotcha is that we'll have to make sure that `haddock-test` and the test suite don't add modules without modifying this test. Then again, if that happens, the test will fail and someone will noticed.
* Cmm: Promote stack arguments to word sizePeter Trommler2019-02-161-7/+29
| | | | | | | | | | | | | | | | | Smaller than word size integers must be promoted to word size when passed on the stack. While on little endian systems we can get away with writing a small integer to a word size stack slot and read it as a word ignoring the upper bits, on big endian systems a small integer write ends up in the most significant bits and a word size read that ignores the upper bits delivers a random value. On little endian systems a smaller than word size write to the stack might be more efficient but that decision is system specific and should be done as an optimization in the respective backends. Fixes #16258
* HIE: Save module name and module exportsMatthew Pickering2019-02-163-5/+25
|
* Remove `parallel` as a submoduleAlec Theriault2019-02-168-15/+3
| | | | | | | | | | | `parallel` is used in exactly one place in the GHC tree: the T2317 test. It seems almost by accident that it is a submodule; libraries needed only for tests should net be included as submodules (see `QuickCheck`, `async`, `haskell98`, `regex-compat`, `utf8-string`, `vector` and more for examples). T2317 will now get run only when `parallel` is installed instead of `parallel` being required for the testsuite to run.
* Minor documentation fix in GHC.ForeignPtrÖmer Sinan Ağacan2019-02-161-5/+3
|
* Remove Simon's special number from typecheck/should_fail/all.twip/unexpected-testMatthew Pickering2019-02-161-1/+0
|
* Fix tests which were made to pass by "Make a smart mkAppTyM"Matthew Pickering2019-02-163-3/+3
| | | | | | | | | For some reason gitlab is not reporting these as failures in CI. It's not clear to me why as the junit output looks fine. Fixes #16112 and #16113 They were fixed by 682783828275cca5fd8bf5be5b52054c75e0e22c
* Fix and Reapply "Performance tests: recover a baseline from ancestor commits ↵David Eichmann2019-02-167-66/+374
| | | | and CI results."
* Don't wrap the entry map for LiveInfo in Maybe.klebinger.andreas@gmx.at2019-02-156-26/+27
| | | | | | | | | | | | | It never really encoded a invariant. * The linear register allocator just did partial pattern matches * The graph allocator just set it to (Just mapEmpty) for Nothing So I changed LiveInfo to directly contain the map. Further natCmmTopToLive which filled in Nothing is no longer exported. Instead we know call cmmTopLiveness which changes the type AND fills in the map.
* Properly escape character literals in HaddocksAlec Theriault2019-02-157-19/+19
| | | | | | | | Character literals in Haddock should not be written as plain `'\n'` since single quotes are for linking identifiers. Besides, since we want the character literal to be monospaced, we really should use `@\'\\n\'@`. [skip ci]
* 'forall' always a keyword, plus the dot type operatorVladislav Zavialov2019-02-1516-87/+74
|
* Hadrian: enable -Wcompat=error in the testsuiteVladislav Zavialov2019-02-151-0/+1
|
* Fail fast in solveLocalEqualitiesSimon Peyton Jones2019-02-1424-442/+50
| | | | | | | | | | | | | | | | | | This patch makes us fail fast in TcSimplify.solveLocalEqualities, and in TcHsType.tc_hs_sig_type, if there are insoluble constraints. Previously we ploughed on even if there were insoluble constraints, leading to a cascade of hard-to-understand type errors. Failing eagerly is much better; hence a lot of testsuite error message changes. Eg if we have f :: [Maybe] -> blah f xs = e then trying typecheck 'f x = e' with an utterly bogus type is just asking for trouble. I can't quite remember what provoked me to make this change, but I think the error messages are notably improved, by removing confusing clutter and focusing on the real error.
* Make a smart mkAppTyMSimon Peyton Jones2019-02-1425-760/+839
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch finally delivers on Trac #15952. Specifically * Completely remove Note [The tcType invariant], along with its complicated consequences (IT1-IT6). * Replace Note [The well-kinded type invariant] with: Note [The Purely Kinded Type Invariant (PKTI)] * Instead, establish the (PKTI) in TcHsType.tcInferApps, by using a new function mkAppTyM when building a type application. See Note [mkAppTyM]. * As a result we can remove the delicate mkNakedXX functions entirely. Specifically, mkNakedCastTy retained lots of extremly delicate Refl coercions which just cluttered everything up, and(worse) were very vulnerable to being silently eliminated by (say) substTy. This led to a succession of bug reports. The result is noticeably simpler to explain, simpler to code, and Richard and I are much more confident that it is correct. It does not actually fix any bugs, but it brings us closer. E.g. I hoped it'd fix #15918 and #15799, but it doesn't quite do so. However, it makes it much easier to fix. I also did a raft of other minor refactorings: * Use tcTypeKind consistently in the type checker * Rename tcInstTyBinders to tcInvisibleTyBinders, and refactor it a bit * Refactor tcEqType, pickyEqType, tcEqTypeVis Simpler, probably more efficient. * Make zonkTcType zonk TcTyCons, at least if they have any free unification variables -- see zonk_tc_tycon in TcMType.zonkTcTypeMapper. Not zonking these TcTyCons was actually a bug before. * Simplify try_to_reduce_no_cache in TcFlatten (a lot) * Combine checkExpectedKind and checkExpectedKindX. And then combine the invisible-binder instantation code Much simpler now. * Fix a little bug in TcMType.skolemiseQuantifiedTyVar. I'm not sure how I came across this originally. * Fix a little bug in TyCoRep.isUnliftedRuntimeRep (the ASSERT was over-zealous). Again I'm not certain how I encountered this. * Add a missing solveLocalEqualities in TcHsType.tcHsPartialSigType. I came across this when trying to get level numbers right.
* Implement -Wredundant-record-wildcards and -Wunused-record-wildcardsMatthew Pickering2019-02-1423-63/+365
| | | | | | | | | -Wredundant-record-wildcards warns when a .. pattern binds no variables. -Wunused-record-wildcards warns when none of the variables bound by a .. pattern are used. These flags are enabled by `-Wall`.
* NCG: fast compilation of very large strings (#16190)Sylvain Henry2019-02-146-12/+73
| | | | | | | | | | This patch adds an optimization into the NCG: for large strings (threshold configurable via -fbinary-blob-threshold=NNN flag), instead of printing `.asciz "..."` in the generated ASM source, we print `.incbin "tmpXXX.dat"` and we dump the contents of the string into a temporary "tmpXXX.dat" file. See the note for more details.
* Add perf test for #16190Sylvain Henry2019-02-143-0/+30
|
* Add `liftedTyped` to `Lift` classAlec Theriault2019-02-133-4/+66
| | | | | | | | Implements GHC proposal 43, adding a `liftTyped` method to the `Lift` typeclass. This also adds some documentation to `TExp`, describing typed splices and their advantages over their untyped counterparts. Resolves #14671.
* Fix typos [skip ci]Alexandre Esteves2019-02-131-2/+2
|
* Update parallel submoduleHerbert Valerio Riedel2019-02-131-0/+0
|
* Fix checkStackChunk() call in Interepter.c, enable an assertionÖmer Sinan Ağacan2019-02-132-2/+2
| | | | Fixes #16303
* configure: Document CLANG, LLC, and OPT variablesBen Gamari2019-02-122-0/+5
|
* Fix #15849 by checking whether there's a do blocknineonine2019-02-126-5/+10
|
* Fix #16299 by deleting incorrect code from IfaceSynRyan Scott2019-02-122-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | GHCi's `:info` command was pretty-printing Haskell98-style data types with explicit return kinds if the return kind wasn't `Type`. This leads to bizarre output like this: ``` λ> :i (##) data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##) -- Defined in ‘GHC.Prim’ ``` Or, with unlifted newtypes: ``` λ> newtype T = MkT Int# λ> :i T newtype T :: TYPE 'IntRep = MkT Int# -- Defined at <interactive>:5:1 ``` The solution is simple: just delete one part from `IfaceSyn` where GHC mistakenly pretty-prints the return kinds for non-GADTs.
* Fix #16188Richard Eisenberg2019-02-1212-41/+251
| | | | | | | | | | | | | | There was an awful lot of zipping going on in canDecomposableTyConAppOK, and one of the lists being zipped was too short, causing the result to be too short. Easily fixed. Also fixes #16204 and #16225 test case: typecheck/should_compile/T16188 typecheck/should_compile/T16204[ab] typecheck/should_fail/T16204c typecheck/should_compile/T16225
* Fix #16293 by cleaning up Proxy# infelicitiesRyan Scott2019-02-128-19/+64
| | | | | | | | | | | | | | | | | | | | This bug fixes three problems related to `Proxy#`/`proxy#`: 1. Reifying it with TH claims that the `Proxy#` type constructor has two arguments, but that ought to be one for consistency with TH's treatment for other primitive type constructors like `(->)`. This was fixed by just returning the number of `tyConVisibleTyVars` instead of using `tyConArity` (which includes invisible arguments). 2. The role of `Proxy#`'s visible argument was hard-coded as nominal. Easily fixed by changing it to phantom. 3. The visibility of `proxy#`'s kind argument was specified, which is different from the `Proxy` constructor (which treats it as inferred). Some minor refactoring in `proxyHashId` fixed ths up. Along the way, I had to introduce a `mkSpecForAllTy` function, so I did some related Haddock cleanup in `Type`, where that function lives.
* Add explicit dependencies to cleanup-darwinMatthew Pickering2019-02-121-0/+1
|
* Update array submoduleHerbert Valerio Riedel2019-02-121-0/+0
|
* testsuite: Report unexpected passes in junit outputMatthew Pickering2019-02-111-2/+5
|
* Hadrian: add LLVM flavoursAlec Theriault2019-02-104-3/+65
| | | | | | This adds a handful of LLVM flavours and the accompanying documentation. These flavours are mostly uninteresting, but exist in the Make system.
* Fix Int overflow on 32 bit platformPeter Trommler2019-02-101-1/+1
|
* testsuite: Always skip T15897Ben Gamari2019-02-101-2/+2
| | | | See #16193.
* testsuite: Report stdout and stderr in JUnit outputBen Gamari2019-02-104-34/+69
| | | | | | | | | | This patch makes the JUnit output more useful as now we also report the stdout/stderr in the message which can be used to quickly identify why a test is failing without downloading the log. This also introduces TestResult, previously we were simply passing around tuples, making things the implementation rather difficult to follow and harder to extend.
* Capture and simplify constraints arising from running typed splicesMatthew Pickering2019-02-104-3/+37
| | | | | | | | | | | | | | | This fixes a regression caused by #15471 where splicing in a trivial program such as `[|| return () ||]` would fail as the dictionary for `return` would never get bound in the module containing the splice. Arguably this is symptomatic of a major problem affecting TTH where we serialise renamed asts and then retype check them. The reference to the dictionary should be fully determined at the quote site so that splicing doesn't have to solve any implicits at all. It's a coincidence this works due to coherence but see #15863 and #15865 for examples where things do go very wrong. Fixes #16195
* Remove ghctags (#16274)Sylvain Henry2019-02-109-479/+8
|
* Make CI via Hadrian build docsAlec Theriault2019-02-101-0/+1
|
* Fix invalid doc commentAlec Theriault2019-02-101-16/+22
| | | | | | The invalid doc comments were exposed by 24b39ce53eedad4cefc30f6786542d2072d1f9b0. The fix is to properly escaped the `{-` and `-}` in the doc comments. Some other miscallaneous markup issues are also fixed.
* Fix inverted position pragma flag in parser APIAlec Theriault2019-02-101-1/+1
| | | | | | | | The behviour of `lexTokenStream` around position pragma was accidentally inverted in 469fe6133646df5568c9486de2202124cb734242. This fixes that bug. This also unbreaks #16239.
* Upgrade to the latest stack resolverNeil Mitchell2019-02-091-2/+5
|