Commit Graph

5 Commits

Author SHA1 Message Date
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
David Raymond Christiansen
752a2fcc77 Update tests for proof deprecation 2015-09-10 12:01:39 +02:00
Andreas Reuleaux
c193a40710 adjust test totality003 with --consolewidth for use with -f curses 2015-03-19 17:44:50 +00:00
Jeff Hemphill
1275b9e8cc Fix a bug in qsort
Try `qsort [3,3]`. Under the old code, you'd get `[3,3,3]` out.
2014-07-18 00:58:54 -07:00
Edwin Brady
526cd757e0 Add assert_smaller function
assert_smaller x y evaluates to y, and asserts to the totality checker
than y is structurally smaller than x. This can be used to explain the
reasoning for totality if the checker cannot work it out itself. For
example:

total
qsort : Ord a => List a -> List a
qsort [] = []
qsort (x :: xs)
   = qsort (assert_smaller (x :: xs) (filter (<= x) xs)) ++
      (x :: qsort (assert_smaller (x :: xs) (filter (>= x) xs)))

The expression 'assert_smaller (x :: xs) (filter (<= x) xs)' asserts
that the result of the filter will always be smaller than the pattern
(x :: xs).

Using this is always preferable to %assert_total if the termination
argument can be explained in this way.
2014-02-01 22:52:22 +00:00