summaryrefslogtreecommitdiff
path: root/testsuite/tests
Commit message (Collapse)AuthorAgeFilesLines
* Test case for indirect dependencies in ghci linker (#10322)Reid Barton2015-04-186-0/+23
|
* Make T9579 parallel-safe and add build outputs to .gitignoreEdward Z. Yang2015-04-172-0/+12
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Better hints when RTS options not available (Trac #9579)Javran Cheng2015-04-1710-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides user with a better hint when most RTS options are not available (not compiled with `-rtsopts`). A new field "rtsOptsEnabled" is added into RtsFlags.MiscFlags to tell the availablity of RTS options. Some concerns: * Unlike other flag fields in "libraries/base/GHC/RTS/Flags.hsc", "RtsOptsEnabled" is defined in "includes/RtsAPI.h" and lacks constant macros. Therefore In "GHC.RTS", "RtsOptsEnabled" simply derives Enum instance and reads as of type "CInt". * There are other ways to change RTS options (e.g. `-with-rtsopts`), but it might be too verbose to mention. Test Plan: validate Reviewers: austin, hvr, thomie, simonmar Reviewed By: thomie Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D767 GHC Trac Issues: #9579
* Rename tests so that they have a unique name.Iavor S. Diatchki2015-04-163-1/+1
|
* Fix test outputIavor S. Diatchki2015-04-161-3/+3
|
* Fix test output.Iavor S. Diatchki2015-04-161-1/+3
|
* Fixes (hopefully!) T9858Iavor S. Diatchki2015-04-166-0/+40
| | | | | | The changes are: 1. No impredicative types in `Typeable` 2. Distinguish normal tuples, from tuples of constraints.
* Add exception for `KnownNat` and `KnownSymbol` in super classes.Iavor S. Diatchki2015-04-162-0/+25
| | | | | | | The situation is similar to `Typeable`---we can't set the evidence outside the solver because we have custom solving rules. This is safe because the computed super-class instances can't possibly depend on the new instance.
* Improve Call Arity performanceJoachim Breitner2015-04-152-1/+10
| | | | | | | | | | | | | | | This improves how the Call Arity deals with "boring" variables. Boring variables are those where it does not bother to include in the analysis result, so whenever something is looked up in the analysis result, we have to make a conservative assumption about them. Previously, we extended the result with such conservative information about them, to keep the code uniform, but that could blow up the amount of data passed around, even if only temporarily, and slowed things down. We now pass around an explicit list (well, set) of variable that are boring and take that into account whenever we use the result. Not as pretty, but noticably faster.
* Fix fundep coverage-condition check for poly-kindsSimon Peyton Jones2015-04-152-0/+11
| | | | | | | | | See Note [Closing over kinds in coverage] in FunDeps. I'd already fixed this bug once, for Trac #8391, but I put the call to closeOverKinds in the wrong place, so Trac #10109 failed. (It checks the /liberal/ coverage condition, which The fix was easy: move the call to the right place!
* Do not allow Typeable on constraints (Trac #9858)Simon Peyton Jones2015-04-146-0/+58
| | | | | | | | | | | | | | | The astonishingly-ingenious trio of Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn managed to persuade GHC 7.10.1 to cough up unsafeCoerce. That is very bad. This patch fixes it by no allowing Typable on Constraint-kinded things. And that seems right, since it is, in effect, a form of impredicative polymorphism, which Typeable definitely doesn't support. We may want to creep back in the direction of allowing Typeable on constraints one day, but this is a good fix for now, and closes a terrible hole.
* Implement -f[no-]print-unicode-syntax flag for unicode syntax output (#8959)Bertram Felgenhauer2015-04-143-3/+4
| | | | | | | | | | | | | | There is currently no way to separate whether UnicodeSyntax is accepted for input from the corresponding output syntax using unicode symbols. This patch implements a separate flag for affecting ghc(i)'s output. Signed-off-by: Bertram Felgenhauer <int-e@gmx.de> Reviewed By: nomeata, austin Differential Revision: https://phabricator.haskell.org/D807 GHC Trac Issues: #8959
* ApiAnnotations : lexer discards comment close in nested commentAlan Zimmerman2015-04-143-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | When parsing a nested comment, such as {- {- nested comment -} {-# nested pragma #-} -} The lexer returns the comment annotation as {- {- nested comment {-# nested pragma # -} Restore the missing comment end markers in the annotation. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D829 GHC Trac Issues: #10277
* API Annotations : ExprWithTySig processing discards annotated spansAlan Zimmerman2015-04-147-1/+160
| | | | | | | | | | | | | | | | | | | | | | | In RdrHsSyn.checkAPat the processing for ExprWithTySig is defined as ExprWithTySig e t _ -> do e <- checkLPat msg e -- Pattern signatures are parsed as sigtypes, -- but they aren't explicit forall points. Hence -- we have to remove the implicit forall here. let t' = case t of L _ (HsForAllTy Implicit _ _ (L _ []) ty) -> ty other -> other return (SigPatIn e (mkHsWithBndrs t')) The t' variable ends up losing its original SrcSpan in the first case branch. This results in annotations becoming detached from the AST. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D823 GHC Trac Issues: #10255
* Add "error:" prefix to error-messagesKonstantine Rybnikov2015-04-141-3/+4
| | | | | | | | | | | Add "error:" prefix to error-messages, also lowercase "Warning:" message to match GCC behavior closer. Reviewed By: thomie, austin Differential Revision: https://phabricator.haskell.org/D811 GHC Trac Issues: #10021
* Zap usage info in CSE (Trac #10218)Simon Peyton Jones2015-04-144-2/+22
| | | | | | | | | | | | | | | | | Trac #10218 reports a subtle bug that turned out to be: - CSE invalidated the usage information computed by earlier demand analysis, by increasing sharing - that made a single-entry thunk into a multi-entry thunk - and with -feager-blackholing, that led to <<loop>> The patch fixes it by making the CSE pass zap usage information for let-bound identifiers. It can be restored by -flate-dmd-anal. (But making -flate-dmd-anal the default needs some careful work; see Trac #7782.)
* parser : the API annotation on opt_sig is being discardedAlan Zimmerman2015-04-143-6/+20
| | | | | | | | | | | | | | | | | | | The opt_sig production is defined as opt_sig :: { ([AddAnn],Maybe (LHsType RdrName)) } : {- empty -} { ([],Nothing) } | '::' sigtype { ([mj AnnDcolon $1],Just $2) } It is used in the alt and decl_no_th productions, but neither of them add the returned annotations. This commit captures the annotations in the calling productions. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D822 GHC Trac Issues: #10254
* parser: API Annotations : guardquals1 does not annotate commas properlyAlan Zimmerman2015-04-143-131/+173
| | | | | | | | | | | | | | | | | The `guardquals1` production includes : guardquals1 ',' qual {% addAnnotation (gl $ last $ unLoc $1) AnnComma (gl $2) >> return (sLL $1 $> ($3 : unLoc $1)) } The AnnComma should be attached to `(gl $ head $ unLoc $1)`, rather than `last`. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D818 GHC Trac Issues: #10256
* parser: opt_kind_sig has incorrect SrcSpanAlan Zimmerman2015-04-143-6/+29
| | | | | | | | | | | | | | | | | | | | The production for opt_kind_sig is opt_kind_sig :: { Located (Maybe (LHsKind RdrName)) } : { noLoc Nothing } | '::' kind {% ajl (sLL $1 $> (Just $2)) AnnDcolon (gl $1) } The outer Location is used only to get the full span for the enclosing declration, and is then stripped. The inner LHsKind then has a SrcSpan that does not include the '::' Extend the SrcSpan on $2 to include $1 Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D813 GHC Trac Issues: #10209
* Typos in error messages and in commentsGabor Greif2015-04-105-8/+8
|
* Test Trac #8030Simon Peyton Jones2015-04-083-0/+36
|
* Axe one-shot sig-ofEdward Z. Yang2015-04-077-15/+15
| | | | | | | | | | | | | | | | | Summary: We're getting rid of -sig-of foo:A usage, because it doesn't make sense in any compilation mode besides one-shot, and we don't expect users to use it anyway. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D789
* Commit missing T10148 files and ignore the built executable.Edward Z. Yang2015-04-072-0/+7
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Support for multiple signature files in scope.Edward Z. Yang2015-04-0725-2/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A common pattern when programming with signatures is to combine multiple signatures together (signature linking). We achieve this by making it not-an-error to have multiple, distinct interface files for the same module name, as long as they have the same backing implementation. When a user imports a module name, they get ALL matching signatures dumped into their scope. On the way, I refactored the module finder code, which now distinguishes between exact finds (when you had a 'Module') and regular finds (when you had a 'ModuleName'). I also refactored the package finder code to use a Monoid instance on LookupResult to collect together various results. ToDo: At the moment, if a signature is declared in the local package, it completely overrides any remote signatures. Eventually, we'll want to also pull in the remote signatures (or even override the local signature, if the full implementation is available.) There are bunch of ToDos in the code for what to do once this is done. ToDo: At the moment, whenever a module name lookup occurs in GHCi and we would have seen a signature, we instead continue and return the Module for the backing implementation. This is correct for most cases, but there might be some situations where we want something a little more fine-grained (e.g. :browse should only list identifiers which are available through the in-scope signatures, and not ALL of them.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, hvr, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D790 GHC Trac Issues: #9252
* Final error message wibbleSimon Peyton Jones2015-04-071-1/+1
|
* More error message wibblesSimon Peyton Jones2015-04-0710-104/+68
| | | | | | ..due to suppressing base-package module names. Needs a submodule update on array.
* Test Trac #10148Simon Peyton Jones2015-04-073-0/+29
|
* The production for squals is incorrect; see D806 for specifics.Alan Zimmerman2015-04-0711-22/+72
| | | | | | | | | | This diff depends on D803. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D806 GHC Trac Issues: #10214
* The production for `pquals` is incorrect; the specifics are in D803.Alan Zimmerman2015-04-077-3/+256
| | | | | | | | Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D803 GHC Trac Issues: #10207
* Replace endian test by 64-bit word access in T7600Peter Trommler2015-04-071-34/+12
| | | | | | | | | | | | | | | | In commit 3f30912f an include `ghcconfig.h` was added for `WORDS_BIGENDIAN`. Converting the floating point array to a `Word64` array avoids using the preprocessor altogether and leads to smaller code. Fixes #10239 Reviewed By: rwbarton, austin Differential Revision: https://phabricator.haskell.org/D795 GHC Trac Issues: #10239
* Look inside synonyms for foralls when unifyingSimon Peyton Jones2015-04-073-0/+15
| | | | This fixes Trac #10194
* More aggressive Given/Wanted overlap checkSimon Peyton Jones2015-04-072-0/+32
| | | | | | | | | | | | | This fixes Trac #10195 For some reason we considered untouchability before, but Trac #10195 shows that this is positively worng. See Note [Instance and Given overlap] in TcInteract. Looking at the Git log, it seems that this bug was introduced at the same time that we introduced the Given/Wanted overlap check in the first place.
* Put quotes round a Name in an error messageSimon Peyton Jones2015-04-075-22/+21
| | | | Cosmetic consistency only
* Do not quantify over the function itself in a RULESimon Peyton Jones2015-04-072-0/+42
| | | | | | | We were erroneously quantifying over the function when it had a dictionary type. A bit pathological, but possible. This fixes Trac #10251
* GHC.Prim.Constraint is not built-in syntaxSimon Peyton Jones2015-04-073-0/+7
| | | | This fixes Trac #10233
* Error msg wibbles from reduced module prefixesSimon Peyton Jones2015-04-0739-785/+710
|
* testdriver: delete unused waysThomas Miedema2015-04-071-0/+3
| | | | | | | | | And mention more prominently that `-DDEBUG` and tests that call `compiler_stats_num_fields` don't play well together Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D799
* Typechecker: refactoring onlyThomas Miedema2015-04-071-1/+1
| | | | | | | | | * don't call `nlHsPar`, as `genOpApp` already does so. * don't reimplement `isUnboxedTupleTyCon` and `isBoxedTupleTyCon`. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D798
* Stop profiling output from running together (#8811)Dave Laing2015-04-0611-235/+244
| | | | | | Reviewed By: thomie Differential Revision: https://phabricator.haskell.org/D779
* Test case for #10246Joachim Breitner2015-04-065-0/+54
| | | | | still marked known_broken. This also adds the test case for #10245, which should pass once #10246 is fixed.
* testsuite: skip T10017 on WindowsAustin Seipp2015-04-031-1/+2
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* testsuite: fix failing amd64/Windows perf testsAustin Seipp2015-04-032-7/+15
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Comments only, mostly typosThomas Miedema2015-04-031-1/+1
| | | | [skip ci]
* Data.Complex: Derive GenericBen Gamari2015-04-033-4/+7
| | | | | | Reviewed By: hvr, austin Differential Revision: https://phabricator.haskell.org/D770
* parser: allow type-level cons in prefix positionKinokkory2015-04-032-0/+14
| | | | | | | | Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D768 GHC Trac Issues: #10188
* Fix validate linenumber off-by-oneThomas Miedema2015-04-031-1/+1
|
* Change 'Tab character' warnings so there is one per file (#9723)Dave Laing2015-04-028-5/+50
| | | | | | | | Reviewed By: nomeata, thomie Differential Revision: https://phabricator.haskell.org/D760 Signed-off-by: Dave Laing <dave.laing.80@gmail.com>
* Fake (->) fixity declaration (#10145)Oleg Grenrus2015-04-025-0/+10
| | | | | | Reviewed By: simonpj, austin Differential Revision: https://phabricator.haskell.org/D741
* Change which files --make thinks are 'Haskellish' (#10220)Thomas Miedema2015-04-013-0/+7
| | | | | | | | | | | | | | | | `.hspp` and `.hscpp` are haskell files that have already been preprocessed. Treat `.hspp` and `.hscpp` as Haskellish sources again, as they were before commit a10e1990. This way, ghc --make will load their imports. Make sure that `.cmm` and `.cmmcpp` are still not treated as Haskellish, by moving them out of `haskell_src_suffixes` (but still keeping them in haskellish_suffixes, though I'm not sure what the purpose of that group is). Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D778
* Don't throw exception when start_phase==stop_phase (#10219)Thomas Miedema2015-03-312-0/+6
| | | | | | | | | Just do nothing instead. This bug only shows up when using `-x hspp` in --make mode on registerised builds. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D776