summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver
Commit message (Collapse)AuthorAgeFilesLines
* Add a flag to emit error messages as JSONMatthew Pickering2017-01-305-0/+29
| | | | | | | | | | | | | | | | | | | | | This patch adds the flag `-ddump-json` which dumps all the compiler output as a JSON array. This allows tooling to more easily parse GHC's output to display to users. The flag is currently experimental and will hopefully be refined for the next release. In particular I have avoided any changes which involve significant refactoring and provided what is easy given the current infrastructure. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: DanielG, gracjan, thomie Differential Revision: https://phabricator.haskell.org/D3010 GHC Trac Issues: #13190
* Remove clean_cmd and extra_clean usage from .T filesThomas Miedema2017-01-2233-477/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `clean_cmd` and `extra_clean` setup functions don't do anything. Remove them from .T files. Created using https://github.com/thomie/refactor-ghc-testsuite. This diff is a test for the .T-file parser/processor/pretty-printer in that repository. find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \; Tests containing inline comments or multiline strings are not modified. Preparation for #12223. Test Plan: Harbormaster Reviewers: austin, hvr, simonmar, mpickering, bgamari Reviewed By: mpickering Subscribers: mpickering Differential Revision: https://phabricator.haskell.org/D3000 GHC Trac Issues: #12223
* Add a failing test for #13099Reid Barton2017-01-208-0/+65
| | | | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2990 GHC Trac Issues: #13099
* Improve suggestion for misspelled flag including '=' (fixes #11789)Daishi Nakajima2017-01-185-0/+17
| | | | | | | | | | | | | | | | | | | | | Test Plan: Added 2 test cases, verified that ghc can suggest in the following cases: - for misspelled flag containing '=', ghc suggests flags that doesn't contain '=' - for misspelled flag containing '=', ghc suggests flags that contains '=' Reviewers: austin, dfeuer, bgamari Reviewed By: dfeuer, bgamari Subscribers: dfeuer, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2978 GHC Trac Issues: #11789
* testsuite: Really fix recomp001Ben Gamari2017-01-181-1/+1
| | | | | The fix in D2964 wasn't quite right; the sleep was in the wrong place, as pointed out by @gracjan.
* testsuite/recomp001: Sleep to ensure that GHC notices file changeBen Gamari2017-01-171-0/+3
| | | | | | | | | | | | | | | Some operating systems (e.g. Darwin) have very poor file timestamp resolution. On these systems GHC often fails to notice that B.hs changes in this testsuite, leading to sporatic test failures. Add a sleep to ensure the change is noticed. Test Plan: Validate Reviewers: ezyang, austin Subscribers: mpickering, gracjan, thomie Differential Revision: https://phabricator.haskell.org/D2964
* Use latin1 code page on Windows for response files.Tamar Christina2017-01-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: D2917 added a change that will make paths on Windows response files use DOS 8.3 shortnames to get around the fact that `libiberty` assumes a one byte per character encoding. This is actually not the problem, the actual problem is that GCC on Windows doesn't seem to support Unicode at all. This comes down to how unicode characters are handled between POSIX and Windows. On Windows, Unicode is only supported using a multibyte character encoding such as `wchar_t` with calls to the appropriate wide version of APIs (name post-fixed with the `W` character). On Posix I believe the standard `char` is used and based on the value it is decoded to the correct string. GCC doesn't seem to make calls to the Wide version of the Windows APIs, and even if it did, it's character representation would be wrong. So I believe GCC just does not support utf-8 paths on Windows. So the hack in D2917 is the only way to get Unicode support. The problem is however that `GCC` is not the only tool with this issue and we don't use response files for every invocation of the tools. Most of the tools probably don't support it. Furthermore, DOS 8.1 shortnames only exist when the path or file physically exists on disk. We pass lots of paths to GCC that don't exist yet, like the output file. D2917 works around this by splitting the path from the file and try shortening that. But this may not always work. In short, even if we do Unicode correctly (which we don't atm, the GCC driver we build uses `char` instead of `wchar_t`) we won't be able to compile using unicode paths that need to be passed to `GCC`. So not sure about the point of D2917. What we can do is support the most common non-ascii characters by writing the response files out using the `latin1` code page. Test Plan: compile + make test TEST=T12971 Reviewers: austin, bgamari, erikd Reviewed By: bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2942 GHC Trac Issues: #12971
* testsuite: Add test for #12971Ben Gamari2016-12-153-0/+11
| | | | | | | | | | | | Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2855 GHC Trac Issues: #12971
* Sanity check if we pick up an hsig file without -instantiated-with.Edward Z. Yang2016-12-124-0/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously we would just let compilation proceed along until we tried to pull up the Module for the hsig file, and get main:A instead of <A>, and get a mysterious error. Check for this earlier! Fixes #12955. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2815 GHC Trac Issues: #12955
* Ensure each test inherits the TEST_HC_OPTSPhil Ruffwind2016-12-091-1/+1
| | | | | | | | | | | | | | | | | | This is so that global test flags that control the error formatting are propagated correctly. This patch is kind of related to: D2718 The stderr for API annotations is ignored entirely now per @alanz's suggestion. Test Plan: validate Reviewers: thomie, alanz, austin, bgamari Reviewed By: bgamari Subscribers: alanz Differential Revision: https://phabricator.haskell.org/D2808
* Replace -fshow-source-paths with -fhide-source-pathsSylvain Henry2016-11-2913-50/+50
| | | | | | | | | | | | | | | | | | | | | This patch reverts the change introduced with 587dcccfdfa7a319e27300a4f3885071060b1f8e and restores the previous default output of GHC (i.e., show source path and object path for each compiled module). The -fhide-source-paths flag can be used to hide these paths and reduce the line noise. Reviewers: gracjan, nomeata, austin, bgamari, simonmar, hvr Reviewed By: hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2728 GHC Trac Issues: #12851
* Make default output less verbose (source/object paths)Sylvain HENRY2016-11-1113-50/+50
| | | | | | | | | | | | Reviewers: simonmar, mpickering, austin, bgamari Reviewed By: bgamari Subscribers: mpickering, nomeata, thomie Differential Revision: https://phabricator.haskell.org/D2679 GHC Trac Issues: #12807
* Add -Wcpp-undef warning flagErik de Castro Lopo2016-10-224-1/+24
| | | | | | | | | | | | | | | | | | | | When enabled, this new warning flag passes `-Wundef` to the C pre-processor which causes the pre-processor to warn on uses of the `#if` directive on undefined identifiers. It is not currently enabled in any of the standard warning groups. Test Plan: Make sure the two tests pass on all major platforms. Reviewers: hvr, carter, Phyx, bgamari, austin Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2626 GHC Trac Issues: #12752
* A collection of type-inference refactorings.Simon Peyton Jones2016-10-211-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does a raft of useful tidy-ups in the type checker. I've been meaning to do this for some time, and finally made time to do it en route to ICFP. 1. Modify TcType.ExpType to make a distinct data type, InferResult for the Infer case, and consequential refactoring. 2. Define a new function TcUnify.fillInferResult, to fill in an InferResult. It uses TcMType.promoteTcType to promote the type to the level of the InferResult. See TcMType Note [Promoting a type] This refactoring is in preparation for an improvement to typechecking pattern bindings, coming next. I flirted with an elaborate scheme to give better higher rank inference, but it was just too complicated. See TcMType Note [Promotion and higher rank types] 3. Add to InferResult a new field ir_inst :: Bool to say whether or not the type used to fill in the InferResult should be deeply instantiated. See TcUnify Note [Deep instantiation of InferResult]. 4. Add a TcLevel to SkolemTvs. This will be useful generally - it's a fast way to see if the type variable escapes when floating (not used yet) - it provides a good consistency check when updating a unification variable (TcMType.writeMetaTyVarRef, the level_check_ok check) I originally had another reason (related to the flirting in (2), but I left it in because it seems like a step in the right direction. 5. Reduce and simplify the plethora of uExpType, tcSubType and related functions in TcUnify. It was such an opaque mess and it's still not great, but it's better. 6. Simplify the uo_expected field of TypeEqOrigin. Richard had generatlised it to a ExpType, but it was almost always a Check type. Now it's back to being a plain TcType which is much, much easier. 7. Improve error messages by refraining from skolemisation when it's clear that there's an error: see TcUnify Note [Don't skolemise unnecessarily] 8. Type.isPiTy and isForAllTy seem to be missing a coreView check, so I added it 9. Kill off tcs_used_tcvs. Its purpose is to track the givens used by wanted constraints. For dictionaries etc we do that via the free vars of the /bindings/ in the implication constraint ic_binds. But for coercions we just do update-in-place in the type, rather than generating a binding. So we need something analogous to bindings, to track what coercions we have added. That was the purpose of tcs_used_tcvs. But it only worked for a /single/ iteration, whereas we may have multiple iterations of solving an implication. Look at (the old) 'setImplicationStatus'. If the constraint is unsolved, it just drops the used_tvs on the floor. If it becomes solved next time round, we'll pick up coercions used in that round, but ignore ones used in the first round. There was an outright bug. Result = (potentialy) bogus unused-constraint errors. Constructing a case where this actually happens seems quite trick so I did not do so. Solution: expand EvBindsVar to include the (free vars of the) coercions, so that the coercions are tracked in essentially the same way as the bindings. This turned out to be much simpler. Less code, more correct. 10. Make the ic_binds field in an implication have type ic_binds :: EvBindsVar instead of (as previously) ic_binds :: Maybe EvBindsVar This is notably simpler, and faster to use -- less testing of the Maybe. But in the occaional situation where we don't have anywhere to put the bindings, the belt-and-braces error check is lost. So I put it back as an ASSERT in 'setImplicationStatus' (see the use of 'termEvidenceAllowed') All these changes led to quite bit of error message wibbling
* Track dep_finsts in exports hash, as it affects downstream deps.Edward Z. Yang2016-10-178-0/+53
| | | | | | | | | | | | | | | | | | | | Summary: I also added some more comments about the orphan and family instance hashing business. Fixes #12723. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2607 GHC Trac Issues: #12723
* Distinguish between UnitId and InstalledUnitId.Edward Z. Yang2016-10-081-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* The Backpack patch.Edward Z. Yang2016-10-0840-513/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements Backpack for GHC. It's a big patch but I've tried quite hard to keep things, by-in-large, self-contained. The user facing specification for Backpack can be found at: https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst A guide to the implementation can be found at: https://github.com/ezyang/ghc-proposals/blob/backpack-impl/proposals/0000-backpack-impl.rst Has a submodule update for Cabal, as well as a submodule update for filepath to handle more strict checking of cabal-version. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, simonmar, bgamari, goldfire Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1482
* Update Cabal submodule to latest version.Edward Z. Yang2016-10-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: Note that Cabal needs one more bugfix which is in PR to fix GHC bootstrapping. But the rest of the patch is ready for review. Needs a filepath submodule update because cabal check became more strict. This patch handles the abstract-ification of Version and PackageName. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2555
* Implement deriving strategiesRyan Scott2016-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allows users to explicitly request which approach to `deriving` to use via keywords, e.g., ``` newtype Foo = Foo Bar deriving Eq deriving stock Ord deriving newtype Show ``` Fixes #10598. Updates haddock submodule. Test Plan: ./validate Reviewers: hvr, kosmikus, goldfire, alanz, bgamari, simonpj, austin, erikd, simonmar Reviewed By: alanz, bgamari, simonpj Subscribers: thomie, mpickering, oerjan Differential Revision: https://phabricator.haskell.org/D2280 GHC Trac Issues: #10598
* Print foralls in user formatSimon Peyton Jones2016-09-261-2/+1
| | | | | This fixes Trac #12597: in RnNames.warnMissingSignatures, use pprSigmaType not pprType
* Fix #10923 by fingerprinting optimization level.Edward Z. Yang2016-09-023-1/+14
| | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, austin, bgamari, thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2509 GHC Trac Issues: #10923
* Cabal submodule update.Edward Z. Yang2016-08-081-1/+0
| | | | | | | | | | | | | | | | | There's a substantial bump to the haddock.Cabal allocation stats, because we added 50% more modules, so of course allocations are going to increase 50%. (But perhaps this is indicative of some bad constant factor in Haddock related to modules.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: ggreif, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2442
* check that the number of parallel build is greater than 0Ruey-Lin Hsu2016-08-057-0/+23
| | | | | | | | | | | | | | Fixes #12062. Reviewers: bgamari, thomie, austin, simonmar Reviewed By: bgamari, thomie, simonmar Subscribers: simonmar, thomie Differential Revision: https://phabricator.haskell.org/D2415 GHC Trac Issues: #12062
* Implement unboxed sum primitive typeÖmer Sinan Ağacan2016-07-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements primitive unboxed sum types, as described in https://ghc.haskell.org/trac/ghc/wiki/UnpackedSumTypes. Main changes are: - Add new syntax for unboxed sums types, terms and patterns. Hidden behind `-XUnboxedSums`. - Add unlifted unboxed sum type constructors and data constructors, extend type and pattern checkers and desugarer. - Add new RuntimeRep for unboxed sums. - Extend unarise pass to translate unboxed sums to unboxed tuples right before code generation. - Add `StgRubbishArg` to `StgArg`, and a new type `CmmArg` for better code generation when sum values are involved. - Add user manual section for unboxed sums. Some other changes: - Generalize `UbxTupleRep` to `MultiRep` and `UbxTupAlt` to `MultiValAlt` to be able to use those with both sums and tuples. - Don't use `tyConPrimRep` in `isVoidTy`: `tyConPrimRep` is really wrong, given an `Any` `TyCon`, there's no way to tell what its kind is, but `kindPrimRep` and in turn `tyConPrimRep` returns `PtrRep`. - Fix some bugs on the way: #12375. Not included in this patch: - Update Haddock for new the new unboxed sum syntax. - `TemplateHaskell` support is left as future work. For reviewers: - Front-end code is mostly trivial and adapted from unboxed tuple code for type checking, pattern checking, renaming, desugaring etc. - Main translation routines are in `RepType` and `UnariseStg`. Documentation in `UnariseStg` should be enough for understanding what's going on. Credits: - Johan Tibell wrote the initial front-end and interface file extensions. - Simon Peyton Jones reviewed this patch many times, wrote some code, and helped with debugging. Reviewers: bgamari, alanz, goldfire, RyanGlScott, simonpj, austin, simonmar, hvr, erikd Reviewed By: simonpj Subscribers: Iceland_jack, ggreif, ezyang, RyanGlScott, goldfire, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2259
* Add another testcase for #12082Ben Gamari2016-07-201-2/+1
| | | | | | | | | | | | Test Plan: Validate, should pass. Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2399 GHC Trac Issues: #12082
* tidyOccNames: Rename variables fairlyJoachim Breitner2016-07-141-1/+1
| | | | | | | | | | | So that > :t (id,id,id) produces (id,id,id) :: (a3 -> a3, a2 -> a2, a1 -> a1) instead of (id,id,id) :: (a2 -> a2, a1 -> a1, a -> a) Differential Revision: https://phabricator.haskell.org/D2402
* Testsuite: use ignore_stderr/stdout instead of ignore_outputThomas Miedema2016-06-292-7/+7
| | | | | | | | | | | | | | | | | The problem with ignore_output is that it hides errors for WAY=ghci. GHCi always returns with exit code 0 (unless it is broken itself). For example: ghci015 must have been failing with compile errors for years, but we didn't notice because all output was ignored. Therefore, replace all uses of ignore_output with either ignore_stderr or ignore_stdout. In some cases I opted for adding the expected output. Update submodule hpc and stm. Reviewed by: simonmar Differential Revision: https://phabricator.haskell.org/D2367
* Make the Ord Module independent of Unique order (2nd try)Bartosz Nitka2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `Ord Module` instance currently uses `Unique`s for comparison. We don't want to use the `Unique` order because it can introduce nondeterminism. This switches `Ord ModuleName` and `Ord UnitId` to use lexicographic ordering making `Ord Module` deterministic transitively. I've run `nofib` and it doesn't make a measurable difference. See also Note [ModuleEnv determinism and performance]. This fixes #12191 - the regression, that the previous version of this patch had. Test Plan: ./validate run nofib: P112 Reviewers: simonmar, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2354 GHC Trac Issues: #4012, #12191
* Testsuite: delete TEST_HC_OPTS_NO_RECOMPThomas Miedema2016-06-2025-245/+146
| | | | | The previous commits removed `-fforce-recomp` from TEST_HC_OPTS, so TEST_HC_OPTS_NO_RECOMP = TEST_HC_OPTS.
* Testsuite: remove `-fforce-recomp` from default flags (#11980)Thomas Miedema2016-06-202-4/+3
| | | | | | | | | | | | | | There is no need for this flag anymore, since each test runs in a newly created directory. Removing it cleans up testlib.py a bit. There is a small risk that this renders some tests useless. It's hard to know. Those tests should have specified -fforce-recomp` explicitly anyway, so I'm not going to worry about it. I've fixed the ones that failed without -fforce-recomp. Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D2346
* Testsuite: mark tests expect brokenThomas Miedema2016-06-201-4/+7
| | | | | | | | | * CgStaticPointers, GcStaticPointers, ListStaticPointers, TcStaticPointers01, TcStaticPointers02: #12207 * T11535: #12210 * ffi017/ffi021: #12209 * T11108: #11108 * T9646: #9646
* Driver: `ghc ../Test` (without file extension) should workThomas Miedema2016-06-182-0/+4
| | | | | | | | Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D2331 GHC Trac Issues: #12192
* Major patch to introduce TyConBinderSimon Peyton Jones2016-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, following the TypeInType innovations, each TyCon had two lists: - tyConBinders :: [TyBinder] - tyConTyVars :: [TyVar] They were in 1-1 correspondence and contained overlapping information. More broadly, there were many places where we had to pass around this pair of lists, instead of a single list. This commit tidies all that up, by having just one list of binders in a TyCon: - tyConBinders :: [TyConBinder] The new data types look like this: Var.hs: data TyVarBndr tyvar vis = TvBndr tyvar vis data VisibilityFlag = Visible | Specified | Invisible type TyVarBinder = TyVarBndr TyVar VisibilityFlag TyCon.hs: type TyConBinder = TyVarBndr TyVar TyConBndrVis data TyConBndrVis = NamedTCB VisibilityFlag | AnonTCB TyCoRep.hs: data TyBinder = Named TyVarBinder | Anon Type Note that Var.TyVarBdr has moved from TyCoRep and has been made polymorphic in the tyvar and visiblity fields: type TyVarBinder = TyVarBndr TyVar VisibilityFlag -- Used in ForAllTy type TyConBinder = TyVarBndr TyVar TyConBndrVis -- Used in TyCon type IfaceForAllBndr = TyVarBndr IfaceTvBndr VisibilityFlag type IfaceTyConBinder = TyVarBndr IfaceTvBndr TyConBndrVis -- Ditto, in interface files There are a zillion knock-on changes, but everything arises from these types. It was a bit fiddly to get the module loops to work out right! Some smaller points ~~~~~~~~~~~~~~~~~~~ * Nice new functions TysPrim.mkTemplateKiTyVars TysPrim.mkTemplateTyConBinders which help you make the tyvar binders for dependently-typed TyCons. See comments with their definition. * The change showed up a bug in TcGenGenerics.tc_mkRepTy, where the code was making an assumption about the order of the kind variables in the kind of GHC.Generics.(:.:). I fixed this; see TcGenGenerics.mkComp.
* Revert "Make the Ord Module independent of Unique order"Simon Peyton Jones2016-06-151-1/+1
| | | | | | | This reverts commit 0497ee504cc9ac5d6babee9b98bf779b3fc50b98. Reason: See Trac #12191. I'm reverting pending Bartosz's investigation of what went wrong.
* Make the Ord Module independent of Unique orderBartosz Nitka2016-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The `Ord Module` instance currently uses `Unique`s for comparison. We don't want to use the `Unique` order because it can introduce nondeterminism. This switches `Ord ModuleName` and `Ord UnitId` to use lexicographic ordering making `Ord Module` deterministic transitively. I've run `nofib` and it doesn't make a measurable difference. See also Note [ModuleEnv determinism and performance]. Test Plan: ./validate run nofib: P112 Reviewers: simonpj, simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2030 GHC Trac Issues: #4012
* Skip retc001 on OSXMatthew Pickering2016-06-121-1/+2
| | | | | See #11204, this test sometimes fails and sometimes passes on OSX which causes intermittent validate failures if it is run.
* Failing test-case for #12135.ghc-quick3Edward Z. Yang2016-06-056-0/+26
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* testsuite: Mark broken tests on powerpc64lePeter Trommler2016-06-033-3/+3
| | | | | | | | | | | | | | | | | | Mark all failing tests that have a ticket for powerpc64 as broken. Most of these failures are due to the lack of linker support in the runtime system. Test Plan: validate on powerpc and AIX Reviewers: erikd, bgamari, simonmar, hvr, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2289 GHC Trac Issues: #11261, #11259, #11260, #11323
* Testsuite: don't use --interactive in MakefilesThomas Miedema2016-05-272-13/+17
| | | | | | | | | | | | | | Add a linter to encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one of those flags when adding a new test. Update submodule hpc. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D2265 GHC Trac Issues: #11468
* Kill varSetElemsWellScoped in quantifyTyVarsBartosz Nitka2016-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | varSetElemsWellScoped introduces unnecessary non-determinism in inferred type signatures. Removing this instance required changing the representation of TcDepVars to use deterministic sets. This is the last occurence of varSetElemsWellScoped, allowing me to finally remove it. Test Plan: ./validate I will update the expected outputs when commiting, some reordering of type variables in types is expected. Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D2135 GHC Trac Issues: #4012
* SCC analysis for instances as well as types/classesSimon Peyton Jones2016-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This big patch is in pursuit of Trac #11348. It is largely the work of Alex Veith (thank you!), with some follow-up simplification and refactoring from Simon PJ. The main payload is described in RnSource Note [Dependency analysis of type, class, and instance decls] which is pretty detailed. * There is a new data type HsDecls.TyClGroup, for a strongly connected component of type/class/instance/role decls. The hs_instds field of HsGroup disappears, in consequence This forces some knock-on changes, including a minor haddock submodule update Smaller, weakly-related things * I found that both the renamer and typechecker were building an identical env for RoleAnnots, so I put common code for RoleAnnotEnv in RnEnv. * I found that tcInstDecls1 had very clumsy error handling, so I put it together into TcInstDcls.doClsInstErrorChecks
* Fix misattribution of `-Wunused-local-binds` warningsHerbert Valerio Riedel2016-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where warnings actually controlled by - `Opt_WarnUnusedMatches` - `Opt_WarnUnusedTypePatterns` - `Opt_WarnUnusedTopBinds` were incorrectly reported as being controlled by `Opt_WarnUnusedLocalBinds` as well This bug was introduced in bb5afd3c274011c5ea302210b4c290ec1f83209c while implementing #10752 Test Plan: ./validate still running -- testsuite output wiggles expected Reviewers: barrucadu, quchen, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2077
* Add -f(no-)version-macro to explicitly control macros.Edward Z. Yang2016-03-303-0/+7
| | | | | | | | | | | | | | Test Plan: validate Reviewers: thomie, austin, bgamari Reviewed By: bgamari Subscribers: hvr Differential Revision: https://phabricator.haskell.org/D2058 GHC Trac Issues: #11763
* Don't require -hide-all-packages for MIN_VERSION_* macrosThomas Miedema2016-03-304-14/+3
| | | | | | | | | | | | | | | | | Define MIN_VERSION_pkgname and VERSION_pkgname macros for all exposed packages, without requiring -hide-all-packages. See #10970 comment 7-10 for discussion. Reviewers: duncan, ezyang, bgamari, austin Reviewed By: ezyang Subscribers: hvr, rwbarton Differential Revision: https://phabricator.haskell.org/D1869 GHC Trac Issues: #10970
* Do not test for existence of the executableKai Harries2016-03-284-4/+4
| | | | | | | | | | | | | | | | | Summary: The test for the existence of the executable breaks on MS Windows. It is furthermore needless, because if the test can be executed the executable is obviously there. Reviewers: austin, bgamari, Phyx Reviewed By: Phyx Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D2050 GHC Trac Issues: #4114
* Add option `no-keep-hi-files` and `no-keep-o-files` (fixes #4114)Kai Harries2016-03-249-0/+140
| | | | | | | | | | | | | | | | | Summary: Remove `.hi` and `.o` files if the flags `no-keep-hi-files` and `no-keep-o-files` are given. Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2021 GHC Trac Issues: #4114
* Create empty dump files (fixes #10320)Kai Harries2016-03-243-0/+21
| | | | | | | | | | | | | | Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2015 GHC Trac Issues: #10320
* Fix #11624, cannot declare hs-boot if already one in scope.Edward Z. Yang2016-03-113-18/+20
| | | | | | | | | | | | | | | | | | | | | I'm not sure if this fix is the "right way" to do it, but it solves the proximal problem, which is that lookupBindGroupOcc was picking out the wrong renaming for hs-boot signatures, which then lead to an interface file error. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1963 GHC Trac Issues: #11624
* Print which flag controls emitted lexer warningsHerbert Valerio Riedel2016-02-272-3/+3
| | | | | | | This is extends bb5afd3c274011c5ea302210b4c290ec1f83209c to cover warnings emitted during lexing. This implements another part of #10752
* Print which flag controls emitted desugaring warningsHerbert Valerio Riedel2016-02-271-2/+2
| | | | | | | | | | | This is extends bb5afd3c274011c5ea302210b4c290ec1f83209c to cover warnings emitted during the desugaring phase. This implements another part of #10752 Reviewed-by: quchen, bgamari Differential Revision: https://phabricator.haskell.org/D1954