summaryrefslogtreecommitdiff
path: root/testsuite/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Entirely re-jig the handling of default type-family instances (fixes Trac #9063)Simon Peyton Jones2014-07-1522-49/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | In looking at Trac #9063 I decided to re-design the default instances for associated type synonyms. Previously it was all jolly complicated, to support generality that no one wanted, and was arguably undesirable. Specifically * The default instance for an associated type can have only type variables on the LHS. (Not type patterns.) * There can be at most one default instances declaration for each associated type. To achieve this I had to do a surprisingly large amount of refactoring of HsSyn, specifically to parameterise HsDecls.TyFamEqn over the type of the LHS patterns. That change in HsDecls has a (trivial) knock-on effect in Haddock, so this commit does a submodule update too. The net result is good though. The code is simpler; the language specification is simpler. Happy days. Trac #9263 and #9264 are thereby fixed as well.
* Partially revert 194107ea9333c1d9d61abf307db2da6a699847afAustin Seipp2014-07-141-3/+1
| | | | | | This reverts the numbers for T9203. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Update various performance benchmarksJoachim Breitner2014-07-143-12/+19
| | | | | | I started monitoring perfomance on a per-commit base. These seem to be off for a while now. Adjusting them, and from now I hope I can keep closer tabs on them.
* Test case for #9305Joachim Breitner2014-07-133-1/+17
|
* testsuite: Tweak T6048 boundsAustin Seipp2014-07-121-4/+4
| | | | | | | | | | | | | | | | | Summary: This should fix the Harbormaster builds; the bounds are just a little too narrow. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Harbormaster should build successfully. Reviewers: simonmar Subscribers: phaskell, simonmar, relrod, carter Projects: #ghc Differential Revision: https://phabricator.haskell.org/D65
* Do not print the result of 'main' after invoking ':main' (fixes #9086).Gintautas Miliauskas2014-07-076-0/+8
|
* Test Trac #9222Simon Peyton Jones2014-07-012-0/+8
|
* Fix demand analyser for unboxed typesSimon Peyton Jones2014-07-013-0/+22
| | | | | | | | | This is a tricky case exposed by Trac #9254. I'm surprised it hasn't shown up before, because it's happens when you use unsafePerformIO in the right way. Anyway, fixed now. See Note [Analysing with absent demand] in Demand.lhs
* Check for integer overflow in allocate() (#9172)Reid Barton2014-07-017-0/+59
| | | | | | | | | | | | | | Summary: Check for integer overflow in allocate() (#9172) Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D36
* Unbreak TcNullaryTC testcase, by using MPTCJoachim Breitner2014-07-011-1/+1
|
* Re-add more primops for atomic ops on byte arraysJohan Tibell2014-06-303-0/+253
| | | | | | | | | | | | | | | | | | | | | | | This is the second attempt to add this functionality. The first attempt was reverted in 950fcae46a82569e7cd1fba1637a23b419e00ecd, due to register allocator failure on x86. Given how the register allocator currently works, we don't have enough registers on x86 to support cmpxchg using complicated addressing modes. Instead we fall back to a simpler addressing mode on x86. Adds the following primops: * atomicReadIntArray# * atomicWriteIntArray# * fetchSubIntArray# * fetchOrIntArray# * fetchXorIntArray# * fetchAndIntArray# Makes these pre-existing out-of-line primops inline: * fetchAddIntArray# * casIntArray#
* Promote TcNullaryTC and TcCoercible to fast testsHerbert Valerio Riedel2014-06-291-2/+2
| | | | | | | | | I'm wondering whether it's sensible to omit so many typecheck testcases from the default validate test target. As for instance, TcNullaryTC has been failing since its introduction in c63a465011b99eeafbb957074e54c2e6bbf751d9 (re #8993) and it seems to have gone unnoticed so far. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update 32bit & 64bit performance numbersHerbert Valerio Riedel2014-06-293-13/+26
| | | | | | | | | | | | | | | | Some numbers have decreased but the haddock numbers have generally increased noticeable again (see also last update in 970e5d99fb658b73) This updates all numbers I noticed in the "fast" test-mode, *except* for the T9203 test-case on 32bit, which needs more investigation before bumping due to its significant increase: bytes allocated value is too high: Expected bytes allocated: 50000000 +/-5% Lower bound bytes allocated: 47500000 Upper bound bytes allocated: 52500000 Actual bytes allocated: 85093548 *** unexpected failure for T9203(normal)
* Expect test failure for T8832 on 32bit (re #8832)Herbert Valerio Riedel2014-06-291-1/+1
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update Cabal to BinaryLiterals-aware 1.20 versionHerbert Valerio Riedel2014-06-291-1/+0
| | | | | | | | | | | In 1c0b5fdc9f2b6ea8166cc565383d4cd20432343c (re #9224) `BinaryLiterals` was temporarily added to T4437's `expectedGhcOnlyExtensions` list. This can now reverted as Cabal has been made aware of `BinaryLiterals` (see haskell/cabal#1970 and haskell/cabal#1972). updates Cabal submodule Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Simplify .gitignore filesHerbert Valerio Riedel2014-06-2828-87/+0
| | | | | | | | | It's a bit confusing to have .gitignore files spread all over the filesystem. This commit tries to consolidate those into one .gitignore file per component. Moreover, we try to describe files to be ignored which happen to have a common identifying pattern by glob patterns. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add -XBinaryLiterals language extension (re #9224)Herbert Valerio Riedel2014-06-2715-0/+126
| | | | | | | | | | | | | | | | | | | | | | | Haskell2010 supports - base-10 (prefix-less), - base-8 (via `0[oO]`-prefix), and - base-16 (via `0[xX]`-prefix) integer literals. This commit adds syntax support for base-2 integer literals via the new `0[bB]` prefix. The use of a `0b` prefix for indicating binary literals is known from popular programming languages such as C++14, Perl, Python, Ruby, and Java. This syntax extension is disabled by default and can be enabled via the new `{-# LANGUAGE BinaryLiterals #-}` pragma and/or the new `-XBinaryLiterals` This new extensions requires to upgrade the `ExtsBitmap` type from `Word` to `Word64` as this adds a 33th flag which is not guaranteed to fit into a `Word`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> Differential Revision: https://phabricator.haskell.org/D22
* Revert "Make -fno-write-interface to all modes of GHC, not just -fno-code."Edward Z. Yang2014-06-272-7/+0
| | | | This reverts commit 05120ecd95b2ebf9b096a95304793cd78be9506e.
* Make -fno-write-interface to all modes of GHC, not just -fno-code.Edward Z. Yang2014-06-272-0/+7
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Add new flag -fwrite-interface for -fno-code.Edward Z. Yang2014-06-263-0/+15
| | | | | | | | | | | | | | | | | | | Summary: Normally, -fno-code does not generate interface files. However, if you want to use it to type check over multiple runs of GHC, you will need the interface files to check source files further down the dependency chain; -fwrite-interface does this for you. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: clean validate, and a new test-case Reviewers: simonpj Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D27
* Revert "Add more primops for atomic ops on byte arrays"Johan Tibell2014-06-264-254/+0
| | | | | | | | This commit caused the register allocator to fail on i386. This reverts commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3 and 04dd7cb3423f1940242fdfe2ea2e3b8abd68a177 (the second being a fix to the first).
* Add more primops for atomic ops on byte arraysJohan Tibell2014-06-244-0/+254
| | | | | | | | | | | | | | | | | | | Summary: Add more primops for atomic ops on byte arrays Adds the following primops: * atomicReadIntArray# * atomicWriteIntArray# * fetchSubIntArray# * fetchOrIntArray# * fetchXorIntArray# * fetchAndIntArray# Makes these pre-existing out-of-line primops inline: * fetchAddIntArray# * casIntArray#
* Comment the expect_broken for Trac #9208Simon Peyton Jones2014-06-241-0/+3
|
* Mark T9208 as broken when debugging is onJoachim Breitner2014-06-231-1/+1
| | | | this seems to be expected, as explained by SPJ in comment 7 of #9208.
* Add fake entries into the global kind environment for pattern synonyms.Dr. ERDI Gergo2014-06-215-0/+27
| | | | | | This is needed to give meaningful error messages (instead of internal panics) when a program tries to lift a pattern synonym into a kind. (fixes T9161)
* Reject forall types in constraints in signaturesSimon Peyton Jones2014-06-206-11/+25
| | | | | | | Fixes Trac #9196. Thanks to archblob for an initial stab at this. In the end I fixed it in the kind checker rather than the subsequent validity check, (a) so that the error messages look more uniform, and (b) so that I did not need to meddle with isPredTy.
* Make splitStrProdDmd (and similarly Use) more robustSimon Peyton Jones2014-06-202-1/+99
| | | | | | | The issue here is avoiding a GHC crash when a program uses unsafeCoerce is a dangerous (or even outright-wrong) way. See Trac #9208
* Tidy up the printing of single-predicate contextsSimon Peyton Jones2014-06-2019-31/+31
| | | | | | | | | | This covers things like Eq a => blah and (?x::Int) => blah where there is just one predicate. Previously we used an ad-hoc test to decide whether to parenthesise it, but acutally there is a much simpler solution: just use the existing precedence mechamism. This applies both to Type and HsType.
* accept T9181 outputSimon Marlow2014-06-171-0/+4
| | | | Not sure if my patch changed this, but it looks reasonable.
* Optimise the Typeable instance for type app a bit, and add a perf testSimon Marlow2014-06-173-0/+18
| | | | | | | | | | Test Plan: validate Reviewers: simonpj, austin Subscribers: simonmar, relrod Differential Revision: https://phabricator.haskell.org/D20
* Fixes #95 :edit command should jump to the last errorLorenzo Tabacchini2014-06-136-0/+29
|
* Bytes allocated by haddock.base has crept up (again)Simon Peyton Jones2014-06-121-1/+2
| | | | | I don't know why, and I don't like the steady increase. But I don't think my changes here are the cause.
* Fix elemLocalRdrEnv (Trac #9160)Simon Peyton Jones2014-06-123-0/+31
| | | | | | | | | | | | | | | This was pretty obscure. elemLocalRdrEnv was utterly wrong (replied False when it should reply True) when given an Exact Name. That doesn't happen often, but it does happen in the result of a TH splice. The result was that an associated type didn't get a type variable that lined up with its parent class (elemLocalRdrEnv is used in RnTypes.bindHsTyVars), and that messed up the singletons package. I've made a completely different test case to show up the bug: indexed_types/should_fail/T9160 I also refactored RdrName.LocalRdrEnv to be a record with named fields, which makes the code more robust and easy to understand.
* Line up kind and type variables correctly when desugaring TH bracketsSimon Peyton Jones2014-06-122-0/+10
| | | | This bug was causing Trac #9199
* Fix a serious, but rare, strictness analyser bug (Trac #9128)Simon Peyton Jones2014-06-113-0/+15
| | | | | | | | | In a special case for trivial RHSs (see DmdAnal.unpackTrivial), I'd forgotten to include a demand for the RHS itself. See Note [Remember to demand the function itself]. Thanks to David Terei for guiding me to the bug, at PLDI in Edinburgh.
* Fix tyConToIfaceDecl (Trac #9190)Simon Peyton Jones2014-06-112-23/+23
| | | | | | | | | | | | | | | | | | | | | | | There are three bugs here, one serious * We were failing to tidy the type arguments in an IfTyConParent This is what was causing Trac #9190. * toIfaceTcArgs is careful to suppress kind arguments, but there was a clone, tidyToIfaceTcArgs in IfaceSyn which didn't. Now the latter goes via the former. * When pretty-printing a IfaceDecl for an algebraic data type, and doing so in Haskell-98 syntax, we were silently assuming that the universal type variables of the TyCon and the DataCon were the same. But that has not been true for some time. Result: a very confusing display. Solution: during the conversion to IfaceSyn, take the opportunity to make the universal type variables line up exactly. This is very easy to do, makes the pretty-printing easy, and leaves open the future possiblity of not serialising the universal type variables of the data constructor.
* Improve error message in Trac #8883Simon Peyton Jones2014-06-119-144/+144
| | | | | The improvement is to report the inferred type in the error message, as suggested in email on ghc-deves (10 Jun 14).
* Test #9085.Richard Eisenberg2014-06-113-0/+12
|
* Test #9097.Richard Eisenberg2014-06-113-1/+16
|
* Fix #9062.Richard Eisenberg2014-06-111-2/+1
| | | | | | | | | Removed (pprEqPred (coercionKind co)) in favor of (pprType (coercionType co)). Also had to make "~R#" a *symbolic* identifier and BuiltInSyntax to squelch prefix notation and module prefixes in output. These changes are both sensible independent of #9062.
* Clarify error message. See #9167.Richard Eisenberg2014-06-113-3/+3
|
* Make FunPtr's role be phantom; add comments.Richard Eisenberg2014-06-111-0/+1
| | | | | This change also updates castFunPtr to make it free at runtime. This fixes #9163.
* Update test results with new orphan instance warningJoachim Breitner2014-06-091-2/+10
| | | | It seems that the patch in #9178 was not fully validated.
* Better warning message for orphan instances (Ticket #9178)Dr. Heinrich Hördegen2014-06-095-0/+28
| | | | Including a test case.
* Suggest -fprint-explicit-kinds when only kind variables are ambiguousSimon Peyton Jones2014-06-093-0/+34
| | | | | This was triggered by looking at Trac #9171. See Note [Suggest -fprint-explicit-kinds] in TcErrors
* Check that an associated type mentions at least one type variable from the classSimon Peyton Jones2014-06-095-2/+19
| | | | Fixes Trac #9167
* Pretty-print built in synonym families in interfacesJoachim Breitner2014-06-072-1/+51
| | | | This closes #9181.
* Test case for #9181 (:browse GHC.TypeLits panic)Joachim Breitner2014-06-072-0/+2
|
* supress warning of bang wildcard pattern-binding (i.e. let !_ = rhs). This ↵Guido Zayas2014-06-063-0/+6
| | | | fixes #9127
* Fix discarding of unreachable code in the register allocator (#9155)Simon Marlow2014-06-062-0/+31
| | | | | | | A previous fix to this was wrong: f5879acd018494b84233f26fba828ce376d0f81d and left some unreachable code behind. So rather than try to be clever and do this at the same time as the strongly-connected-component analysis, I'm doing a separate reachability pass first.