Commit Graph

987 Commits

Author SHA1 Message Date
Edwin Brady
f33873d051 Add IDE mode commands for gdnext and psnext
I forgot to add these to the parser!
2020-07-27 14:44:09 +01:00
Edwin Brady
3a0a566607
Merge pull request #498 from edwinb/search-stuff
More search improvements
2020-07-27 14:14:59 +01:00
Edwin Brady
df635cf8d7 Add :psnext and :gdnext at the REPL
These continue the search from :ps and :gd next respectively, giving the
next search result until there are no more results.
Correspondingly, added ':proof-search-next' and ':generate-def-next' in
IDE mode, which continue the search from the previous ':proof-search'
and ':generate-def' respectively.
2020-07-27 13:45:10 +01:00
Edwin Brady
f8ef44f1b0 Allow multiple results from generate-defs
Return a 'Search' rather than a single definition. Also, change the
order of search in expressions so that we look at recursive calls
earlier when under a constructor - the assumption being that this is
more likely than nested constructors.
2020-07-27 12:04:39 +01:00
Edwin Brady
58bc918f5d
Merge pull request #497 from edwinb/exprsearch
Reorganise expression search
2020-07-26 18:08:42 +01:00
Edwin Brady
c860e5e690 Merge github.com:idris-lang/Idris2 2020-07-26 17:39:00 +01:00
Edwin Brady
6d96341776 Reorganise expression search
Rather than returning a complete list of results, return a pair of the
first result, and a continuation. The continuation explains how to
continue the search if the given result is deemed unacceptable (either
on encountering an error somewhere, or just if the caller wants the next
result).

This means we don't search needlessly if we're only looking for the
first result. Fixes #228
2020-07-26 17:34:24 +01:00
Ohad Kammar
915b7bea38 Add various instances from stdlib interfaces (Eq, Ord, DecEq)
For Void and Either

This is because I ended up using them elsewhere, so why not include them in the stdlib.

Also expose left/rightInjective functions, as are used in the DecEq proofs.
2020-07-26 10:47:38 +01:00
Niklas Larsson
eeb1d22234
Merge pull request #492 from donovancrichton/pi-type-pattern-match
Added explicit case to headEq to allow matching on Pi Types.
2020-07-25 11:50:58 +02:00
Donovan Crichton
048f1887ea Added explicit case to headEq to allow matching on Pi Types. 2020-07-25 12:59:33 +10:00
Rui Barreiro
736b91b118 ups 2020-07-24 20:23:34 +01:00
Rui Barreiro
7e27d03ef9
Update docs/source/backends/javascript.rst
Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2020-07-24 19:10:11 +01:00
Rui Barreiro
503c513aef
Update docs/source/backends/javascript.rst
Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2020-07-24 19:09:47 +01:00
Rui Barreiro
99ea8f59aa
Update docs/source/backends/javascript.rst
Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2020-07-24 19:09:38 +01:00
Rui Barreiro
10be065553
Update docs/source/backends/javascript.rst
Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2020-07-24 19:09:27 +01:00
Rui Barreiro
211a5e55cc javascript codegen minimal doc 2020-07-24 18:28:20 +01:00
Giuseppe Lomurno
39f23ffd9b Prec version of pretty interface 2020-07-24 15:19:17 +01:00
Giuseppe Lomurno
ab1f383912 Laziness annotations for performance 2020-07-24 15:19:17 +01:00
Giuseppe Lomurno
62524e8462 Tree representation for prettyprinting 2020-07-24 15:19:17 +01:00
Giuseppe Lomurno
3d51af46c2 Namespace change 2020-07-24 15:19:17 +01:00
Giuseppe Lomurno
eb659ba907 Added prettyprinting library 2020-07-24 15:19:17 +01:00
Adam Harries
3f4fd8e4aa
Document samples/ffi, and change name of .so to better suit convention. (#474)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2020-07-24 13:21:48 +01:00
Niklas Larsson
2542c325b1
Merge pull request #482 from iclanzan/patch-2
Fix typo
2020-07-23 14:51:31 +02:00
Niklas Larsson
57f89ccd9a
Merge pull request #485 from melted/directive_arg
Add `--directive` cli option
2020-07-23 14:50:53 +02:00
Niklas Larsson
7e0bca23fd Add --directive cli option
It sends a codegen directive to the current codegen. It's useful
for sending options you don't want to hard code in the source. Examples
include enabling profiling or setting a target.
2020-07-23 13:50:46 +02:00
Niklas Larsson
ff235bd30b
Merge pull request #483 from nixCodeX/fromInteger-0
Fix fromInteger 0 for Bits8, Bits16, Bits32, Bits64
2020-07-21 17:32:49 +02:00
Jonathan Tanner
5c73ada68a Fix fromInteger 0 for Bits8, Bits16, Bits32, Bits64 2020-07-21 15:29:09 +01:00
Sorin Iclanzan
2d15b59e6d
Fix typo 2020-07-21 09:26:46 -04:00
Denis Buzdalov
0119c217c9 Putting .ipkg mentioning to a variable and making names symmetrical. 2020-07-21 11:05:47 +01:00
Niklas Larsson
8a210d536e
Merge pull request #408 from melted/buffer_api
Add concatBuffers and splitBuffer to Data.Buffer
2020-07-21 10:43:17 +02:00
Jonathan Chan
dab2b0d146 Export (~>) publicly.
If `(~>)` isn't publicly exported, the type checker doesn't know that `Mor` constructs something of type `~>`.
2020-07-20 15:55:24 +01:00
Edwin Brady
0871494b5e
Merge pull request #479 from edwinb/fix-443
Delay building references for case blocks
2020-07-18 20:00:03 +01:00
Edwin Brady
690328421a Delay building references for case blocks
...until the definition is complete. This is necessary since sometimes
information outside the case block can help resolve interfaces, and in
the simplest case, we might just have delayed resolving a default
Integer. It turns out this was also an obscure bug waiting to happen
with coverage checking of nested case blocks (so there's a test update
there too).

Fixes #443
2020-07-18 19:22:03 +01:00
Edwin Brady
b6506442e7
Merge pull request #477 from edwinb/reflection-perf
Improve elaborator reflection performance
2020-07-17 16:15:01 +01:00
Edwin Brady
f303e469fb Improve elaborator reflection performance
In a 'Bind', normalise the result of the first action, rather than
quoting the HNF. This improves performance since the HNF could be quite
big when quoted back.

Ideally, we wouldn't have to quote and unquote here, and we can probably
achieve this by tinkering with the evaluator.

This has an unfortunate effect on the reflection002 test, in that the
"typed template Idris" example now evaluates too much. But, I think the
overall performance is too important for the primary motivation
behind elaborator reflection. I will return to this!
2020-07-17 15:18:23 +01:00
Nick Drozd
a2bdf8e6d7 Add some algebra implementations 2020-07-17 08:25:20 -05:00
Niklas Larsson
fd9de745ae
Merge pull request #467 from elsanussi-s-mneina/patch-1
fix typo: "lowercase later" to "lowercase letter"
2020-07-16 14:10:56 +02:00
elsanussi-s-mneina
19bced702d
fix typo: "lowercase later" to "lowercase letter"
I think this is a spelling mistake.
2020-07-15 09:50:19 -04:00
Niklas Larsson
6233bbd583
Merge pull request #465 from memoryruins/case-declarations
Wrap Javascript case clauses in brackets to prevent conflicting declarations
2020-07-14 21:29:02 +02:00
memoryruins
7ab00bd191 add test for js case clause scopes 2020-07-14 14:22:08 -04:00
Guillaume ALLAIS
62a5406533 [ fix #454 ] compiling nonexisting file 2020-07-14 15:23:00 +01:00
memoryruins
1c6804f82b wrap js case clauses in brackets to prevent conflicting declarations 2020-07-14 09:44:54 -04:00
Mark Barbone
acda3b44a9
Make Text.Parser.between lazy (#385) 2020-07-14 14:33:22 +01:00
Dmitry
de00ff74d5
Allow to override log level with package options (#411) 2020-07-14 12:17:03 +01:00
G. Allais
0908e76515
[ fix #346 ] Pull List.length into prelude (#450) 2020-07-14 12:15:57 +01:00
Nicolas Biri
aba76206c9 Remove dependency to Vector length in deleteAt 2020-07-14 09:45:33 +01:00
Niklas Larsson
7920eb8a0e
Merge pull request #456 from chrrasmussen/patch-1
Update reference to %auto_implicits in implementation notes
2020-07-13 11:53:01 +02:00
Niklas Larsson
26f9c8a25c
Merge pull request #459 from rbarreiro/master
fix #447
2020-07-13 10:18:36 +02:00
Niklas Larsson
d6c4393517
Merge pull request #427 from nickdrozd/more-changes
Minor simplifications
2020-07-13 10:17:31 +02:00
Nick Drozd
e14a589e90 Consolidate boolean expressions 2020-07-12 21:00:33 -05:00