Commit Graph

2850 Commits

Author SHA1 Message Date
Zoe Stafford
fde6269c7e
make depends collect all transitive dependencies (#2469)
* make `depends` collect all transitive dependencies

This happens by installing the (modified) ipkg file along with ttc files

* [ fix ] parsing a package shouldn't always set sourceDir

* linter *sigh*

* Fix test, add changelog

`asDepends` has been changed to `setSrc` as that is for me more intuitive

in idris2/pkg006 the version field was removed from the ipkgs of bar-baz and quux
as idris now expects the version to match the folder

idris2/pkg010 explicitly disables incremental compilation, to prevent extra log info

* (hopefully) fix idris2/pkg13 test on windows
2022-05-20 16:20:54 +01:00
Denis Buzdalov
73608cb264 [ cleanup ] Clean up DecEq implementations with biinjective functions 2022-05-20 11:50:46 +01:00
Denis Buzdalov
d3fa76052b [ new ] Introduce a Biinjective interface 2022-05-20 11:50:46 +01:00
Denis Buzdalov
a3542ad0cd [ cleanup ] Make existing equality proofs a bit cleaner 2022-05-20 11:50:46 +01:00
Denis Buzdalov
4032ef2b85 [ base ] Implement equalities for inclusive-or type (These) 2022-05-19 13:37:28 +01:00
Nil Geisweiller
4ff5ff63a5 Escape \ in the code example of lambdaAbstraction doc 2022-05-19 11:57:31 +01:00
Nil Geisweiller
7461c3f538 Fix typo: Calculutor -> Calculator 2022-05-19 11:50:48 +01:00
Thomas Dziedzic
8bd5ca9492
[ doc ] cookbook for parsing (#2484) 2022-05-18 13:17:12 +01:00
Denis Buzdalov
95caed3c4f [ refactor ] Support alternative equalities for TTImp 2022-05-18 11:12:05 +01:00
G. Allais
10a6734bcb
[ new ] Katla-powered landing page (#2483) 2022-05-18 08:43:47 +01:00
Guillaume Allais
7a863556c5 [ fix ] missing Show implementation 2022-05-17 16:50:50 +01:00
G. Allais
fdbd858d97
[ refactoring ] expose some internals needed by Katla (#2480) 2022-05-16 20:37:08 +01:00
Zoe Stafford
71351a6c88
Merge pull request #2476 from Z-snails/bits64-popcount
Fix `FiniteBits` for `Bits64`
2022-05-14 14:05:37 +01:00
Zoe Stafford
8a0d75dc6d Fix FiniteBits for Bits64 2022-05-14 13:12:16 +01:00
Denis Buzdalov
72f0a2ab09 [ re #950 ] Remove redunant legacy data definition
`Given` with `Always` from Idris 1 library are completely overridden by
`IsYes` and `ItIsYes` respectively, which have a more common naming.
This, however, may break some very old code (fixed by a trivial rename).
2022-05-14 08:24:20 +01:00
Denis Buzdalov
d037b39e63 [ base ] Add injectivity proof for Yes and No 2022-05-14 08:23:55 +01:00
Joel Berkeley
bf87b623ef
add scanr; scanr1; unsnoc for Vect (#2471)
* add `scanr` and `scanr1` for `Vect`

* add tests

* tests

* docstring

* typos

* add unsnoc

* simplify unsnoc

* docstring

* typos
2022-05-12 17:54:34 +01:00
Guillaume Allais
7c784dd89c [ fix ] missing rigs in doc type signatures 2022-05-12 10:25:54 +01:00
Guillaume Allais
a1e762a273 [ re #1282 ] Documenting my understanding
I don't think it's worth fixing as the new core and its first class
case blocks should hopefully solve this issue.
2022-05-11 17:00:44 +01:00
G. Allais
f80fc184e3
[ new ] :exec for RefC (#2466) 2022-05-10 15:09:53 +01:00
KDr2
e3f31d3542 fix a case typo in document 2022-05-10 08:27:24 +01:00
Denis Buzdalov
466e14a1e5 [ base ] Add a dependent funext function to the FunExt interface 2022-05-09 18:37:50 +01:00
Jesse Nava
db13a35bf5 [ fix ] Ensure casting from String to Double results in floating numbers on scheme backends 2022-05-09 18:36:17 +01:00
György Kurucz
7618491536 [ refactor ] Use switch statement in extractInt in the RefC runtime
Modern compilers should be smart enough regardless and generate
efficient code for the sequence of ifs, this is really just a syntax
change to make the code shorter.
2022-05-04 10:18:58 +01:00
György Kurucz
7a5f63eab0 [ fix ] Add missing cases for BITS types in extractInt
e79e4277 ("[ fix ] Make Bits types use int switch statement in RefC")
made the RefC backend generate code calling `extractInt` with Bits
types, bit did not add the extra cases to `extractInt`. This commit adds
the missing cases.

Fixes #2452
2022-05-04 10:18:58 +01:00
György Kurucz
a05f091a90 [ refactor ] Format support/refc/runtime.c with clang-format 2022-05-04 10:18:58 +01:00
Vit Brunner
4a761ea523 [ doc ] Foldable's all is a conjunction 2022-05-02 21:15:28 +01:00
Zoe Stafford
1c6590f2f9
Merge pull request #2447 from j-nava/refc-2446
[ fix ] Make Bits types use int switch statement in RefC
2022-05-02 08:00:30 +01:00
Jesse Nava
e79e4277f6 [ fix ] Make Bits types use int switch statement in RefC 2022-05-01 18:24:10 -04:00
Zoe Stafford
2a9477c545
Merge pull request #2445 from kuruczgy/gyuri/refc-fix-extract-unit
[ fix ] Fix usage of `void` instead of `NULL` for Unit value in RefC
2022-05-01 20:38:47 +01:00
György Kurucz
a05c76a668 [ fix ] Fix usage of void instead of NULL for Unit value in RefC
This causes issues whenever you have a FFI function taking `()` as an
argument. (Not that such a function is really useful, and I assume this
is the reason the issue hasn't been noticed so far.)
2022-05-01 19:26:45 +02:00
G. Allais
4256cd15fd
[ highlighting ] case trees in :di (#2440) 2022-04-29 12:52:23 +01:00
Steve Dunham
04e65529f6 Better parse error for missing paren after with 2022-04-29 08:59:40 +01:00
Nicolas B
912112ba97
Remove .d files from c backends on make clean (#2441)
* Remove .d files from c backends on make clean

* Remove .d files from c backends on make clean with the right targets
2022-04-28 10:02:41 +01:00
vfrinken
b1f45f2748
RefC backend improvements (#2425)
* RefC backend improvements

1. OnCollect had the wrong number of arguments. The code creator expects
   3 arguments, but onCollect in prim.h expected 4 arguments. The first of which
   was an erased arguments. That is now fixed.

2. OnCollect did not call `newReference` when creating a new reference to the pointer
   and the freeing function

3. OnCollect and OnCollectAny still had a spurious printf statement

Those issues have been fixed, the test case can be found in
  tests/refc/garbageCollect

4. The IORef mechanism expects that the %World token will be passed around
   consistently. This is not the case. States in Control.App make use of
   IORefs, but the function created from Control.App.prim_app_bind
   had the world token erased to NULL.
   Now, IORefs are managed using a global variable,
   IORef_Storage * global_IORef_Storage;
   referenced in cBackend.h, defined in the created .c file, and set to NULL
   in main();

5. While multithreading and forking is still not supported, compiling a program
   that makes use of Control.App demands a C implementation of prim_fork.
   Files support/refc/threads.c and support/refc/threads.h provide a
   dummy implementation for it, so that Control.App programs compile and run.

A test for these 2 issues is given in tests/refc/issue2424

* format changes

to make the linter happy

* format changes

to make the linter happy

* format changes

to make the linter happy

* spelling mistake braket -> bracket

Co-authored-by: Volkmar Frinken <volkmar@onutechnology.com>
2022-04-27 13:59:32 +01:00
Denis Buzdalov
6177bfb212
[ debug ] Log the value at the "Can't reify" error (#2438)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2022-04-27 13:52:04 +01:00
G. Allais
05baf44b5b
[ refactor ] Index Pretty over the type of annotations (#2371) 2022-04-27 12:26:59 +01:00
Guillaume Allais
81ba322a4b Revert "[ fix ] search should solve auto implicits before implicits"
This reverts commit 6dd68e8924.
because of issue #2437
2022-04-27 11:00:51 +01:00
Guillaume Allais
6dd68e8924 [ fix ] search should solve auto implicits before implicits 2022-04-26 15:07:51 +01:00
CodingCellist
d26738b6d9
Fix link to CONTRIBUTING.md in proposal template
The local paths (`../../CONTRIBUTING.md`) and even the absolute paths (`/CONTRIBUTING.md`) depend on which GH page you're on -_-

This sets the reference to a URL, meaning it should (hopefully) just point to the right thing for everyone now.
2022-04-26 10:15:20 +02:00
Edwin Brady
7c5650e94e
Allow functions to be marked for foreign export (#2433)
* Allow functions to be marked for foreign export

This relies on the backend knowing what to do with such things, but the
general idea is to mark them with '%export "backend:exportedname"' then
'getCompileDataWith', given a back end, will search for every function
that needs to be exported, as well as every function starting from the
expression to be compiled. This will allow Idris functions to be called
from other languages, where a backend supports it.

This is hard to set up a test case for, for the moment, since no
backends actually do anything with it. So consider it a bit of a
placeholder for now.

* Add missing clause to Eq FnOpt

Thanks to @buzden
2022-04-25 13:48:30 +01:00
Denis Buzdalov
36837942d5 [ doc ] Refine text about rewrite clause 2022-04-22 20:37:56 +01:00
Denis Buzdalov
77cf47f962
[ re #2423 ] Make Eq implementations in Language.Reflection.TTImp total (#2430)
* [ re #2423 ] Turn newly added `Eq` implementations to be total
* [ fix ] Add lacking `Eq TTImp` clauses and lacking `Eq` implementations
2022-04-22 18:01:42 +01:00
Zoe Stafford
68bcacf3ec
[base] add missing node ffi functions (#2427) 2022-04-22 15:45:52 +01:00
Zoe Stafford
0010768ee7
[doc] Rewrite docs for %builtin and nat optimisations (#2426) 2022-04-22 14:52:02 +01:00
G. Allais
22b98f231e
[ fix ] highlight unambiguous names in `with' (#2423) 2022-04-22 13:34:05 +01:00
ayaye
67951529e8
[ doc ] Proving Propositional Equality: example fixed (#2420) 2022-04-20 14:54:18 +01:00
Denis Buzdalov
99a3ae05fa [ contrib ] Add specialised traverse_ and friends for lazy list 2022-04-20 14:51:54 +01:00
G. Allais
2287fd9edb
[ ci ] use katla to build html doc of the libs (#2422) 2022-04-20 12:42:58 +01:00
G. Allais
98b1062772
[ fix ] :printdef support for P(D)Pair & Equal (#2416) 2022-04-15 20:39:46 +01:00