Commit Graph

231 Commits

Author SHA1 Message Date
Nicolas A. Schmidt
ef6cbcf658
Auto-implicit __con now added before implicits. (#659) 2020-12-07 11:41:47 +00:00
Denis Buzdalov
b3542d66fc
Have lambda-case available everywhere lambda is (#819) 2020-12-07 11:34:48 +00:00
Guillaume ALLAIS
d30e984137 [ debug ] Give the option to log off 2020-12-07 11:33:37 +00:00
russoul
46519237cd Merge 2020-12-03 15:28:20 +03:00
G. Allais
502f544d73
[ fix #775 ] integerToNat is not, in fact, id (#799) 2020-11-27 18:48:19 +00:00
Yu Zhang
08a35d694c
Improving error messages (#786)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2020-11-26 11:35:55 +00:00
Denis Buzdalov
60c8695a6d Editor was made run apostrophe-containing modules from REPL normally. 2020-11-26 11:17:36 +00:00
Denis Buzdalov
9990b5ad29 Namespaces were shadowed in all standard codegens.
This allows, for exmaple, to have apostrophes in module names.
Test was added only for chez, however this should be viable for all
targets with `:exec` implemented.
2020-11-26 11:17:36 +00:00
Guillaume ALLAIS
22bfa90971 [ fix ] recoverability criteria
If the "can't convert" error arises from a mismatch between a type
constructor and a primitive value, it is not recoverable.
2020-11-11 19:10:34 +00:00
Christian Rasmussen
66fe57f340 Run tests chez029 and node022 via code generator 2020-10-24 12:34:04 +01:00
Guillaume ALLAIS
14d0141ca2 [ fix #735 ] Make sure type constructors are fully applied 2020-10-16 14:44:11 +01:00
russoul
fd90141ed9 Merge branch 'master' of https://github.com/idris-lang/Idris2 into master 2020-10-12 17:36:45 +03:00
Matus Tejiscak
668762e693 Merge branch 'revert-projections' into master 2020-10-11 08:12:00 +02:00
russoul
0824e93874 Add more defs and comments into the test file 2020-10-03 19:26:21 +03:00
russoul
98bfff4a27 Merge branch 'master' of https://github.com/idris-lang/Idris2 into master 2020-10-03 11:51:48 +03:00
russoul
d49bf75eac Clean up 2020-10-03 11:50:38 +03:00
G. Allais
4a61146ba0
[ fix #705 ] Normalise primitives in mkPat (#718)
[ log ] prettier log for pats & clauses
[ re #650 ] Even lazier
[ fix #705 ] normalise primitives in mkPat
[ refactor ] introduce getPrimitiveNames
2020-10-02 12:22:57 +01:00
russoul
a667aae797 Fix another DPair parsing regression 2020-10-02 11:22:48 +01:00
russoul
b57b28a64e Implement new application syntax
Add syntax for bind-all-explicits

Add new record update syntax

Remove PInstance
2020-10-01 12:43:43 +03:00
Ruslan Feizerahmanov
1d99a28176
Add Bifunctor interface (#701) 2020-09-30 10:51:07 +01:00
russoul
af62955e07 Merge branch 'master' of https://github.com/idris-lang/Idris2 into master 2020-09-29 12:58:28 +03:00
G. Allais
3df1f9c476
[ fix #63 ] interleaving let binders and local declarations (#691) 2020-09-28 13:15:22 +01:00
Guillaume ALLAIS
416b9578e5 [ fix #37 ] Use filename if we already know it 2020-09-24 15:56:23 +01:00
Guillaume ALLAIS
0d08c0b81b [ log ] for desugaring of idioms 2020-09-24 15:27:40 +01:00
MarcelineVQ
961a28ee64 fix idiom brackets to account for IAlternative
Things like (,) () aren't straightforward IVar's but are IAlternative's
which present options about how the term should resolve. [| |] was not
accounting for this.
2020-09-24 15:27:40 +01:00
Guillaume ALLAIS
cc31076849 [ test ] more corner cases
Making sure the test can distinguish between truncating & rounding.
2020-09-23 19:48:58 +01:00
Guillaume ALLAIS
621a9202ed [ test ] making sure cast works 2020-09-23 19:48:58 +01:00
Christian Rasmussen
091465525b Remove FArgList 2020-09-23 18:33:19 +01:00
G. Allais
8d09ec9c93
[ new ] comma-separated interface parameters (#682) 2020-09-19 15:29:23 +01:00
G. Allais
3008c48f77
Adding a whole bunch of tuple sections (#680) 2020-09-19 14:51:57 +01:00
Guillaume ALLAIS
2bb95e59ef [ re #660 ] eta-contract parameter candidates 2020-09-16 15:45:16 +01:00
Guillaume ALLAIS
1152aa3cdd [ re #660 ] inline lets when detecting parameters 2020-09-16 15:45:16 +01:00
Giuseppe Lomurno
98e54cea2f Missing runElab decl check 2020-09-16 12:06:38 +01:00
Guillaume ALLAIS
65e194e9bb [ re #660 ] Positivity checking for empty types 2020-09-14 18:37:47 +01:00
Matus Tejiscak
9652179990 Add two cases to the record projection test. 2020-09-11 00:29:14 +02:00
Matus Tejiscak
d98686d4f8 Update doc, fix tests. 2020-09-10 20:33:08 +02:00
Matus Tejiscak
e491e2969e Re-introduce %prefix_record_projections. 2020-09-10 20:18:51 +02:00
Matus Tejiscak
aebe3c19d9 Revert postfix dotted application. 2020-09-10 19:00:48 +02:00
Ohad Kammar
0600a9ba11 Fix bug #654
Auxiliary functions introduced in elaboration (e.g., through case splits and with clauses) now
have the same totality annotation as the function they're defined in.

Moved auxiliary function `findSetTotal` into `Context.idr` since it's
now used by `ProcessDef.idr` too.

Added a totality requirement argument to `checkClause` so that the
with-clause case could propagate it to the functions it generates in
elaboration.

Sandwhich the rhs elaboration in pattern matches with code that sets
the global, default, totality requirement to the current one, and
restores the previous default afterwards. It's a bit of a hacky way to
do it, but I don't think we have a better alternative with the current
design.
2020-09-10 08:08:59 +01:00
G. Allais
1963ac8786
[ fix #650 ] Lazier match in NPrimVal vs. ConCase (#655) 2020-09-09 17:17:07 +01:00
G. Allais
a0c0974676
[ debug ] pretty printer for case trees (#652) 2020-09-09 16:22:22 +01:00
russoul
9565f6cf8b Fix DPair parsing 2020-09-05 11:08:44 +01:00
G. Allais
937aa8fc43
[ refactor ] introducing Namespace (#638)
Until now namespaces were stored as (reversed) lists of strings.
It led to:

* confusing code where we work on the underlying representation of
  namespaces rather than say what we mean (using `isSuffixOf` to mean
  `isParentOf`)

* potentially introducing errors by not respecting the invariant cf.
  bug report #616 (but also name generation in the scheme backend
  although that did not lead to bugs as it was self-consistent AFAICT)

* ad-hoc code to circumvent overlapping interface implementation when
  showing / pretty-printing namespaces

This PR introduces a `Namespace` newtype containing a list of strings.
Nested namespaces are still stored in reverse order but the exposed
interface aims to support programming by saying what we mean
(`isParentOf`, `isApproximationOf`, `X <.> Y` computes to `X.Y`, etc.)
irrespective of the underlying representation.
2020-09-05 09:41:31 +01:00
Guillaume ALLAIS
529944267b Revert "[ refactor ] Introducing Namespace and ModuleIdent (#631)"
This reverts commit 481dc431e7.
2020-09-04 09:16:06 +01:00
G. Allais
481dc431e7
[ refactor ] Introducing Namespace and ModuleIdent (#631)
Until now namespaces were stored as (reversed) lists of strings.
It led to:

* confusing code where we work on the representation rather than say
  what we mean (e.g. using `isSuffixOf` to mean `isParentOf`)

* potentially introducing errors by not respecting the invariant cf.
  bug report #616 (but also name generation in the scheme backend
  although that did not lead to bugs as it was self-consistent AFAICT)

* ad-hoc code to circumvent overlapping interface implementations when
  showing / pretty-printing namespaces

This introduces a Namespace newtype containing non-empty lists of
strings. Nested namespaces are still stored in reverse order but the
exposed interface aims to support programming by saying what we mean
(`isParentOf`, `isApproximationOf`, `X <.> Y` computes to `X.Y`, etc.)
irrespective of the underlying representation.
2020-09-02 20:05:33 +01:00
russoul
394b433c59 Typo 2020-09-01 16:18:13 +03:00
russoul
16407b7f08 Make sure there is no unexpected holes 2020-09-01 14:34:46 +03:00
russoul
87a58d30d0 Tweak record error, update expected output 2020-09-01 13:46:06 +03:00
russoul
cb1a5f663c Implement #553 V2 2020-09-01 13:31:59 +03:00
russoul
0dfd59d695 Add typedriven resolution, make code a bit prettier 2020-09-01 13:31:22 +03:00