Commit Graph

4464 Commits

Author SHA1 Message Date
David Christiansen
b7756f2d23 Merge pull request #1380 from david-christiansen/no-trace-on-with
Get rid of `trace` in error def
2014-07-11 14:37:55 +02:00
David Christiansen
ec228a0e39 Merge pull request #1377 from puffnfresh/missing-instances
Add Ord instance for Bool
2014-07-11 14:21:08 +02:00
David Christiansen
cfc2386455 Merge pull request #1379 from david-christiansen/paren-S-pat
Add parens on generated S patterns
2014-07-11 14:20:29 +02:00
David Raymond Christiansen
1cdd0df01d Don't do trace when with doesn't match
This breaks IDESlave support. RE #879
2014-07-11 13:57:45 +02:00
David Raymond Christiansen
72f7b58ac3 Add parens on generated S patterns
This fixes an issue where generated S patterns would sometimes not be
parenthesized, leading to invalid patterns being generated. This
occurred even in tutorial code, like Parity.
2014-07-11 13:52:37 +02:00
Brian McKenna
adba5be2e4 Add Ord instance for Bool 2014-07-10 23:52:02 -06:00
David Christiansen
5b723cb221 Merge pull request #1376 from Melvar/ideslave-let
Allow :let in ideslave
2014-07-10 23:07:00 +02:00
Melvar Chen
ab1fbfe63f Allow :let in ideslave 2014-07-10 21:08:04 +02:00
David Christiansen
330eaa526c Merge pull request #1375 from david-christiansen/type-search-in-prover
Make type search work in the prover
2014-07-10 21:06:52 +02:00
David Raymond Christiansen
7d95beceb6 Make type search work in the prover
This patch does two things:

1. It adds support for a new prover command, :search, with the same
syntax and semantics as the REPL command

2. It makes :search work properly with IDESlave, enabling type search
from the Emacs prover as well as enabling length-limits in the IRC bot
again.
2014-07-10 20:24:11 +02:00
David Christiansen
6340534af9 Merge pull request #1371 from david-christiansen/prover-output-color
Prover output color
2014-07-10 01:09:56 +02:00
David Raymond Christiansen
c29e746296 Allow :doc in prover
This supports looking up documentation while proving. It's really most
useful inside of an IDE.
2014-07-10 00:39:36 +02:00
Edwin Brady
e6bec0202e Fix parameter propagation on CAFs
Specifically, only propagate implicit parameters which are missing.
Fixes #1370
2014-07-09 23:23:04 +01:00
Edwin Brady
6c39e35d94 Fix parameter expansion in PEq case 2014-07-09 23:01:22 +01:00
Edwin Brady
ecc52775d9 Remove commented out code 2014-07-09 22:13:50 +01:00
Edwin Brady
ecb9da6d76 Support multiple let bindings
This sort of thing now works:

  test : Nat -> Nat
  test n = let foo = n
               S k = plus foo foo
              in k

The bindings must be aligned, and the keyword 'in' (indented however you
like within the 'test' block) terminates the list.

Pattern match alternatives are also supported, for quickly catching
failures:

  test2 : Nat -> Nat
  test2 n = let foo = n
                S k = plus foo foo
                    | Z => 42
              in k

Fixes #1362
2014-07-09 21:54:36 +01:00
Edwin Brady
1269791525 Keep type arguments of = when unelaborating
This allows more informative error messages when the mismatch is in the
type arguments to =.
2014-07-09 21:15:06 +01:00
David Raymond Christiansen
3a2c8aa862 Make prover better at IDESlave protocol
Instead of returning strings that comprise results, return actions that
complete them. This makes handling which requests are completed much easier.
2014-07-09 21:23:40 +02:00
Edwin Brady
f0ba64c60b Merge pull request #1369 from david-christiansen/prover-output-color
Highlight prover output for ideslave
2014-07-09 19:40:19 +01:00
Edwin Brady
f05e088c33 Merge pull request #1368 from Heather/clean
windows executables should end with .exe
2014-07-09 19:39:38 +01:00
Edwin Brady
9af885a6e1 Highlight differing implicits in errors
But only if there are otherwise no visible differences in the error
2014-07-09 18:59:47 +01:00
Edwin Brady
f5c6883dd7 Update CHANGELOG for unbound implicits 2014-07-09 17:57:52 +01:00
David Raymond Christiansen
e336883cdf Highlight prover output for ideslave 2014-07-09 15:48:13 +02:00
Heather
24acd057c1 windows executables should end with .exe 2014-07-09 16:17:17 +04:00
Edwin Brady
32d47a5304 Ensure erasure happens under 'force'
Fixes #1367
I'm not yet convinced there isn't still potentially a similar problem
under other forms of ProjCase, but since these only arise in unusual
circumstances at the moment there isn't a problem *yet*!
2014-07-08 20:46:49 +01:00
Edwin Brady
6f6a167de1 No need for 'using' in HVect 2014-07-08 13:45:20 +01:00
Edwin Brady
505905da12 Remove some needless 'using' blocks
since the elaborator is now cleverer
2014-07-08 13:32:54 +01:00
Edwin Brady
99ebe20f15 Merge pull request #1364 from puffnfresh/neweffects-bad-constraints
Remove bad Applicative constraints from neweffects
2014-07-08 12:29:36 +01:00
Edwin Brady
2d413784a8 Merge pull request #1363 from bmsherman/parseDef
Fix parser for :def REPL command
2014-07-08 12:29:27 +01:00
Edwin Brady
5ffef8982e Type class resolution fix
Check whether any errors introduced by a match are unrecoverable, rather
than merely checking if any more errors are introduced. Otherwise, in
some circumstances (where other problems are resolved by the match) we
might get a type class resolved where it shouldn't be, leading to
mysterious errors later.

Fixes #1365
2014-07-08 12:25:46 +01:00
Edwin Brady
e363c092a2 Better treatment of unbound implicits
Now uses the elaborator to generate any necessary extra bindings, using
the same machinery as pattern match elaboration. The end result is that
you no longer need 'using' in a lot of cases (it is still useful if you
want to give explicit types, of course). e.g. this now works as it
stands:

  data Elem : a -> Vect n a -> Type where
       Here : Elem x (x :: xs)
       There : Elem x xs -> Elem x (y :: xs)

  isElem : DecEq a => (x : a) -> (xs : _) -> Maybe (Elem x xs)

This should also reduce the number of weird "no such variable" errors
signfificantly. In particular, it fixes #1354
2014-07-08 02:40:37 +01:00
Brian McKenna
8279c8059a Remove bad Applicative constraints from neweffects 2014-07-06 16:46:50 -06:00
bmsherman
fc5a9cba5f Fix parser for :def REPL command 2014-07-06 13:17:25 -04:00
Edwin Brady
3c4bd14521 Merge pull request #1361 from trillioneyes/repl-definitions
Repl definitions
2014-07-06 16:10:42 +01:00
Edwin Brady
d9513aa588 Merge pull request #1360 from ziman/case-elab-erasure
Make case elaboration respect dots
2014-07-06 16:09:27 +01:00
Edwin Brady
cefb325b51 Merge pull request #1358 from ahmadsalim/documentation/partialevaluation
Added some additional documentation for partial evaluation
2014-07-06 16:08:44 +01:00
Matus Tejiscak
61f34560f5 Simplify argsToAlt. 2014-07-06 01:47:50 +01:00
Matus Tejiscak
98352eeb15 Comment clarification. 2014-07-06 01:44:00 +01:00
Matus Tejiscak
019b608d3e Purify toPats. 2014-07-06 01:08:35 +01:00
Matus Tejiscak
15b9807b33 Disable PAny for repeated patvars. 2014-07-06 00:46:23 +01:00
Matus Tejiscak
2490a15c1c Implement accessible+inaccessible splitting. 2014-07-05 20:57:07 +01:00
Matus Tejiscak
1e3734863c More changes to argsToAlt. 2014-07-05 20:47:12 +01:00
Matus Tejiscak
2cc6526fc3 Adjust code around argsToAlt. 2014-07-05 20:17:41 +01:00
Matus Tejiscak
747aaf501c Extend argsToAlt to return a quadruple. 2014-07-05 20:08:09 +01:00
Alyssa Carter
204ebf5f71 Added support for data definitions 2014-07-04 14:22:57 -07:00
Alyssa Carter
bfdec8f2ba Removed some commented-out code 2014-07-04 11:58:46 -07:00
Alyssa Carter
c1277c8035 Handling more forms of definition.
In particular, it should now be possible to define multiple names at once, and to
	 leave off type declarations when the type can be inferred.
2014-07-04 11:55:07 -07:00
Ahmad Salim Al-Sibahi
60b1f18d62 Added some additional documentation for partial evaluation 2014-07-04 20:30:00 +02:00
Matus Tejiscak
c201192844 Bring erasure info to the case tree builder. 2014-07-04 17:22:47 +01:00
Matus Tejiscak
d8ed044c94 Add getInaccessibleArgs. 2014-07-04 17:06:51 +01:00