summaryrefslogtreecommitdiff
path: root/testsuite/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* annth_make, annth_compunits: Only run these tests if have_dynamic()Joachim Breitner2014-04-281-2/+6
|
* Print for-alls more often (Trac #9018)Simon Peyton Jones2014-04-288-11/+15
| | | | | | | | We now display the foralls of a type if any of the type variables is polykinded. This put kind polymorphism "in your face" a bit more often, but eliminates a lot of head scratching. The user manual reflects the new behaviour.
* tcrun045 should fail (implicit parameter as superclass)Simon Peyton Jones2014-04-282-1/+2
|
* Add a comprehensive test for using Annotations from THGergely Risko2014-04-288-0/+136
| | | | | | | | The provided tests test both annotation generation and reification from Template Haskell. Both --make and compilation via separate units (ghc -c) are tested. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Update 32-bit perf numbersSimon Peyton Jones2014-04-283-8/+16
| | | | | Many of these have never been initialised, I think. They were simply guesses from the 64-bit version.
* Do type-class defaulting even if there are insoluble constraintsSimon Peyton Jones2014-04-2812-165/+123
| | | | | | | | | | | | | | The argument in Trac #9033 is very compelling: we should not report 20 errors, fix one, and have the other 19 disappear. They were spurious in the first place. The fix was easy; do type-class defaulting uncondionally, rather than only if there are no insoluble constraints. See Note [When to do type-class defaulting] in TcSimplify. Error messages generally improve, especially tc211 which actually had an example of precisely this phenomenon.
* Test Trac #9036Simon Peyton Jones2014-04-283-0/+31
|
* Drop `template-haskell`'s build-dep on `containers`Herbert Valerio Riedel2014-04-251-7/+6
| | | | | | | | | | | | | | | | | | | This is an attempt to address https://github.com/haskell/cabal/issues/1811 by replicating the less than 100 lines of code actually used from the containers package into an internal non-exposed `template-haskell` module. Moreover, `template-haskell` does not expose the `Map` type, so this change should have no visible effect on the public API. It may turn out that `Data.Map` is not necessary and that even a simple list-based associative list (`Prelude.lookup`) may suffice. However, in order to avoid any regressions, this commit takes the safe route and just clones `Data.Map` for now. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Some typos in commentsGabor Greif2014-04-242-2/+2
|
* Don't eta-expand PAPs (fixes Trac #9020)Simon Peyton Jones2014-04-244-1/+1691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Note [Do not eta-expand PAPs] in SimplUtils. This has a tremendously good effect on compile times for some simple benchmarks. The test is now where it belongs, in perf/compiler/T9020 (instead of simpl015). I did a nofib run and got essentially zero change except for cacheprof which gets 4% more allocation. I investigated. Turns out that we have instance PP Reg where pp ppm ST_0 = "%st" pp ppm ST_1 = "%st(1)" pp ppm ST_2 = "%st(2)" pp ppm ST_3 = "%st(3)" pp ppm ST_4 = "%st(4)" pp ppm ST_5 = "%st(5)" pp ppm ST_6 = "%st(6)" pp ppm ST_7 = "%st(7)" pp ppm r = "%" ++ map toLower (show r) That (map toLower (show r) does a lot of map/toLowers. But if we inline show we get something like pp ppm ST_0 = "%st" pp ppm ST_1 = "%st(1)" pp ppm ST_2 = "%st(2)" pp ppm ST_3 = "%st(3)" pp ppm ST_4 = "%st(4)" pp ppm ST_5 = "%st(5)" pp ppm ST_6 = "%st(6)" pp ppm ST_7 = "%st(7)" pp ppm EAX = map toLower (show EAX) pp ppm EBX = map toLower (show EBX) ...etc... and all those map/toLower calls can now be floated to top level. This gives a 4% decrease in allocation. But it depends on inlining a pretty big 'show' function. With this new patch we get slightly better eta-expansion, which makes a function look slightly bigger, which just stops it being inlined. The previous behaviour was luck, so I'm not going to worry about losing it. I've added some notes to nofib/Simon-nofib-notes
* Be less verbose when printing Names when we don't know what's in scopeSimon Peyton Jones2014-04-248-50/+43
| | | | | | | | Previously we always printed qualified names, but that makes a lot of debug or warning output very verbose. So now we only print qualified names with -dppr-debug. Civilised output (from pukka error messages, with the environment available) is unaffected
* testsuite/spec001: untabify, kill trailing whitespaceAustin Seipp2014-04-201-99/+99
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Deprecate the AMP warnings.Austin Seipp2014-04-2011-15/+10
| | | | | | | | Now that we're in development mode, Applicative will soon be a superclass of Monad in HEAD. So let's go ahead and deprecate the -fno-warn-amp flag, remove the checks, and tweak a few tests Signed-off-by: Austin Seipp <austin@well-typed.com>
* Normalize GHC Trac URLsHerbert Valerio Riedel2014-04-194-4/+4
| | | | | | | | | | | | | | Update several old http://hackage.haskell.org/trac/ghc URLs references to the current http://ghc.haskell.org/trac/ghc URLs. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Validate inferred theta. Fixes #8883Jan Stolarek2014-04-1912-9/+38
| | | | | | | This checks that all the required extensions are enabled for the inferred type signature. Updates binary and vector submodules.
* Take account of the AvailTC invariant when importingSimon Peyton Jones2014-04-184-0/+11
| | | | | | In the rather gnarly filterImports code, someone had forgotten the AvailTC invariant: in AvailTC n [n,s1,s2], the 'n' is itself included in the list of names.
* Update Cabal submodule to latest tip of 1.20 branchHerbert Valerio Riedel2014-04-171-84/+24
| | | | | | The testsuite reference output for ghcpkg01 needs to be adapted since a "More diff friendly pretty printing of cabal files" is now performed.
* Make qReport force its error message before printing itSimon Peyton Jones2014-04-173-0/+12
| | | | | | Fixes Trac #8987. See Note [Exceptions in TH] Thanks to Yuras Shumovich for doing this.
* Test Trac #8985Simon Peyton Jones2014-04-142-0/+17
|
* Expected output of as-pattern testDr. ERDI Gergo2014-04-121-0/+4
|
* Add source file for new test that checks that as-patterns are rejectedDr. ERDI Gergo2014-04-121-0/+4
| | | | in pattern synonym definitions
* Fix #8641, creating directories when we have stubs.Edward Z. Yang2014-04-103-0/+19
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Split off pattern synonym definition checking from pattern inversionDr. ERDI Gergo2014-04-101-0/+1
|
* Fix egregious blunder in the type flattenerSimon Peyton Jones2014-04-105-32/+58
| | | | | | | | | | | In tidying up the flattener I introduced an error that no regression test caught, giving rise to Trac #8978, #8979. It shows up if you have a type synonym whose RHS mentions type functions, such sas type family F a type T a = (F a, a) -- This synonym isn't properly flattened The fix is easy, but sadly the bug is in the released GHC 7.8.1
* Suppress uniques to stop output wobbling (test for Trac #8958)Simon Peyton Jones2014-04-092-50/+50
|
* Fix #5435, adding new test config check_stdout.Edward Z. Yang2014-04-091-2/+17
| | | | | | | | | | | check_stdout(f) allows you to override the test framework's diff based output checking with another mechanism. f is a function which takes two arguments: the first is the filename containing the observed stdout, the second is the normaliser that would have been applied (in case you want to read, normalise, and then do something.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Improve error reporting for untouchable type variablesSimon Peyton Jones2014-04-085-18/+23
| | | | | | | | | | | This change adds a suggestion Possible fix: add a type signature for ‘f’ when we have a GADT-style definition with a type we can't figure out. See Note [Suggest adding a type signature] in TcErrors. This initially came up in the discussion of Trac #8968.
* Test Trac #8963Simon Peyton Jones2014-04-082-0/+10
|
* Zonk the existential type variables in tcPatSynDeclSimon Peyton Jones2014-04-082-0/+9
| | | | This was just an omission, which showed up as Trac #8966
* Derive Typable for promoted data constructors (Trac #8950)Simon Peyton Jones2014-04-073-9/+9
| | | | | | | | | I got sucked into a significant refactoring of the way that Typeable instances are derived. This makes it simpler and more uniform. I also improved the documentation in the user manual. Typeable really is different to other classes, and now gets its own subsection.
* Update long-out-of-date performance numbers on 32-bitSimon Peyton Jones2014-04-074-24/+47
| | | | Many are improvements!
* Small issue with signatures in a TH splice (fixes Trac #8932)Simon Peyton Jones2014-04-073-0/+19
|
* Require PatternSynonyms language flag when encountering a use of pattern synonymDr. ERDI Gergo2014-04-066-0/+24
| | | | (#8961)
* Add test case for #8950.Richard Eisenberg2014-04-052-0/+19
|
* Fix #8958.Richard Eisenberg2014-04-055-3/+69
| | | | | We now do role inference on stupid datatype contexts, allowing a lightweight role annotation syntax.
* Simplify and tidy up the handling of tuple namesSimon Peyton Jones2014-04-042-1/+17
| | | | | | | | | | | | | This fixes Trac #8954. There were actually three places where tuple occ-names were parsed: - IfaceEnv.lookupOrigNameCache - Convert.isBuiltInOcc - OccName.isTupleOcc_maybe I combined all three into TysWiredIn.isBuiltInOcc_maybe Much nicer.
* Test Trac #8931Simon Peyton Jones2014-04-033-0/+5
|
* Fix desguaring of bang patterns (Trac #8952)Simon Peyton Jones2014-04-033-0/+10
| | | | A palpable bug, although one that will rarely bite
* CopySmallArrayStressTest needs randomJoachim Breitner2014-03-291-1/+1
|
* Add SmallArray# and SmallMutableArray# typesJohan Tibell2014-03-297-0/+752
| | | | | | | | | | | | | | | These array types are smaller than Array# and MutableArray# and are faster when the array size is small, as they don't have the overhead of a card table. Having no card table reduces the closure size with 2 words in the typical small array case and leads to less work when updating or GC:ing the array. Reduces both the runtime and memory allocation by 8.8% on my insert benchmark for the HashMap type in the unordered-containers package, which makes use of lots of small arrays. With tuned GC settings (i.e. `+RTS -A6M`) the runtime reduction is 15%. Fixes #8923.
* increase bounds for T3064Simon Marlow2014-03-271-1/+1
|
* Add flags to control memcpy and memset inliningJohan Tibell2014-03-263-0/+24
| | | | | | | This adds -fmax-inline-memcpy-insns and -fmax-inline-memset-insns. These flags control when we inline calls to memcpy/memset with statically known arguments. The flag naming style is taken from GCC and the same limit is used by both GCC and LLVM.
* Suppress uniques for simpl016 to normalise debug outputSimon Peyton Jones2014-03-252-5/+5
|
* Test Trac #8848Simon Peyton Jones2014-03-255-0/+72
|
* Improve the desugaring of RULE left-hand-sides (fixes Trac #8848)Simon Peyton Jones2014-03-251-4/+4
| | | | | | | | | | | | | | | | | I've added detailed comments with Note [Decomposing the left-hand side of a RULE] The result is a noticeable improvement. Previously * we rejected a perfectly decent SPECIALISE (Trac #8848) * and for something like f :: (Eq a) => b -> a -> a {-# SPECIALISE f :: b -> [Int] -> [Int] #-} we ended up with RULE f ($fdEqList $dfEqInt) = f_spec whereas we wanted RULES forall (d:Eq [Int]). f d = f_spec
* Implicit parameters should not be allowed in class and instance declarationsSimon Peyton Jones2014-03-247-11/+31
| | | | | | Trac #8912 pointed out that GHC 7.4 and 7.6 have omitted this test, although 7.2 and earlier had it. This patch puts the test back in, and refactors a little.
* Flattener preserves synonyms, rewriteEvidence can drop buggy "optimisation"Simon Peyton Jones2014-03-243-10/+21
| | | | | | | | | | | | | | | | There was a special case in rewriteEvidence, looking like: = return (Just (if ctEvPred old_ev `tcEqType` new_pred then old_ev else old_ev { ctev_pred = new_pred })) But this was wrong: old_pred and new_pred might differ in the kind of a TyVar occurrence, in which case tcEqType would not notice, but we really, really want new_pred. This caused Trac #8913. I solved this by dropping the whole test, and instead making the flattener preserve type synonyms. This was easy because TcEvidence has TcTyConAppCo which (unlike) Coercion, handles synonyms.
* Revert "Fix #8745 - GND is now -XSafe compatible."Austin Seipp2014-03-2410-7/+97
| | | | | | | | | See #8827 - for now, we're making GND unsafe again. This also fixes the tests since they were originally not using the new unicode quote style we're using. This reverts commit a8a01e742434df11b830ab99af12d9045dfcbc4b.
* Trac #8831 is fixedSimon Peyton Jones2014-03-231-1/+1
|
* Test Trac #8893Simon Peyton Jones2014-03-232-0/+12
|