Edwin Brady
66217b6fa6
Merge branch 'master' into refc-buffer
2021-07-16 09:44:40 +01:00
Edwin Brady
050abe663e
Merge pull request #1638 from stepancheg/idris2-time
...
Use C idris2_time for all C-based backends
2021-07-16 09:40:08 +01:00
Giuseppe Lomurno
07c62e9eef
Fixed wrong reflection of records and parameters
2021-07-16 04:28:52 +02:00
Edwin Brady
a880b9884c
Merge pull request #1670 from stepancheg/buffer-names
...
Add parameter names to Buffer builtins parameter names
2021-07-16 00:53:42 +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
Edwin Brady
9b0ebcd08b
Merge branch 'elab-name-changes' of https://github.com/MarcelineVQ/Idris2 into MarcelineVQ-elab-name-changes
2021-07-15 13:16:47 +01:00
Stiopa Koltsov
f81c37ea3a
Pass Buffer as char* when using C functions in RefC
...
To be able to use `C` functions for both Scheme and RefC: it was
not possible for `Buffer` before this PR.
As an example, `writeBufferData` and `readBufferData` functions are
removed: generic C backend implementations are used instead.
2021-07-13 23:04:36 +01:00
Nick Drozd
9cca3a7d35
Use Not instead of -> Void ( #1667 )
2021-07-13 15:32:01 +01:00
Johann Rudloff
d5abff4e46
[ fix #1260 ] Use blodwen-stringbytelen
instead of C's strlen
( #1261 )
2021-07-13 11:52:15 +01:00
Stiopa Koltsov
1617d95961
System.Errno.strerror
...
* add `strerror` function
* move `getErrno` to `System.Errno`
* use `strerror` in `Show FileError`
* on node there's no access to `strerror`, so `strerror` just converts the number to string
2021-07-13 10:34:04 +01:00
Stiopa Koltsov
d676ea6ab4
Expose malloc and free from System.FFI
...
* Move `malloc`/`free` from `Network.FFI` to `System.FFI`
* Might be useful by other code
2021-07-13 10:24:26 +01:00
Stiopa Koltsov
ed40b212b2
Make System.Signal async-signal-safe
...
It is not safe to call `malloc` or `pthread_mutex_lock` from signal
handler.
2021-07-12 20:43:26 +01:00
Nick Drozd
a07d42ac91
Delete old Order file, update changelog and contributors ( #1685 )
2021-07-12 10:53:45 +01:00
Stiopa Koltsov
b4918d51ff
Add parameter names to Buffer builtins parameter names
...
Also rename `loc` -> `offset`.
2021-07-11 10:43:12 +01:00
Stefan Höck
599d0635e9
[ refactor ] JS backend overhaul ( #1609 )
2021-07-10 11:15:21 +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
Stiopa Koltsov
8fd58b3bdd
More reliable exception handling in Control.App
...
Convert `App.Control.Exception` interface to an alias to `HasErr`.
Probably `Exception` interface need to be deprecated or removed.
Note similar problem exists with `PrimIO` calling `PrimIO, Exception`,
also need to be fixed.
Fix this scenario:
```
throwBoth : Has [Exception String, Exception Int] es => App es ()
throwOne : Has [Exception Int] es => App es Int
throwOne {es} = handle {err = String} {e = es} throwBoth (\r => pure 1) (\e => pure 3)
```
With this commit it works, before this commit it failed with:
```
Error: While processing right hand side of throwOne. Can't find an implementation for Exception Int (String :: es).
TestException.idr:8:48--8:57
|
8 | throwOne {es} = handle {err = String} {e = es} throwBoth (\r => pure 1) (\e => pure 3)
| ^^^^^^^^^
```
2021-07-06 10:43:54 +01:00
CodingCellist
fac0e32f48
[ fix ] Chez channels ( #1596 )
2021-07-02 13:13:50 +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
9cb20f3653
Clean up some assert_total instances ( #1644 )
2021-06-29 22:05:40 +01:00
Stefan Höck
39d596f3b9
[ new ] Support reflecting on new intX types ( #1642 )
2021-06-29 20:58:41 +01:00
Stiopa Koltsov
3d5ad0ca91
Use C idris2_time for all C-based backends
2021-06-28 23:57:58 +01:00
kasiaMarek
6f9b926b1b
module Data.SnocList.Elem ( #1478 )
...
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-06-28 20:34:39 +01:00
Stefan Höck
6ed266d306
[ new ] Missing integer type interfaces ( #1629 )
...
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-06-28 20:00:10 +01:00
Fabián Heredia Montiel
d5167a0108
[ fix #1581 ] public export Range functions and implementations ( #1602 )
...
Since `[a..b]` uses `takeUntil`/`takeBefore` indirectly those too had to
be changed to `public export` clashing with `Data.Stream` definitions.
A small readability refactor was made with the `compare` function from
`EqOrd`.
2021-06-28 16:52:23 +01:00
Nick Drozd
63a6b16517
Cut unneeded type specifications
2021-06-28 16:22:27 +01:00
Kamiλ Shakirov
8e30b296c0
[ refactor ] Remove Data.Strings module ( #1607 )
2021-06-28 13:48:37 +01:00
Stiopa Koltsov
a6555549ee
Route System.prim__system through C function
...
To be able to eventually refactor/extend `system` function: to be
able to specify a directory, environment variables, specify arguments
as array etc. Ideally it should be something like Rust
[`std::process::Command`](https://doc.rust-lang.org/std/process/struct.Command.html ).
2021-06-28 11:28:14 +01:00
Edwin Brady
a93def90a9
Merge github.com:idris-lang/Idris2 into prepare-040
2021-06-23 18:16:36 +01:00
Edwin Brady
5689786b26
Merge pull request #1598 from gallais/show-void
...
[ fix ] missing Show implementations in libs
2021-06-23 18:11:40 +01:00
Edwin Brady
7d3e3e0719
Check sizes of buffers and strings in TTCs
...
They need to be positive or we can't make the buffer, which causes a
segfault. This happened when loading old TTCs with a different format.
Fixes #1503
2021-06-23 18:08:27 +01:00
Guillaume ALLAIS
afd55951c2
[ fix ] missing Show (Fin n) in base
2021-06-23 16:46:25 +01:00
Edwin Brady
ae73c39609
Merge github.com:idris-lang/Idris2 into prepare-040
2021-06-23 16:17:40 +01:00
Edwin Brady
c1057a19af
Merge pull request #1489 from buzden/some-uninhabiteds
...
[ base ] Some lacking implementations for `Uninhabited`
2021-06-23 16:17:32 +01:00
Edwin Brady
a0cfa28621
Update version numbers
2021-06-23 16:15:21 +01:00
G. Allais
49f8cefeff
[ cleanup ] Test.Golden ( #1526 )
2021-06-21 17:30:11 +01:00
CodingCellist
55f8bc3b90
Improve case-splitting formatting to not introduce new whitespace; add a bit of comments+docs. ( #1553 )
2021-06-17 16:48:59 +01:00
Nick Drozd
0db136d168
Hoist some pures ( #1556 )
2021-06-16 15:22:52 +01:00
Nick Drozd
ec438760d9
Simplify some lambdas ( #1561 )
2021-06-16 15:22:30 +01:00
Denis Buzdalov
927c358bef
[ base ] Some lacking implementations for Uninhabited
were added
2021-06-15 15:07:54 +03:00
Nick Drozd
488b4709f4
Use map for some maybes ( #1548 )
2021-06-14 17:52:43 +01:00
Robert Wright
1875f62248
Remove freeBuffer function
...
Each backend is now responsible for freeing Buffers in the same way as other objects
2021-06-14 15:06:44 +01:00
Robert Wright
c6a5827319
Add RefC readBufferData/writeBufferData support
2021-06-14 15:06:44 +01:00
Robert Wright
d202139171
Distinguish common C and RefC Buffer functions
2021-06-14 15:06:44 +01:00
Robert Wright
c63f25dac2
Distinguish common C and RefC FFI calls
2021-06-14 15:06:44 +01:00
Mathew Polzin
0209cee41a
include the other definition of drop because both are quite useful.
2021-06-14 11:44:38 +01:00
Mathew Polzin
bdd8f4157b
Add drop for Vect.
2021-06-14 11:44:38 +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
Denis Buzdalov
bf0985602f
[ totality ] More %default total
stuff
2021-06-12 21:06:08 -05:00
Fabián Heredia Montiel
dad4dcdaf8
Add totality annotations to src
and libs/{prelude, base}
2021-06-12 21:06:08 -05:00