summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-e
Commit message (Collapse)AuthorAgeFilesLines
* Improve handling of import statements in GHCi (#20473)Morrow2021-11-171-1/+1
| | | | | | | | | | | | | | | | Currently in GHCi, when given a line of user input we: 1. Attempt to parse and handle it as a statement 2. Otherwise, attempt to parse and handle a single import 3. Otherwise, check if there are imports present (and if so display an error message) 4. Otherwise, attempt to parse a module and only handle the declarations This patch simplifies the process to: Attempt to parse and handle it as a statement Otherwise, attempt to parse a module and handle the imports and declarations This means that multiple imports in a multiline are now accepted, and a multiline containing both imports and declarations is now accepted (as well as when separated by semicolons).
* Add tests for #15617.Roland Senn2020-08-313-0/+9
| | | | Avoid a similar regression in the future.
* testsuite: Fix -Wcompat-unqualified-imports issuesBen Gamari2020-02-081-1/+1
|
* testsuite: Use makefile_testBen Gamari2019-01-302-29/+21
| | | | | This eliminates most uses of run_command in the testsuite in favor of the more structured makefile_test.
* Revert "Batch merge"Ben Gamari2019-01-302-21/+29
| | | | This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
* Batch mergeBen Gamari2019-01-302-29/+21
|
* Fix for #13862: Optional "-v" not allowed with :load in GHCiroland2018-09-161-1/+1
| | | | | | | | | | | | | | | Replace the error message `Use -v to see a list of the files searched for.` with `Use -v (or :set -v` in ghci) to see a list of the files searched for.` Reviewers: bgamari, monoidal, thomie, osa1 Subscribers: rwbarton, carter GHC Trac Issues: #13862 Differential Revision: https://phabricator.haskell.org/D5122
* tests: manually move some extra_files into *.T filesReid Barton2017-02-261-1/+2
| | | | | Some of the *.T files were in libraries/hpc, so this contains an update to that submodule.
* Distinguish between UnitId and InstalledUnitId.Edward Z. Yang2016-10-081-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Testsuite: use ignore_stderr/stdout instead of ignore_outputThomas Miedema2016-06-299-14/+35
| | | | | | | | | | | | | | | | | 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
* Testsuite: open/close stdin/stdout/stderr explicitlyThomas Miedema2016-06-281-1/+1
| | | | | | | | | | | | | | | | | | This allows run_command's to contain `|`, and `no_stdin` isn't necessary anymore. Unfortunately it doesn't fix T7037 on Windows which I had hoped it would (testsuite driver tries to read a file that it just created itself, but the OS says it doesn't exist). The only drawback of this commit is that the command that the testsuite prints to the terminal (for debugging purposes) doesn't mention the files that stdout and stderr are redirected to anymore. This is probably ok. Update submodule unix. Differential Revision: https://phabricator.haskell.org/D1234
* Testsuite: fixup req_profiling tests (#11496)Thomas Miedema2016-01-271-1/+1
| | | | | | * T2552 (#10037) is failng for all threaded opt_ways, not for WAY=prof. * TH_spliceE5_prof (#11495) is failing when ghc_dynamic * Rename ghci_dynamic to ghc_dynamic. It's the same thing.
* Don't print "Loaded GHCi configuration" message in ghc -e (#11478)Reid Barton2016-01-224-0/+6
| | | | | | | | | | | | | | | | | | | | | Summary: Also don't print it if the user specifically requested non-verbose output with -v0. Since this means there is no longer any test that checks for the message, add such a test. Test Plan: validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1817 GHC Trac Issues: #11478
* Fix #11256 by not immediately erroring if we can't find a module.Edward Z. Yang2015-12-211-2/+2
| | | | | | | | | | | | Test Plan: validate Reviewers: austin, bgamari, thomie Reviewed By: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D1669 GHC Trac Issues: #11256
* Make 'error' include the CCS call stack when profiledSimon Marlow2015-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The idea here is that this gives a more detailed stack trace in two cases: 1. With `-prof` and `-fprof-auto` 2. In GHCi (see #11047) Example, with an error inserted in nofib/shootout/binary-trees: ``` $ ./Main 3 Main: z CallStack (from ImplicitParams): error, called at Main.hs:67:29 in main:Main CallStack (from -prof): Main.check' (Main.hs:(67,1)-(68,82)) Main.check (Main.hs:63:1-21) Main.stretch (Main.hs:32:35-57) Main.main.c (Main.hs:32:9-57) Main.main (Main.hs:(27,1)-(43,42)) Main.CAF (<entire-module>) ``` This doesn't quite obsolete +RTS -xc, which also attempts to display more information in the case when the error is in a CAF, but I'm exploring other solutions to that. Includes submodule updates. Test Plan: validate Reviewers: simonpj, ezyang, gridaphobe, bgamari, hvr, austin Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1426
* Make GHCi & TH work when the compiler is built with -profSimon Marlow2015-11-072-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Amazingly, there were zero changes to the byte code generator and very few changes to the interpreter - mainly because we've used good abstractions that hide the differences between profiling and non-profiling. So that bit was pleasantly straightforward, but there were a pile of other wibbles to get the whole test suite through. Note that a compiler built with -prof is now like one built with -dynamic, in that to use TH you have to build the code the same way. For dynamic, we automatically enable -dynamic-too when TH is required, but we don't have anything equivalent for profiling, so you have to explicitly use -prof when building code that uses TH with a profiled compiler. For this reason Cabal won't work with TH. We don't expect to ship a profiled compiler, so I think that's OK. Test Plan: validate with GhcProfiled=YES in validate.mk Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang Reviewed By: ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1407 GHC Trac Issues: #4837, #545
* base: use Show for ErrorCall in uncaughtExceptionHandlerEric Seidel2015-09-211-0/+2
| | | | | | | | | | | | | The default top-level exception handler now uses the `Show` instance for `ErrorCall` when printing exceptions, so it will actually print the out-of-band data (e.g. `CallStack`s) in compiled binaries, instead of just printing the error message. This also updates the hpc submodule to fix the test output. Reviewed By: austin, thomie Differential Revision: https://phabricator.haskell.org/D1217
* Testsuite: small test cleanupsThomas Miedema2015-07-181-0/+3
| | | | | | | * don't print anything to stdout * add missing Makefile * also ignore mk/ghcconfig*.mk when using installed compiler * prevent warning: -rtsopts and -with-rtsopts have no effect with -shared
* Don't run T9330fail on Windows, no clobber occurs. #9930Edward Z. Yang2015-05-301-1/+3
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Don't overwrite input file by defaultPhil Ruffwind2015-02-093-0/+7
| | | | | | | | | | | | | | | | Summary: If the default filename of the output executable coincides with that of main source file, throw an error instead of silently clobbering the input file. Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D642 GHC Trac Issues: #9930
* Make ghc -e fail on invalid declarationsReid Barton2014-12-235-0/+17
| | | | | | | | | | | | | | | | | Summary: Note: This commit includes an API change to GhciMonad.runDecls to allow the caller to determine whether the declarations were run successfully or not. Test Plan: harbormaster Reviewers: austin Reviewed By: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D582
* Make ghc -e not exit on valid import commands (#9905)Reid Barton2014-12-236-1/+30
| | | | | | | | | | | | | | | | | | | | | Summary: Some Trues and Falses were mixed up due to Bool being used in different senses in different parts of GHCi. Test Plan: harbormaster; validate Reviewers: austin Reviewed By: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D581 GHC Trac Issues: #9905 Conflicts: ghc/InteractiveUI.hs
* Do not print the result of 'main' after invoking ':main' (fixes #9086).Gintautas Miliauskas2014-07-073-0/+4
|
* Use U+2018 instead of U+201B quote mark in compiler messagesHerbert Valerio Riedel2014-02-251-1/+1
| | | | | | | This matches GCC's choice of Unicode quotation marks (i.e. U+2018 and U+2019) and therefore looks more familiar on the console. This addresses #2507. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add new ghc-e/should_fail test suiteAustin Seipp2013-12-042-0/+9
| | | | | | Also add a basic test for #7962. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Update outputs following the unicode quote change in GHC's outputIan Lynagh2013-02-241-1/+1
|
* Convert more helper functionsIan Lynagh2013-02-111-2/+2
|
* Rename some numeric tests: nnnn -> TnnnnIan Lynagh2013-01-258-11/+11
|
* Add a test for #7299Ian Lynagh2013-01-162-0/+4
|
* Tweak the 2228 configIan Lynagh2012-10-141-1/+1
|
* 2228 is broken on x86_64-unknown-linuxIan Lynagh2012-10-051-1/+4
| | | | (technically, broken if dynamic-by-default is enabled)
* Move tests from tests/ghc-regress/* to just tests/*David Terei2011-07-2015-0/+87