Commit Graph

808 Commits

Author SHA1 Message Date
Niklas Larsson
070cdf1790 Remove the troublesome dependency on regex-compat
Resolves #2919
2016-01-26 18:51:47 +01:00
Niklas Larsson
2e05621b21 Remove the runtest.pl script 2016-01-26 12:49:47 +01:00
Niklas Larsson
da2fb8d92a Posix setEnv has a different signature. 2016-01-24 14:41:17 +01:00
Niklas Larsson
e8c6f5c037 Conditionally import setEnv on old GHC
Comment on the regex-compat dependency
2016-01-24 14:12:25 +01:00
Niklas Larsson
d1144dc405 Make a haskell test runner
This is designed to be drop-in compatible with runtest.pl
2016-01-24 03:26:03 +01:00
Niklas Larsson
1ca661a0ea Reenable parallel testing
Thanks to @Melvar for alerting me to this problem.
2016-01-22 20:37:30 +01:00
Niklas Larsson
5d9112d7ef Use only one line of output per test
Remove unused var
2016-01-22 15:15:19 +01:00
Niklas Larsson
920282f0d4 Keep track of test stats and print the failed tests at the end 2016-01-22 14:18:25 +01:00
Niklas Larsson
b0e8b1258b make the tests respect the IDRIS env variable
Simplify the sandbox lookup and only run it once.

Only run the test script once for 'make test' instead of using the
makefile to iterate.
2016-01-22 06:57:04 +01:00
Niklas Larsson
18d0204d8d Remove escapes from expected output in pkg004 2016-01-22 04:27:34 +01:00
Edwin Brady
220f400ad4 Fix error messages for interfaces 2016-01-19 00:19:31 +00:00
Edwin Brady
6eaf933232 Disambiguation tweak
At the final step, if any elaboration adds new class constraints, reject
it in favour of any which do work.
This is particularly helpful in the case that there are holes which
would otherwise help determine which name is intended.
2016-01-17 21:23:29 +00:00
Edwin Brady
0c5f1de91f Move / into Fractional interface 2016-01-15 13:00:17 +00:00
Edwin Brady
4d0a065f86 Change "class/instance" keywords
To "interface/implementation". Old syntax is still valid but gives a
deprecation warning.
2016-01-13 11:18:33 +00:00
Jan de Muijnck-Hughes
33930f1329 Collection of times during tests optional.
Additionally, Makefiles targets have been added to run timed tests for
the C backend only.
2015-12-15 20:07:01 +00:00
Jan de Muijnck-Hughes
5ffdb61330 Updated timing tests to print using printf. 2015-12-15 20:03:35 +00:00
Jan de Muijnck-Hughes
04d7f5758a Added calculation fof entire test suite run. 2015-12-15 20:03:35 +00:00
Jan de Muijnck-Hughes
9cfd857916 Gather timing data for tests.
To aid in the managment of the test suit, the perl script now records
the duration of each test for compilation and execution. The resulting
time is then displayed to stdout in the form:

    Duration of <test name> was <time>

When running tests locally, test output can be grep'd and graphs
plotted. A good improvement will be the automatic storing of the
results in a dat file.
2015-12-15 20:03:35 +00:00
Edwin Brady
bf4bdcc31e Change file operation names
Old names still work with a deprecation warning. New names are intended
to be more self consistent.
2015-12-14 20:14:03 +00:00
Edwin Brady
e6307e822b Merge pull request #2855 from jfdm/test-stack-aware
Make test script stack aware.
2015-12-14 10:22:18 +00:00
Edwin Brady
32cc7dc71e Merge pull request #2859 from ziman/fix-segfault
Fix segfault in case-lambdas
2015-12-14 10:08:00 +00:00
Edwin Brady
c34329d369 Merge pull request #2769 from lenary/annotate-prelude-with-used
Annotate the Prelude with %used for backends
2015-12-14 10:02:48 +00:00
Matus Tejiscak
45e67fd0b6 Add a regression test. 2015-12-12 16:39:36 +00:00
Jan de Muijnck-Hughes
2f2a225d21 Make test script stack aware.
This commit adds some documentation to the test script file, and more
importantly makes the script stack aware.

When running a test, the script already checks to see how idris is
being built if a cabal sandbox is not being used an additional check
for stack is now made. If neither of the tools were used to build
idris then it is assumed that the default set up is used.
2015-12-11 15:10:25 +00:00
David Raymond Christiansen
3edbd8ee5d Handle impossible cases on defineFunction
Previously, impossible cases were not treated properly when defining
functions through reflection. Now they are checked for impossibility.
2015-12-02 20:28:00 +01:00
David Raymond Christiansen
1527899e07 Merge branch 'elab-lookup-function-def' of https://github.com/shlevy/Idris-dev into shlevy-elab-lookup-function-def 2015-12-02 18:56:56 +01:00
Shea Levy
9f3675a815 Store patvar binding types in idris_patdefs 2015-12-02 11:29:10 -05:00
David Raymond Christiansen
39d643baa9 Merge branch 'elab-lookup-function-def' of https://github.com/shlevy/Idris-dev into shlevy-elab-lookup-function-def 2015-12-02 01:46:48 +01:00
Shea Levy
5eaf49cc05 lookupFunDefn test: Add pruviloj 2015-12-01 08:49:24 -05:00
Shea Levy
3264b8f1ba Add test for lookupFunDefn 2015-12-01 08:00:10 -05:00
David Christiansen
289c5a4fd6 Merge pull request #2832 from david-christiansen/kill-derive-deceq-test
Disable the DecEq deriving test, due to slowness
2015-11-30 23:21:36 +01:00
Edwin Brady
d579d27dfd Add Cast instance for String to Nat 2015-11-30 15:04:14 +00:00
Shea Levy
cdc7238b9f Make FunDefn and FunClause polymorphic over TT and Raw 2015-11-28 12:15:31 -05:00
David Raymond Christiansen
ac06ebb304 Disable the DecEq deriving test, due to slowness
Fixes #2785.
2015-11-27 18:00:43 +01:00
David Raymond Christiansen
7cd0989259 Fix test when Idris is compiled with Curses support 2015-11-27 12:32:04 +01:00
Echo Nolan
8a17e9afe5 Change library and expected test results for Float -> Double change
I changed everything but the reflection and builtin stuff. I don't know
enough to mess with that. So there are a bunch of warnings for
Language.Reflection etc.
2015-11-26 01:26:05 -08:00
Edwin Brady
140d06ab0a Move normalisation of deferred types
No need to do this when collecting deferred names, just do it for
display purposes. It's safer anyway, due to potential name clashes in
the normalisation. Fixes #2806
2015-11-15 13:29:24 +00:00
Edwin Brady
3d2fa6c422 Better elaboration of applications
Sometimes elaboration of applications failed unnecessarily because we
assumed they'd have a simple type, and there'd be a strange error
reported if they didn't. Now use proper dependent application, and drop
back to the original simple version if the type of the function can't be
inferred.
2015-11-15 00:23:17 +00:00
Edwin Brady
bde101fbd0 Better inference for case blocks
Now look at the type of the patterns to infer what the argument type of
the new function should be. This helps if, for example, the scrutinee
function has some type which needs to be resolved to a specific type
class instance, and we can't do this from the scrutinee alone.
2015-11-14 19:15:39 +00:00
Edwin Brady
6011227566 Fix regression with making class bodies
:ac should add a class body when given a class name, but a previous
change stopped this working. Test added to prevent similar accidents in
future.
2015-11-14 17:46:05 +00:00
Edwin Brady
b1872fb189 File IO type indicates possibility of failure
At the cost of having to check the result, file IO operations no longer
silently fail, so you won't get a segfault on trying to read a
non-existent file any more.

Pattern matching alternative notation makes this not too painful (see
Prelude.File.readFile for example)

Also, versions which throw exceptions instead could be implemented in
IOExcept, if exceptions are preferred.
2015-11-01 01:17:16 +00:00
Niklas Larsson
ad9ef67ecf Merge pull request #2775 from bravit/fix/master/withpats
Fix issue #2666 (Invalid syntax accepted)
2015-10-30 22:53:57 +01:00
Sam Elliott
f59d80b294 Update Expected Quasiquote output to reflect changes 2015-10-30 14:16:58 -07:00
Niklas Larsson
9963bbee58 Merge pull request #2759 from jeremy-w/jeremy-w/improve-filename-error-messages
PParser.hs: filename: Report the specific failed check on error
2015-10-30 21:34:32 +01:00
Vitaly Bragilevsky
918440e965 Fix issue #2666 ("with" patterns accepted outside of "with" block)
Parser parses clauses independently so there is no parsing error
in code like this:

    foo : Int -> Bool
    foo 1 | 2 | 3 = True
    foo _ = False

Elaborator can check if it sees with patterns but no enclosing with block,
so we report error in situations like this.
2015-10-30 08:38:39 +03:00
David Christiansen
7b30b6d0bc Merge pull request #2749 from david-christiansen/pruviloj
Pruviloj and Elab updates
2015-10-25 17:25:47 +01:00
Edwin Brady
467490be40 Better case split when all patterns are impossible
When there are no valid cases, instead of deleting existing patterns and
displaying nothing, output "impossible" cases for all the constructors.
2015-10-24 13:53:18 +01:00
Jeremy W. Sherman
429db44ecb test/pkg003: Remove generated executable
It was trying to rm -f a similar but different filename, which left an
executable hanging around after the test.
2015-10-23 19:46:50 -04:00
Jeremy W. Sherman
a636f96bdc Update pkg004/expected for more specific error message 2015-10-23 19:46:22 -04:00
Niklas Larsson
f0f1d72848 Merge pull request #2761 from melted/fix_pkg_opts
Make the pkg tests take the same display options as the other tests.
2015-10-23 15:39:41 +02:00