Guillaume ALLAIS
230f42b697
[ re #1771 ] Do not use Erased to go under binders
...
In the `MkFix : f (Fix f) -> Fix f` example, using `Erased` for `f`
makes the type reduce to `[__] (Fix [__]) -> Fix [__]` and because
`[__] e1 ... en` computes to `[__]`, we end up with `[__] -> Fix [__]`
which does not reference `Fix` anymore.
2021-07-23 13:30:24 +01:00
Nick Drozd
ab36ad71cf
Simplify a few Factor proofs
...
A few proofs have been rewritten, a few unnecessary cases cut, and
lots of unnecessary "explicit implicits" have been cut. Probably these
implicits were required when the code was initially written, and
inference has improved since then.
2021-07-19 08:30:47 +01:00
Stepan Koltsov
ce44d3b50a
Change semantics of lines and unlines function to match Haskell and other languages ( #1585 )
...
* Add trailing newline on non-empty list in unlines
There are several reasons to do that:
* a line in a text file is something which ends with newline,
and the last line is not special
* `unlines []` should be different from `unlines [""]`
* `unlines (a ++ b) = unlines a ++ unlines b`
* Haskell does it
* Change lines function behaviour
2021-07-17 14:54:23 +01:00
Stiopa Koltsov
c80a502627
Return Bool from IOArray.writeArray
...
As suggested in #1677 .
Crashing on out-of-bounds might be more practical, but we can
reconsider it later.
2021-07-15 22:16:22 +01:00
Nick Drozd
9cca3a7d35
Use Not instead of -> Void ( #1667 )
2021-07-13 15:32:01 +01:00
Nick Drozd
61b9a3e4e5
Define and implement Relation interfaces ( #1472 )
...
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-07-09 09:06:27 +01:00
Alissa Tung
2865a70a6e
[ base ] add List functions ( #1550 )
...
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-07-01 08:00:12 +01:00
Nick Drozd
63a6b16517
Cut unneeded type specifications
2021-06-28 16:22:27 +01:00
Nick Drozd
f49aa3c001
Simplify a few more lambdas
2021-06-28 15:57:21 +01:00
technic93
0aa968fe56
Add Split and SplitRec views for Vect ( #1624 )
...
Co-authored-by: Denis Buzdalov <public@buzden.ru>
2021-06-28 15:54:43 +01:00
Kamiλ Shakirov
8e30b296c0
[ refactor ] Remove Data.Strings module ( #1607 )
2021-06-28 13:48:37 +01:00
Edwin Brady
d6370380e6
Missing interface methods now cause an error
...
This was always the intended behaviour, but until now not implemented!
This caught a couple of issues in contrib and a test.
2021-06-27 20:03:19 +01:00
G. Allais
49f8cefeff
[ cleanup ] Test.Golden ( #1526 )
2021-06-21 17:30:11 +01:00
Nick Drozd
ec438760d9
Simplify some lambdas ( #1561 )
2021-06-16 15:22:30 +01:00
Robert Wright
c63f25dac2
Distinguish common C and RefC FFI calls
2021-06-14 15:06:44 +01:00
Nick Drozd
4a0a5759b8
Return Maybe from strengthen ( #1540 )
...
Co-authored-by: Fabián Heredia Montiel <303897+fabianhjr@users.noreply.github.com>
2021-06-14 10:59:49 +01:00
Zoe Stafford
24f7c9d5be
Add foldMap
to Foldable
( #1483 )
2021-06-01 15:05:04 +01:00
G. Allais
1fd5ccf080
[ fix #1453 ] rename cast -> coerce ( #1468 )
2021-05-26 08:12:58 +01:00
Ohad Kammar
699de70301
[contrib] More properties of vectors ( #1449 )
2021-05-24 08:48:00 +01:00
Robert Wright
c57bb5a65f
Add RefC StringIterator support
2021-05-20 14:25:16 +01:00
Ohad Kammar
823230b77c
Vect reasoning library ( #1439 )
...
When working on Frex I needed a whole bunch of lemmata to do with Data.Vect. I hope it will be useful for others.
2021-05-20 11:55:22 +01:00
G. Allais
349308396c
[ fix #621 ] add warnings for shadowed global definition ( #1407 )
2021-05-14 17:35:21 +01:00
G. Allais
ab241213f3
[ breaking ] making toList part of Foldable ( #1395 )
2021-05-11 08:26:00 +01:00
Denis Buzdalov
8038f0a0f9
[ refactoring ] Tiny changes following up the idris-lang/Idris2#830
...
Some zeroes in signatures, one simpler implementation and formatting.
2021-05-10 09:07:36 +01:00
Edwin Brady
d6d68ff09b
Merge pull request #1195 from buzden/some-funs-to-lazy-list
...
[ contrib ] Some functions for lazy list + fix for `foldlM`
2021-05-01 16:18:24 +01:00
Denis Buzdalov
583442b359
[ contrib ] Arithmetic on Fin ( #830 )
...
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-04-23 12:05:13 +01:00
stefan-hoeck
181b26b250
[ fix ] broken unicode parsing in JSON
2021-04-22 10:59:14 +01:00
Stefan Höck
61c43e5337
[ new ] Add Bifoldable and Bitraversable interfaces to Prelude ( #1265 )
2021-04-08 17:25:37 +01:00
Guillaume ALLAIS
5af1efb56e
[ refactor ] introduce NonZero
...
This has a much better behaviour with respect to proof search and
the coverage checker realising we don't need to consider the Z case
than the `Not (x = Z)` we used earlier.
2021-03-31 17:59:58 +01:00
Denis Buzdalov
a6a82a18b5
[ prelude ] foldlM
was made to be in the Foldable
interface.
2021-03-26 00:59:13 +03:00
Denis Buzdalov
9ee0063a7f
[ contrib ] Some useful functions were added for lazy lists.
2021-03-26 00:59:13 +03:00
Alex Gryzlov
71abc8e33b
Add Path@contrib & small changes ( #1229 )
2021-03-25 16:01:32 +00:00
G. Allais
97fb5d7b94
[ fix #893 ] proof gadget for with clauses ( #1222 )
2021-03-25 10:02:06 +00:00
Andy Lok
da92f9d676
Cleanup List1 ( #1091 )
2021-03-17 14:07:52 +00:00
Denis Buzdalov
c7f510c9de
[ fix ] Change one implementation according to recent lib change
2021-03-15 15:18:16 +00:00
Denis Buzdalov
cf981d4c68
Validated
data structure was added (#1098 )
2021-03-15 14:33:01 +00:00
Edwin Brady
17cdc7fa88
Merge pull request #1171 from edwinb/fix1163
...
Correct multiplicities when checking Pi binders
2021-03-09 18:36:08 +00:00
Edwin Brady
04a0f5001f
Correct multiplicities when checking Pi binders
...
We've always just used 0, which isn't correct if the function is going
to be used in a runtime pattern match. Now calculate correctly so that
we're explicit about which type level variables are used at runtime.
This might cause some programs to fail to compile, if they use functions
that calculate Pi types. The solution is to make those functions
explicitly 0 multiplicity. If that doesn't work, you may have been
accidentally trying to use compile-time only data at run time!
Fixes #1163
2021-03-09 17:23:05 +00:00
Donovan Crichton
8d4e7cc581
List elem extra move/rename ( #1165 )
2021-03-07 18:00:03 +00:00
G. Allais
1d96dd2bd7
[ refactor ] generalise open union machinery ( #1157 )
2021-03-05 09:28:23 +00:00
stefan-hoeck
d952741563
[new] instances for SortedMap and Set
2021-03-04 14:54:27 +00:00
Donovan Crichton
2de2ac2e2c
[ new ] Lemmas: append preserves List membership. ( #1152 )
2021-03-04 14:50:10 +00:00
Denis Buzdalov
2bb8ff90e2
[contrib] Existing natToFinLTE
was reimplemented to have 0 LT argument
2021-03-01 08:31:09 +00:00
G. Allais
cee7e38894
[ new ] Proof search from 'Applications of Applicative Proof Search' ( #1093 )
2021-03-01 08:29:43 +00:00
G. Allais
d2eeb7ce86
[ fix #758 ] desugar non-binding sequencing in do blocks to (>>) ( #1095 )
2021-02-24 11:07:16 +00:00
Guillaume ALLAIS
00067e8151
[ fix #637 ] force indentation after a with
2021-02-23 10:52:22 +00:00
G. Allais
74b051589b
[ new ] Perfect binary trees ( #1063 )
2021-02-22 09:54:16 +00:00
Guillaume ALLAIS
5b5bdfe769
[ contrib ] Positions in strings
...
This is an alternative to using `fastUnpack` and `fastPack` to work
on lists of characters.
Using this to refactor the lexer and benchmarking the resulting
compiler on building idris2 shows it's 3 to 5s slower than the
current implementation that goes via `List Char`.
This may be backend-dependent so I still push this to contrib,
with the plan of running further benchmarks in the future.
2021-02-18 17:52:25 +00:00
Denis Buzdalov
b355b12cdb
Some cleanup was done. Changed code is mosly equivalent to the former.
...
A lot of useless matches of implicit arguments were removed.
2021-02-16 19:05:33 +00:00
G. Allais
8ba3d8572b
[ new ] Data.OpenUnion ( #1050 )
2021-02-10 15:25:35 +00:00