summaryrefslogtreecommitdiff
path: root/testsuite/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a test for plusWord2#, addIntC#, subIntC#Reid Barton2014-08-093-0/+91
|
* Add test case for #9013Reid Barton2014-08-093-0/+20
|
* Implement the final change to INCOHERENT from Trac #9242Simon Peyton Jones2014-08-084-23/+23
| | | | | | | | | | | | | | | | The change here is to make INCOHERENT slightly more permissive: if the selected candidate is incoherent then ignore all unifying candidates This allows us to move the {-# INCOHERENT #-} pragma from from instance Typeable (f a) to Typeable (n:Nat) and Typable (s:Symbol) where it belongs, and where Trac #9242 said it should be. I don't think this will affect anyone. I've updated the user manual.
* Update Haddock to attoparsec-0.12.1. Adjust perf.Mateusz Kowalczyk2014-08-081-1/+2
| | | | | Please adjust the perf number on your platform if/when it fails. It should improve slightly. Updates submodule.
* Update perf number for T5642Joachim Breitner2014-08-071-1/+2
| | | | | | This +4% increase (from -1% before) was caused by 1fc60ea. But that commit did not cause any other regressions, so I’m not investigating further.
* Permanently accept the Haddock performance number bump, and add some TODOsEdward Z. Yang2014-08-071-6/+6
| | | | | | | | | | | | | | I bisected the performance difference in Haddock and found it was due to d6aec63c009c4e57181900eb03847d7dc0fc3c7c, which I accidentally picked up when updating Haddock 00b8f8c5b378fc679639ebe81238cf42d92aa607. The performance regression is justified by the fact that we are now actually processing URLs in Haddock comments that we were not previously, so there would be more allocation. Time use was not affected. The TODOs simply reflect the fact that we need updated numbers for 32-bit Linux and Windows. Please add them when you get a chance. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Test Trac #9390Simon Peyton Jones2014-08-073-0/+29
|
* fix T658b/T5776 to use POSIX grep -c instead of GNU's --countKarel Gardas2014-08-071-2/+2
|
* fix linker_unload test for ghc configurations with --with-gmp-librariesKarel Gardas2014-08-071-1/+5
| | | | | | | | | | | | | | The issue is presented in Makefile logic where it attempts to start linker_unload and pass it HSinteger-gmp library for unload, but the library name is prefixed with two directories names. The first is of ghc's integer-gmp/build itself and another is the directory name passed to --with-gmp-libraries= configure parameter. The testcase then fails on unloading integer-gmp/build directory thinking that this is a library to unload. The issue is solved by cuting (head -1) the first library name from the list and using this for unloading the HSinteger-gmp library. I use head -1 instead of cut -d ' ' here since ghc may be installed into the directory with space(s) in its name like in the case when running validate.
* fix linker_unload test _FILE_OFFSET_BITS redefined warning on Solaris/i386Karel Gardas2014-08-071-0/+1
|
* Mark type-rep not as expect_broken when debuggedJoachim Breitner2014-08-061-1/+1
| | | | Thanks to slyfox for noticing this reregression.
* Revert "fix linker_unload test on Solaris/i386 platform"Karel Gardas2014-08-062-4/+1
| | | | This reverts commit 65e5dbcd3971cb3ef5b9073096e5d063034b90c1.
* Temporarily bump Haddock numbers; I'm going to fix it.Edward Z. Yang2014-08-051-2/+8
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Thinning and renaming modules from packages on the command line.Edward Z. Yang2014-08-0520-1/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch set adds support for extra syntax on -package and related arguments which allow you to thin and rename modules from a package. For example, this argument: -package "base (Data.Bool as Bam, Data.List)" adds two more modules into scope, Bam and Data.List, without adding any of base's other modules to scope. These flags are additive: so, for example, saying: -hide-all-packages -package base -package "base (Data.Bool as Bam)" will provide both the normal bindings for modules in base, as well as the module Bam. There is also a new debug flag -ddump-mod-map which prints the state of the module mapping database. H = hidden, E = exposed (so for example EH says the module in question is exported, but in a hidden package.) Module suggestions have been minorly overhauled to work better with reexports: if you have -package "base (Data.Bool as Bam)" and mispell Bam, GHC will suggest "Did you mean Bam (defined via package flags to be base:Data.Bool)"; and generally you will get more accurate information. Also, fix a bug where we suggest the -package flag when we really need the -package-key flag. NB: The renaming afforded here does *not* affect what wired in symbols GHC generates. (But it does affect implicit prelude!) ToDo: add 'hiding' functionality, to make it easier to support the alternative prelude use-case. ToDo: Cabal support Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: new tests and validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D113 GHC Trac Issues: #9375
* Refactor package state, also fixing a module reexport bug.Edward Z. Yang2014-08-057-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of building a multiply indirected data structure and querying it on every import, we now have two data structures moduleToPkgConf and moduleToPkgConfAll. moduleToPkgConf is a single-level UniqFM that is intended to be used for most valid imports; however, it does not contain any information useful for error reporting. If an error is occurred, we then query moduleToPkgConfAll, which contains a more comprehensive view of the package database. This field is lazily initialized (so this means we're retaining the package database list, but this should be fine because we're already maintaining the entries of the list.) Additionally, the full view doesn't keep track of a boolean toggle for visibility/exposure anymore, but instead tracks the *provenance* of how the module binding came to be (the ModuleOrigin data type). Additionally, we move the logic for determining if a module is exposed or not from Finder.lhs and put it in Packages.lhs; this information is communicated via the LookupResult data type. Unfortunately, we can't directly return a FindResult, because this data type is defined in HscTypes which depends on Packages. This is going to change some more in the near future when I add thinning/renaming to package flags; the error messages will need to be more flexible. I've also slightly changed the semantics of error messages for package qualified imports. Previously, if we didn't find any package qualified imports, but there were hidden modules in a *different* package, the error message would prefer mentioning those as opposed to providing suggestions. Now, if a module is hidden but in the wrong package, we won't mention it; instead, it will get mentioned with the other module suggestions. I was too lazy to write a test, but I can add one if people would like. The module reexport bug was, package q reexported p:P as Conflict, and package r reexported p:P2 as Conflict, this was *not* reported as a conflict, because the old logic incorrectly decided that P and P2 were the same module on account of being from the same package. The logic here has been corrected. Contains haddock submodule update. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Package keys (for linking/type equality) separated from package IDs.Edward Z. Yang2014-08-0541-13/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch set makes us no longer assume that a package key is a human readable string, leaving Cabal free to "do whatever it wants" to allocate keys; we'll look up the PackageId in the database to display to the user. This also means we have a new level of qualifier decisions to make at the package level, and rewriting some Safe Haskell error reporting code to DTRT. Additionally, we adjust the build system to use a new ghc-cabal output Make variable PACKAGE_KEY to determine library names and other things, rather than concatenating PACKAGE/VERSION as before. Adds a new `-this-package-key` flag to subsume the old, erroneously named `-package-name` flag, and `-package-key` to select packages by package key. RFC: The md5 hashes are pretty tough on the eye, as far as the file system is concerned :( ToDo: safePkg01 test had its output updated, but the fix is not really right: the rest of the dependencies are truncated due to the fact the we're only grepping a single line, but ghc-pkg is wrapping its output. ToDo: In a later commit, update all submodules to stop using -package-name and use -this-package-key. For now, we don't do it to avoid submodule explosion. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D80
* fix linker_unload test on Solaris/i386 platformKarel Gardas2014-08-042-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch set fixes two issues in linker_unload test case on Solaris/i386 platform. First there is an issue in linker_unload.c which causes warning to be emitted about _FILE_OFFSET_BITS redefined. This is solved by including ghcconfig.h as a first header file. Another issue is that on Solaris and its builders we use to configure ghc with --with-gmp-libraries=/usr/lib and this causes issue with test case Makefile's logic. It attempts to start linker_unload and pass it HSinteger-gmp library for unload, but the library name is prefixed with two directories names. The first is of ghc's integer-gmp/build itself and another is the directory name passed to --with-gmp-libraries= configure parameter. In case of Solaris this is /usr/lib. The testcase then fails on unloading integer-gmp/build directory thinking that this is a library to unload. This issue is solved by cuting the first library name from the list and using this for unloading the HSinteger-gmp library. Test Plan: validate Reviewers: ezyang, austin Reviewed By: ezyang, austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D110
* Add missing *.stderr filesJoachim Breitner2014-08-023-0/+21
| | | | which probably should have been added in commit fbd0586ea
* Add in (disabled for now) test of a Safe Haskell bug.David Terei2014-08-013-0/+46
|
* Infer safety of modules correctly with new overlapping pragmas.David Terei2014-08-014-1/+34
|
* Update Safe Haskell typeable test outputs.David Terei2014-08-013-4/+12
|
* Allow warning if could have been infered safe instead of explicitDavid Terei2014-08-011-4/+4
| | | | Trustworthy label.
* Fix-up to d4d4bef2 'Improve the desugaring of RULES'Simon Peyton Jones2014-08-013-8/+33
| | | | | I'd forgotten the possiblity that desugaring could generate dead dictionary bindings; easily fixed by calling occurAnalyseExpr
* Bump haddock.base max_bytes_usedJoachim Breitner2014-08-011-6/+7
| | | | | | It has reliably increased with commit 1ae5fa45, and has been stable since then, so it does not seem to be a fluke. I did not investigate why that commit might have increased this value.
* Improve the desugaring of RULES, esp those from SPECIALISE pragmasSimon Peyton Jones2014-08-013-0/+69
| | | | | | | | | | | | In the code for Trac #8331 we were not getting a complaint, but we *were* getting a terrible (and virtually useless) RULE, looking like useAbstractMonad (complicated-dictionary-expresion) = $fuseAbstractMonad where we wanted useAbstractMonad d = $fuseAbstractMonad This commit improves the desugaring algorithm. More comments explain; see Note [Drop dictionary bindings on rule LHS]
* A panic in CmmBuildInfoTables.bundle shouldn't be a panic (#9329)Simon Marlow2014-08-012-0/+6
| | | | | | | | | | | | | | | | | Summary: This code needs more comments, but I believe this is safe. By definition I can't have broken anything that was working by turning a panic into a non-panic anyway. Test Plan: validate Reviewers: hvr, simonpj, austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D105 GHC Trac Issues: #9329
* interruptible() was not returning true for BlockedOnSTM (#9379)Simon Marlow2014-08-012-0/+19
| | | | | | | | | | | | | | | | | | | Summary: There's an knock-on fix in HeapStackCheck.c which is potentially scary, but I'm pretty confident is OK. See comment for details. Test Plan: I've run all the STM tests I can find, including libraries/stm/tests/stm049 with +RTS -N8 and some of the constants bumped to make it more of a stress test. Reviewers: hvr, rwbarton, austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D104 GHC Trac Issues: #9379
* Typo fixesGabor Greif2014-08-011-1/+1
|
* Fix up ghci044Simon Peyton Jones2014-07-312-0/+6
|
* Complete work on new OVERLAPPABLE/OVERLAPPING pragmas (Trac #9242)Simon Peyton Jones2014-07-3152-141/+154
| | | | | | | | | | | | | | | | | * Deprecate -XOverlappingInstances * Update test suite. Several tests even had entirely unnecessary uses of -XOverlappingInstances * Update user manual with a careful description of the instance resolution story * Fix an outright bug in the handling of duplidate instances in GHCi, which are meant to silently overwrite the earlier duplicate. The logic was right for family instances but was both more complicated, and plain wrong, for class instances. (If you are interested, the bug was that we were eliminating the duplicate from the InstEnv, but not from the [ClsInst] held in tcg_insts.) Test is ghci044a.
* Test Trac #9380Simon Peyton Jones2014-07-313-0/+72
|
* Compiler perf has improved a bitSimon Peyton Jones2014-07-311-2/+6
|
* Allow multiple entry points when allocating recursive groups (#9303)Simon Marlow2014-07-312-0/+11
| | | | | | | | | | | | | | | | | Summary: In this example we ended up with some code that was only reachable via an info table, because a branch had been optimised away by the native code generator. The register allocator then got confused because it was only considering the first block of the proc to be an entry point, when actually any of the info tables are entry points. Test Plan: validate Reviewers: simonpj, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D88
* Make mod73 test insensitive to minor variations (#9325)Reid Barton2014-07-301-1/+10
|
* Add test cases for explicitly-bidirectional pattern synonymDr. ERDI Gergo2014-07-295-0/+24
|
* use GHC-7.8.3's values for thread block reason (fixes #9333)Jost Berthold2014-07-283-1/+46
| | | | | | | | | | | | | | | | | | | | Summary: For now, BlockedOnMVar and BlockedOnMVarRead are not distinguished. Making the distinction would mean to change an exported datatype (API change). Code for this change is included but commented out. The patch adds a test for the threadstatus, which retrieves status BlockedOnMVar for two threads blocked on writing and reading an MVar. Test Plan: ran validate, including the new test Reviewers: simonmar, austin, ezyang Reviewed By: austin, ezyang Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D83
* Support ghc-pkg --ipid to query package ID.Edward Z. Yang2014-07-283-3/+3
| | | | | | | | | | | | Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: hvr, simonmar, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D98
* Module reexports, fixing #8407.Edward Z. Yang2014-07-2526-0/+291
| | | | | | | | | | | | | | | | | | | | | | | | | The general approach is to add a new field to the package database, reexported-modules, which considered by the module finder as possible module declarations. Unlike declaring stub module files, multiple reexports of the same physical package at the same name do not result in an ambiguous import. Has submodule updates for Cabal and haddock. NB: When a reexport renames a module, that renaming is *not* accessible from inside the package. This is not so much a deliberate design choice as for implementation expediency (reexport resolution happens only when a package is in the package database.) TODO: Error handling when there are duplicate reexports/etc is not very well tested. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: compiler/main/HscTypes.lhs testsuite/.gitignore utils/haddock
* Update test suite outputJoachim Breitner2014-07-251-1/+1
| | | | | | | after changes in 92587bf. This problem was noticed on ghcspeed (although only by accident, unfortunately, as a change from 0 to 1 is not reported in the summary).
* Refactor FFI error messagesSimon Peyton Jones2014-07-2510-26/+46
| | | | | | | | | | | | | | This patch was provoked by Trac #5610, which I finally got a moment to look at. In the end I added a new data type ErrUtils.Validity, data Validity = IsValid -- Everything is fine | NotValid MsgDoc -- A problem, and some indication of why with some suitable combinators, and used it where appropriate (which touches quite a few modules). The main payoff is that error messages improve for FFI type validation.
* Check for boxed tau types in the LHS of type family instancesSimon Peyton Jones2014-07-253-0/+17
| | | | Fixes Trac #9357
* Use the right kinds on the LHS in 'deriving' clausesSimon Peyton Jones2014-07-242-0/+13
| | | | This patch fixes Trac #9359
* Fixed issue with detection of duplicate record fieldsGintautas Miliauskas2014-07-245-0/+17
| | | | | | | | | Duplicate record fields would not be detected when given a type with multiple data constructors, and the first data constructor had a record field r1 and any consecutive data constructors had multiple fields named r1. This fixes #9156 and was reviewed in https://phabricator.haskell.org/D87
* Fix test for fetchNandIntArray#Johan Tibell2014-07-231-7/+18
| | | | | The test was incorrectly testing that NAND is associative, which it isn't.
* Make last a good consumerJoachim Breitner2014-07-223-0/+14
| | | | | | | | | | | | | | | | | | Summary: Make last a good consumer simply by implementing it as foldl. This fixes Trac: #9339. Thanks to David Feuer for bringing it up. Test Plan: perf/should_run/T9339 + general validation Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D86 Trac Issues: #9339
* [ghc-pkg] Fix #5442 by using the flag db stack to modify packages.Edward Z. Yang2014-07-219-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, the full database stack was used for ghc-pkg to modify packages, which meant that commands like 'ghc-pkg unregister --user' worked the same as 'ghc-pkg unregister'. Since package modification is a "read and write" operation, we should use the flag db stack (which is currently used for reads) to determine which database to update. There is also a new flag --user-package-db, which lets you explicitly set the user database (as seen by --user). This was mostly added to aid in testing, but could be useful for end users as well. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D84
* Further improvements to floating equalitiesSimon Peyton Jones2014-07-182-0/+88
| | | | | | | | | | | This equality-floating stuff is horribly delicate! Trac #9316 showed up yet another corner case. The main changes are * include CTyVarEqs when "growing" the skolem set * do not include the kind argument to (~) when growing the skolem set I added a lot more comments as well
* Adjust a few performance numbersJoachim Breitner2014-07-174-15/+32
| | | | | | | | | | | | These did not yet trigger a failure, but are more than 1% away from the expected value. Since I now start collecting logs to investigate deviations from the expected value, it makes sense to reset them. This way we know that every significat deviation was caused since this commit. I only updated bytes_allocated numbers, as these are (mostly) deterministic. Other depend, AFAIK, on sampling timing, so I did not bother.
* Test Trac #9323Simon Peyton Jones2014-07-173-0/+13
|
* Richards optCoercion improvement made test cases fail the nice wayJoachim Breitner2014-07-171-1/+5
| | | | This was likely caused by 5e7406d9, which fixed #9233.