Commit Graph

38 Commits

Author SHA1 Message Date
Mathew Polzin
e9dfc1c980
List packages improvements (#3318)
* don't show 'Just' before package versions

* unrelated - fix nix develop shell for darwin

* spit out the package path for each package as well as the package name and version

* put the package path on a new line

* add TTC version info to output

* don't name unused variable

* add changelog entry
2024-06-17 11:50:13 +01:00
Steve Dunham
9e84b153bd
Add %foreign_impl pragma for augmenting ffi functions (#3303)
* Add %foreign_impl pragma for augmenting ffi functions

* document how conflicting %foreign_impl are handled
2024-06-11 17:45:09 +01:00
Mathew Polzin
88a5328ec1
Add an option that dumps package details to JSON (#3293)
* Initial stab at package json dump

* expose ipkg json dump as new option

* make dependency output easier to ingest by another tool

* Add a test for ipkg json dump

* cleanup

* maybe just don't collide with existing equally good fixity

* make new operator private

* Add new module to api ipkg file

* Add note to CHANGELOG_NEXT

* correct the docs for the dump-ipkg-json command
2024-06-11 11:32:22 +01:00
Claudio Etterli
0174618724
[ new ] added util functions for SortedMap (#3254)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2024-06-11 11:05:48 +01:00
Denis Buzdalov
109033c7b0 [ base ] Move most useful and stable parts of Data.Fin.Extra to base 2024-06-11 10:21:12 +01:00
observant
1e6e125190
Add pipeline operators (#3284)
* Add pipeline operators

* Fix tests

* Change fixity, add tests

* [ fix ] silence actual fixity

---------

Co-authored-by: itmuckel <18561536+itmuckel@users.noreply.github.com>
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
2024-06-06 10:59:30 +01:00
troiganto
e0b9a027e7 fix(base): runtime-erase implicit length argument to Vect's dropElem.
This makes it possible to call the function in more situations. It also
brings its signature in line with the overloads on `List`, `List1` and
`SnocList`.

The previous implementation of `Data.Vect.Elem.dropElem` required the
length of the `Vect` to be available at runtime. This was used in order
to recurse in the case that the `Elem` is not `Here`. However, it turns
out that this is not actually necessary. Idris can deduce that the tail
must be non-empty if it contains an `Elem`.
2024-06-05 15:42:48 +01:00
Denis Buzdalov
1522c3a92c
[ fix ] Fix Show of TTImp for functions with with clauses (#2631)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2024-06-05 14:02:04 +01:00
Denis Buzdalov
1c588f77ec
[ base ] Add flipped access/update functions for Sorted{Set,Map,DMap} (#3247)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2024-06-05 13:59:38 +01:00
troiganto
2c128e216c refactor(base): move implementation of Data.Vect.nubBy to global scope
Closes #3285
2024-06-05 13:53:57 +01:00
MithicSpirit
f83ad9ce98
[ base ] Data.SortedSet.leftMost and .rightMost (#3260)
* [ base ] Data.SortedSet.leftMost and .rightMost

Implement `leftMost` and `rightMost` for `SortedSet` in terms of the
functions with the same name in `Data.SortedMap`.

* contributors

---------

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2024-06-05 12:00:57 +01:00
Aleksei Volkov
10b0cc3240 Updated CHANGELOG_NEXT.md 2024-05-31 10:22:56 +01:00
Denis Buzdalov
cf68e995c4 [ funext ] Add a proof for funext variants with the other quantities 2024-05-19 15:00:28 +01:00
Steve Dunham
960d818c29 Merge branch 'main' into impossible-lam 2024-04-27 18:25:06 -07:00
Steve Dunham
b99dd05224 [ parser ] Add support for impossible lambdas 2024-04-27 16:57:33 -07:00
André Videla
84ce3a6836
Merge pull request #3253 from dunhamsteve/issue3251
[ parser ] Fix issue parsing unquote
2024-04-28 08:17:18 +09:00
Hattori, Hiroki
1dc7b74e4e
[RefC] Suppress arglist wrapper (#3177)
* [RefC] Suppress code generation for unnecessary arglist wrappers.

* [RefC] cleanup dead code of arglist.

* Removed Value_Arglist to reduce Closure's allocation overhead.

* fix linter error

* [RefC] make trampoline() safety.

* [RefC] cleanup cStatementsFromANF to keep code simple.

* fix linter error

* fix linter error

* In another time, another galaxy. THE LINTER INVADORS conquaer the all humanity and make them slaves. Under 2024, a only leaved job for every humans is adjusting spaces of source code, or just type gg0vG$== in vim.

* [ test ] update golden value

* added supports 32 params on closure.

* [RefC] [Cleanup] removing duplicate codes.

* [RefC] Switch calling conventions based on the number of arguments to avoid limits on the number of arguments and to reduce stack usage.

* [RefC] Argument that are too large are placed on the heap, as are closures.

* [RefC] use idris2_malloc instead of malloc.

* [RefC] [Cleanup] Keep pure things pure.

* [RefC] Mapped some special constructors to NULL. This reduces malloc cost and generates simpler code in ConCase. But not work yet.

* [RefC] fix merge failure.

* [RefC] stringOps.c replace  NULL for NIL.

* [RefC] cleanup

* [RefC] ConstCase now generate simple if-then statements instead of using helpers. This reduces malloc/free costs.

* fix indentation

* fix whitespaces

* [RefC] The name field in Value_Constructor was restored for tycon. But changed to static const*. Hopefully the C compiler will remove the common string constants. The smartest thing to do would be to create a dummy global variable and use its address as a tag, but that would depend on the C compiler to resolve conflicts.

* [refc] a big changes of the space

* [RefC] Little tricks to reduce temporary variables

* spaces

* [RefC] fix compiler warnings

* [RefC] [test]  Perform memory leak analysis, if valgrind is installed.

* [RefC] Fix invalid memory read. Fix C compiler warnings.

* [RefC] Fix invalid memory read of strSubstr. [test] Perform memory leak analysis, if valgrind is installed.

* [test] fix junk line

* linter

* linter

* linter

* linter

* [RefC] merge with erase_trivial_constuctors

* merge w/ erase_trivial_constructors

* Revert "merge w/ erase_trivial_constructors"

This reverts commit be593a3715.

* Revert "[RefC] merge with erase_trivial_constuctors"

This reverts commit 3c21eb45d8.

* merge w/ upstream/main

* fix merge failure

* rename

* fix renaming

* [RefC] fix merge fail

* [RefC] renamed C functions for safty.

* [RefC] cleanup

* [RefC] Fix constructor tag of UnconsResult.CHARACTER.

---------

Co-authored-by: Mathew Polzin <matt.polzin@gmail.com>
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
2024-04-17 15:48:43 +01:00
Steve Dunham
d7867c0c1a [ parser ] Fix issue parsing unquote 2024-04-08 20:42:36 -07:00
André Videla
75032a7164
Emit warning for fixities with no export modifiers (#3234)
* Emit warning for fixities with no export modifiers

This is to help update all the existing code to program with explicit
fixity export directives in preparation for the behavioral change where
they will become private by default.
2024-04-03 15:41:57 +01:00
Hattori, Hiroki
ddc634b1b2
[RefC] Unbox small integers. (#3181) 2024-03-21 07:32:37 -05:00
Mathew Polzin
7ce4c45e82
Complete the relocation of contrib HVect into base as All (#3191)
* complete the relocation of contrib HVect into base as All

* Frex needs these public exported and that feels reasonable enough to me

* Add CHANGELOG_NEXT entries
2024-03-19 08:22:32 -05:00
Jacob Walters
18b165bede [ elab ] Let elab scripts access visibility modifiers 2024-03-15 22:41:29 +00:00
Mathew Polzin
7219486aec
Fix ambiguity error with Uninhabited interface implementations. (#3228) 2024-03-15 17:21:05 -05:00
Mathew Polzin
c3239cb4c0
[fix] Package Search Paths (#3214)
* differentiate between search paths and package directories.

* fix :package repl command

* fix typo that caused Idris to look for library files in the wrong place when testing.

* Add to the changelog
2024-03-09 13:53:23 -06:00
rvs314
1143718098
Generalize succNotLTEpred (#3225)
* Don't require a runtime value of `x` for `succNotLTEpred`

* Add `succNotLTEpred` as an instance of `Uninhabited`

* Add contribution to changelog

* Update golden value for test `basic044`
2024-03-07 08:38:28 -06:00
Mathew Polzin
e583e73a7c move CHANGELOG entry to CHANGELOG_NEXT 2024-02-24 12:36:42 +00:00
Denis Buzdalov
8144980ae5 [ elab ] Support easy collection of information during TTImp traverse 2024-02-23 11:32:22 +01:00
Hattori, Hiroki
1906c75433
[RefC] [Cleanup] Erase trivial constructors; Stop copying constructor name. (#3206) 2024-02-20 08:01:06 -06:00
Ruslan
2e1c3fbf2e
Fix a bug in C implementation of idrnet_recv_bytes (missing flags parameter) (#3212)
* Fix a bug in C implementation of idrnet_recv_bytes (missing flags parameter)
2024-02-12 11:35:52 -06:00
Alex1005a
196d08dd6d
Implement Precise Reference Counting for C backend (#2989)
* start implement drop spec

* [RefC] remove vars after prim function call

* [RefC] gc pointer processing changed

* [RefC] fix memory leak in stringIteratorToString

* [RefC] runtime.c refactoring

* Implement basic reuse analisis

* [RefC] do not delete reusable variables in value in let

* [RefC] Use names instead tags in reuse map

* [RefC] Don't set all fields to null in reuse constructor

* Use record syntax in RefC

* Add some utility functions to RefC

* Sort output in garbageCollect refc test

* Add memory leak test for RefC

* [RefC] Remove variable only from body in let

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>

* [RefC] Remove borrowed set from env

* [RefC] Use Ref variable for Enviroment instead of passing as an argument

* [RefC] Use locally function as combinator

* [RefC] removing unnecessary dup and remove during pattern matching

* Update refcTests and refcMemoryLeakTests

* Remove some test files

* move CHANGELOG entry to CHANGELOG_NEXT

* Move refc-memory tests

* Change calling convention test

* [RefC] [Test] Reuse test

---------

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
Co-authored-by: Mathew Polzin <matt.polzin@gmail.com>
2024-02-12 00:43:17 -06:00
HIROKI, Hattori
af4e888857 [RefC] [Cleanup] Pattern matching generates simpler code. Reduce malloc/free costs. 2024-01-23 21:59:23 +09:00
Hattori, Hiroki
5f643c04d1
[RefC] [Test] Valgrind support & Fix invalid memory read of strSubstr (#3196) 2024-01-22 07:25:22 -06:00
Mathew Polzin
cf4c87cc71
hopefully final refactor of buildIdris (#3200)
- align buildIdris function with direction of nixpkgs version.
- tangentially, update naming of local variables to follow nixpkgs.
- use pname/version instead of name for buildIdris derivations.
2024-01-21 23:05:26 -06:00
Mathew Polzin
073fbef3d1
Remove use of deprecated getByte function (#3190)
* Add CHANGELOG_NEXT entry
2024-01-14 11:26:51 -06:00
Mathew Polzin
da6f0b0e4e
Fix executable output of buildIdris nix helper (#3188) 2024-01-08 23:58:17 -06:00
Mathew Polzin
aba9fa706c CHANGELOG_NEXT entry 2024-01-06 14:11:33 -06:00
Mathew Polzin
8746f1671b
Improve buildIdris and expose the idris2-api via the Nix flake. (#3182)
* Refactor buildIdris slightly and support installing libraries with source. Add the Idris2 API package as an output of the flake.

* update templates and simplify construction of a search path.

* use newer method of specifying default package

* swap out trace function for warn function. fix warnings in template generation
2024-01-05 15:59:11 -06:00
Mathew Polzin
aee1cb94ac
Add a new CHANGELOG_NEXT.md file and update documentation around CHANGELOG entries. (#3180) 2024-01-01 21:08:56 -06:00