summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Add regression test for #16946nineonine2019-07-262-0/+13
|
* TemplateHaskell: reifyType (#16976)Vladislav Zavialov2019-07-267-0/+66
|
* Change behaviour of -ddump-cmm-verbose to dump each Cmm pass output to a ↵nineonine2019-07-265-2/+34
| | | | separate file and add -ddump-cmm-verbose-by-proc to keep old behaviour (#16930)
* Banish reportFloatingViaTvs to the shadow realm (#15831, #16181)Ryan Scott2019-07-2613-19/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GHC used to reject programs of this form: ``` newtype Age = MkAge Int deriving Eq via Const Int a ``` That's because an earlier implementation of `DerivingVia` would generate the following instance: ``` instance Eq Age where (==) = coerce @(Const Int a -> Const Int a -> Bool) @(Age -> Age -> Bool) (==) ``` Note that the `a` in `Const Int a` is not bound anywhere, which causes all sorts of issues. I figured that no one would ever want to write code like this anyway, so I simply banned "floating" `via` type variables like `a`, checking for their presence in the aptly named `reportFloatingViaTvs` function. `reportFloatingViaTvs` ended up being implemented in a subtly incorrect way, as #15831 demonstrates. Following counsel with the sage of gold fire, I decided to abandon `reportFloatingViaTvs` entirely and opt for a different approach that would _accept_ the instance above. This is because GHC now generates this instance instead: ``` instance forall a. Eq Age where (==) = coerce @(Const Int a -> Const Int a -> Bool) @(Age -> Age -> Bool) (==) ``` Notice that we now explicitly quantify the `a` in `instance forall a. Eq Age`, so everything is peachy scoping-wise. See `Note [Floating `via` type variables]` in `TcDeriv` for the full scoop. A pleasant benefit of this refactoring is that it made it much easier to catch the problem observed in #16181, so this patch fixes that issue too. Fixes #15831. Fixes #16181.
* Make sure to load interfaces when running :instancesXavier Denis2019-07-234-0/+29
|
* Fix #8487: Debugger confuses variablesRoland Senn2019-07-214-0/+19
| | | | | | | | | | To display the free variables for a single breakpoint, GHCi pulls out the information from the fields `modBreaks_breakInfo` and `modBreaks_vars` of the `ModBreaks` data structure. For a specific breakpoint this gives 2 lists of types 'Id` (`Var`) and `OccName`. They are used to create the Id's for the free variables and must be kept in sync: If we remove an element from the Names list, then we also must remove the corresponding element from the OccNames list.
* Do not ignore events deletion when events to be added are provided (#16916)Ivan Kasatenko2019-07-213-0/+47
| | | | | | | | | | | Kqueue/kevent implementation used to ignore events to be unsubscribed from when events to be subscribed to were provided. This resulted in a lost notification subscription, when GHC runtime didn't listen for any events, yet the kernel considered otherwise and kept waking up the IO manager thread. This commit fixes this issue by always adding and removing all of the provided subscriptions.
* Line wrap when pp long expressions (fixes #16874)Alfredo Di Napoli2019-07-203-0/+25
| | | | | This commit fixes #16874 by using `fsep` rather than `sep` when pretty printing long patterns and expressions.
* testsuite: Unmark recomp007 as brokenBen Gamari2019-07-181-1/+0
| | | | Fixed in #14759.
* testsuite: Mark test-hole-plugin as req_thBen Gamari2019-07-181-1/+2
| | | | | This requires code loading and therefore can't be run in the profiled ways when GHC is dynamically linked.
* testsuite: Fix some ints used as boolsBen Gamari2019-07-181-10/+10
|
* testsuite: Print output from hp2psBen Gamari2019-07-181-1/+1
|
* testsuite: Fix req_thBen Gamari2019-07-182-1/+4
|
* testsuite: Set -dinitial-unique when reversing uniquesBen Gamari2019-07-183-3/+3
| | | | | Otherwise the unique counter starts at 0, causing us to immediately underflow.
* testsuite: Mark static-plugins as broken in profiled waysBen Gamari2019-07-181-0/+1
| | | | See #16803.
* testsuite: More type checking fixesBen Gamari2019-07-186-98/+174
|
* Revert "Add support for SIMD operations in the NCG"Ben Gamari2019-07-1615-459/+1
| | | | | | | Unfortunately this will require more work; register allocation is quite broken. This reverts commit acd795583625401c5554f8e04ec7efca18814011.
* rename type parameter in `instance Applicative ((->) a)`, fixing #16928xplorld2019-07-143-3/+3
|
* Expunge #ifdef and #ifndef from the codebaseJohn Ericson2019-07-1426-32/+32
| | | | | | | | These are unexploded minds as far as the linter is concerned. I don't want to hit in my MRs by mistake! I did this with `sed`, and then rolled back some changes in the docs, config.guess, and the linter itself.
* Fix kind-checking for data/newtypesSimon Peyton Jones2019-07-122-0/+14
| | | | | | | | | | | | | | | | | | | | In one spot in kcConDecl we were passing in the return kind signature rether than the return kind. e.g. #16828 newtype instance Foo :: Type -> Type where MkFoo :: a -> Foo a We were giving kcConDecl the kind (Type -> Type), whereas it was expecting the ultimate return kind, namely Type. This "looking past arrows" was being done, independently, in several places, but we'd missed one. This patch moves it all to one place -- the new function kcConDecls (note the plural). I also took the opportunity to rename tcDataFamHeader to tcDataFamInstHeader (The previous name was consistently a source of confusion.)
* Allow reusing temporary object files generated by GHCi by writing to -odir ↵nineonine2019-07-117-0/+53
| | | | in case -fwrite-interface was specified (#16670)
* Don't typecheck too much (or too little) in DerivingVia (#16923)Ryan Scott2019-07-113-0/+11
| | | | | | | | | | | Previously, GHC would typecheck the `via` type once per class in a `deriving` clause, which caused the problems observed in #16923. This patch restructures some of the functionality in `TcDeriv` and `TcHsType` to avoid this problem. We now typecheck the `via` type exactly once per `deriving` clause and *then* typecheck all of the classes in the clause. See `Note [Don't typecheck too much in DerivingVia]` in `TcDeriv` for the full details.
* Add regression test for old panic on inlining undeclared identifier (#495)Kevin Buhr2019-07-113-0/+15
|
* Fix erroneous float in CoreOptSimon Peyton Jones2019-07-093-0/+34
| | | | | | | | | | | The simple optimiser was making an invalid transformation to join points -- yikes. The fix is easy. I also added some documentation about the fact that GHC uses a slightly more restrictive version of join points than does the paper. Fix #16918
* T16804: adjust src spansEric Wolf2019-07-093-157/+161
|
* Add testcase T16804 for #16804Eric Wolf2019-07-096-0/+415
| | | | | slightly larger testcase for :type-at and :uses so we can see changes, if #16804 is done.
* Testsuite tweaks and refactoringÖmer Sinan Ağacan2019-07-099-18/+20
| | | | | | | | | | | | | | | | - Rename requires_th to req_th for consistency with other req functions (e.g. req_interp, req_profiling etc.) - req_th (previously requires_th) now checks for interpreter (via req_interp). With this running TH tests are skipped when running the test suite with stage=1. - Test tweaks: - T9360a, T9360b: Use req_interp - recomp009, T13938, RAE_T32a: Use req_th - Fix check-makefiles linter: it now looks for Makefiles instead of .T files (which are actually Python files)
* testsuite: Fix #16818Ben Gamari2019-07-091-3/+10
| | | | | Renames performance metrics to include whether they are compile-time or runtime metrics.
* Fix #16511: changes in interface dependencies should trigger recompilationPhuong Trinh2019-07-098-0/+45
| | | | | | | If the union of dependencies of imported modules change, the `mi_deps` field of the interface files should change as well. Because of that, we need to check for changes in this in recompilation checker which we are not doing right now. This adds a checks for that.
* Use an empty data type in TTG extension constructors (#15247)Ryan Scott2019-07-097-526/+536
| | | | | | | | | | | | | | | To avoid having to `panic` any time a TTG extension constructor is consumed, this MR introduces an uninhabited 'NoExtCon' type and uses that in every extension constructor's type family instance where it is appropriate. This also introduces a 'noExtCon' function which eliminates a 'NoExtCon', much like 'Data.Void.absurd' eliminates a 'Void'. I also renamed the existing `NoExt` type to `NoExtField` to better distinguish it from `NoExtCon`. Unsurprisingly, there is a lot of code churn resulting from this. Bumps the Haddock submodule. Fixes #15247.
* Add test for old issue w/ bad source locations for warnings in .lhs files (#515)Kevin Buhr2019-07-083-0/+28
|
* Fix #16895 by checking whether infix expression operator is a variablenineonine2019-07-0511-0/+68
|
* More sensible SrcSpans for recursive pattern synonym errors (#16900)Ryan Scott2019-07-053-0/+14
| | | | | | | | Attach the `SrcSpan` of the first pattern synonym binding involved in the recursive group when throwing the corresponding error message, similarly to how it is done for type synonyms. Fixes #16900.
* Fix over-eager implication constraint discardSimon Peyton Jones2019-07-045-0/+50
| | | | | | | | Ticket #16247 showed that we were discarding an implication constraint that had empty ic_wanted, when we still needed to keep it so we could check whether it had a bad telescope. Happily it's a one line fix. All the rest is comments!
* Add a missing zonk (fixes #16902)Simon Peyton Jones2019-07-043-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the eager unifier, when unifying (tv1 ~ tv2), when we decide to swap them over, to unify (tv2 ~ tv1), I'd forgotten to ensure that tv1's kind was fully zonked, which is an invariant of uUnfilledTyVar2. That could lead us to build an infinite kind, or (in the case of #16902) update the same unification variable twice. Yikes. Now we get an error message rather than non-termination, which is much better. The error message is not great, but it's a very strange program, and I can't see an easy way to improve it, so for now I'm just committing this fix. Here's the decl data F (a :: k) :: (a ~~ k) => Type where MkF :: F a and the rather error message of which I am not proud T16902.hs:11:10: error: • Expected a type, but found something with kind ‘a1’ • In the type ‘F a’
* Produce all DerivInfo in tcTyAndClassDeclsVladislav Zavialov2019-07-045-499/+499
| | | | | | | | | | | | | | | Before this refactoring: * DerivInfo for data family instances was returned from tcTyAndClassDecls * DerivInfo for data declarations was generated with mkDerivInfos and added at a later stage of the pipeline in tcInstDeclsDeriv After this refactoring: * DerivInfo for both data family instances and data declarations is returned from tcTyAndClassDecls in a single list. This uniform treatment results in a more convenient arrangement to fix #16731.
* Bump template-haskell version to 2.16.0.0Ryan Scott2019-07-031-1/+1
| | | | | | | Commit cef80c0b9edca3d21b5c762f51dfbab4c5857d8a debuted a breaking change to `template-haskell`, so in order to guard against it properly with CPP, we need to bump the `template-haskell` version number accordingly.
* Add support for SIMD operations in the NCGAbhiroop Sarkar2019-07-0315-1/+459
| | | | | | | This adds support for constructing vector types from Float#, Double# etc and performing arithmetic operations on them Cleaned-Up-By: Ben Gamari <ben@well-typed.com>
* Add test for #16575Eric Wolf2019-07-024-0/+54
| | | | | just use the test to show the defective behaviour, so we can see the difference, when it gets fixed
* Fix #15843 by extending Template Haskell AST for tuples to support sectionsnineonine2019-07-026-2/+107
|
* testsuite: Add more type annotations to perf_notesBen Gamari2019-06-272-54/+100
|
* Fix #16805 by formatting warning messagenineonine2019-06-272-3/+7
|
* testsuite: More type signatureswip/run-fragile-testsBen Gamari2019-06-262-9/+12
|
* testsuite: Run and report on fragile testsBen Gamari2019-06-263-9/+23
| | | | | | This allows us to run (but ignore the result of) fragile testcases. Hopefully this should allow us to more easily spot when a fragile test becomes un-fragile.
* testsuite: Mark T5611 and T5611a as fragileBen Gamari2019-06-261-2/+2
|
* testsuite: Add T5611aBen Gamari2019-06-265-4/+42
| | | | This is the same as T5611 but with an unsafe call to sleep.
* testsuite: Use safe FFI call in T5611Ben Gamari2019-06-261-3/+3
| | | | | The original issue, #5611, was concerned with safe calls. However, the test inexplicably used an unsafe call. Fix this.
* testsuite: Fix T16832Ben Gamari2019-06-262-5/+6
| | | | | The test seems to have been missing the name of its script and didn't build with HEAD. How it made it through CI is beyond me.
* Add -Winferred-safe-imports warningOleg Grenrus2019-06-252-10/+10
| | | | | | | | | | | | | This commit partly reverts e69619e923e84ae61a6bb4357f06862264daa94b commit by reintroducing Sf_SafeInferred SafeHaskellMode. We preserve whether module was declared or inferred Safe. When declared-Safe module imports inferred-Safe, we warn. This inferred status is volatile, often enough it's a happy coincidence, something which cannot be relied upon. However, explicitly Safe or Trustworthy packages won't accidentally become Unsafe. Updates haddock submodule.
* Bump Cabal submodule to what will become 3.0.0.0Ben Gamari2019-06-251-0/+6
| | | | | Metric Increase: haddock.Cabal