Commit Graph

1275 Commits

Author SHA1 Message Date
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
cdd0d07877 [minor] Remove whitespace 2020-09-10 08:08:59 +01:00
Ohad Kammar
2ece0e438f Refactor dynamic rebinding of default totality requirement
Dynamic rebind now reinstates default if an error is raised

(following @gallais 's code review)
2020-09-10 08:08:59 +01:00
Ohad Kammar
b2a9ba651c Bugfix 654: forgot to update GenerateDef
When synthesizing clauses, allow synthesised clauses to be
partial.

It's an arbitrary choice, the other choice can be the default
option. But if the place in which we're synthesising has a non-default
choice, then we're synthesising under the wrong option too.
2020-09-10 08:08:59 +01:00
Ohad Kammar
2f5ae26f36 Fix typo 2020-09-10 08:08:59 +01: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
Shay Lewis
53c2bf5885 make constructor injectivity proofs use arguments at 0 multiplicity 2020-09-09 19:57:12 +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
Niklas Larsson
71b9b9dc08
Merge pull request #611 from foss-mc/patch-racket
Improve Racket supporting code
2020-09-03 14:43:57 +02: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
MarcelineVQ
3e4e33110b add semigroup/monoid instances for Unit/()
quite useful to have for more complex libraries and types
2020-09-02 08:42:00 +01:00
russoul
394b433c59 Typo 2020-09-01 16:18:13 +03:00
russoul
a6d767f8fa Remove unused 2020-09-01 15:46:17 +03:00
russoul
16407b7f08 Make sure there is no unexpected holes 2020-09-01 14:34:46 +03:00
russoul
8338b7adbc Tweaks 2020-09-01 14:32:24 +03:00
russoul
52e4a059de Remove unused def 2020-09-01 14:17:39 +03:00
russoul
87a58d30d0 Tweak record error, update expected output 2020-09-01 13:46:06 +03:00
russoul
b5fb108680 Update CHANGELOG.md 2020-09-01 13:33:22 +03:00
russoul
cb1a5f663c Implement #553 V2 2020-09-01 13:31:59 +03:00
russoul
406f9f5099 Space 2020-09-01 13:31:22 +03:00
russoul
0dfd59d695 Add typedriven resolution, make code a bit prettier 2020-09-01 13:31:22 +03:00
Guillaume ALLAIS
9734b72349 [ test ] for empty records 2020-09-01 13:31:22 +03:00
russoul
53fe889b28 Refine test a bit 2020-09-01 13:31:22 +03:00
russoul
f50034a050 Spaces 2020-09-01 13:31:22 +03:00
russoul
0e7ba90e9f Remove Kleisli composition (not used anymore) 2020-09-01 13:31:22 +03:00
russoul
ef00018329 Remove redundant import 2020-09-01 13:31:22 +03:00
russoul
d5a0a58e0b Fix typo 2020-09-01 13:31:22 +03:00
russoul
13634e769e Merge 2020-09-01 13:31:14 +03:00
russoul
8f91d1e810 Clean up 2020-09-01 12:59:34 +03:00
russoul
e40a9ddefe Implement #553 2020-09-01 12:59:34 +03:00
stasoid
a70446c8ff
Clarify what 'invisible' code means in literate.rst (#615)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
Co-authored-by: stasoid <x@x.x>
2020-08-31 18:37:48 +01:00
Donald Thompson
ec65f101fc Update typedd.rst
Added implicit argument to exercise 5 of section 4.2
2020-08-31 18:37:14 +01:00
Guillaume ALLAIS
b449e5ae8a [ fix #361 ] Use the default totality by default 2020-08-31 16:42:53 +01:00
0xd34df00d
7dbafae052 Port Idris 1's Data.Vect.Quantifiers 2020-08-31 12:34:13 +01:00
Rodrigo B. de Oliveira
c5d1f6b4d3 Preserve foreign declaration types in Compiler.ES.ImperativeAst
So backends based on it can expose a simpler FFI.
2020-08-31 08:49:08 +01:00
MarcelineVQ
57e7f14bca add binary literals
Written via "0b" in the manner of other literals. e.g. 0b111001 = 57
2020-08-31 08:48:05 +01:00
russoul
7de26e7d75 Fix #616 2020-08-30 19:32:33 +01:00
foss-mc
d56b090c4c Add missing Data.Stream.Extra module to contrib.ipkg
I forgot to add it
2020-08-28 14:26:11 +01:00
foss-mc
4b7dc38e62 Add Data.Stream.Extra.startWith 2020-08-28 13:16:31 +01:00
foss-mc
e0e883a890
remove a reference to a function of racket/string 2020-08-28 19:23:30 +08:00
foss-mc
979424c8e4
Improve Racket supporting code 2020-08-28 19:02:04 +08:00
Guillaume ALLAIS
9c59542081 [ new ] allow auto fields in records 2020-08-28 11:38:10 +01:00
Guillaume ALLAIS
17b3bb8d3d [ fix ] parser for REPL command :log 2020-08-28 09:17:32 +01:00
Guillaume ALLAIS
c17c6fc522 [ log ] stuck functions found during evaluation 2020-08-27 19:42:52 +01:00