Commit Graph

2830 Commits

Author SHA1 Message Date
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
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
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
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
Guillaume Allais
ec4cf3d48c [ fix ] pretty printing of misspellings 2022-04-15 20:18:48 +01:00
Guillaume Allais
0986cf177b [ parse ] better error message for list literals
I got fed up with being puzzled whenever edwin's trailing commas
and my leading commas clash and the error location is the opening
square bracket rather than the repeated comma.
2022-04-15 11:33:20 +01:00
Denis Buzdalov
71c68d8dcf [ base ] Add a trace variant easily embeddable to point-free expr 2022-04-14 13:36:14 +01:00
Guillaume Allais
b4662a8537 [ fix ] show keywords & bound variables 2022-04-14 12:17:11 +01:00
Guillaume Allais
ea499dd973 [ doc ] also list reexports 2022-04-14 12:17:11 +01:00
Guillaume Allais
fd5a4095b5 [ fix ] HTML doc contents
Previously we were using namespaces as a poor approximation of
source file. We're now actually looking at the source file the
definition arose from in order to decide whether to keep it.

See e.g. base's Data.DPair for a drastic change.

Additionally, we sort definitions by definition location rather
than alphabetical order to respect the user's decision to introduce
some things before other.
2022-04-14 12:17:11 +01:00
Guillaume Allais
43c5b5263c [ cleanup ] --timing levels 2022-04-13 14:37:43 +01:00
Michael Messer
f5400537bd Improve location killing 2022-04-10 13:17:15 +01:00
CodingCellist
36e38860b7
[ contrib ] Implement Show ParsingError (#2407) 2022-04-09 12:37:45 +01:00
Guillaume Allais
e0f5f541e2 [ fix #2402 ] Check totality before exiting failing block 2022-04-08 13:21:46 +01:00
Guillaume Allais
55d6c50706 [ fix ] make 'failing' whitespace-insentitive 2022-04-07 13:59:27 +01:00
Mathew Polzin
c91a768486
System NodeJS additions (#2401) 2022-04-07 10:09:30 +01:00
G. Allais
79e733b848
[ new ] multi-with elaborated as nested withs (#2403) 2022-04-07 09:30:23 +01:00
Guillaume Allais
75f9cac522 [ fix ] missing recursive call on killErrorLoc 2022-04-05 08:35:56 +01:00
Thomas E. Hansen
a644a85a57 [ base ] public export quantifier functions 2022-04-04 13:24:12 +02:00
Thomas E. Hansen
dc02e4d822 [ refactor ] Put Vect quantifiers in their own namespaces
This makes the code in `Data.Vect.Quantifiers` consistent with the files
`Data.List.Quantifiers` and `Data.SnocList.Quantifiers`.
2022-04-04 13:24:12 +02:00
G. Allais
4b6936d615
[ fix ] allow refined implicit patterns in with clauses (#2393) 2022-04-03 10:45:29 +01:00
Denis Buzdalov
1c027d2218 [ re #2370 ] Add forgotten export clause 2022-04-01 12:20:01 +01:00
Denis Buzdalov
f46483106f [ base ] Add a function extensionality interface
Its purpose is to be able to formulate unversally properties which
were true if function extensionality was present in the type system
2022-04-01 11:44:37 +01:00
Guillaume Allais
ad78457869 [ fix ] location information in with clauses 2022-04-01 11:41:48 +01:00