Commit Graph

115 Commits

Author SHA1 Message Date
Denis Buzdalov
a09c5082c5
[ base ] Use Fin n as index in Bits (#2192) 2021-12-16 18:26:52 +00:00
André Videla
cc45ff957a
Merge pull request #2085 from andrevidela/string-parser-position
Show the line and column in diagnostic message in String.Parser
2021-11-15 11:09:57 +00:00
André Videla
7f932036e9 Show the line and column in diagnostic message
This also updates the error message of some common combinators
2021-11-10 00:44:09 +00:00
Robert Wright
c1fc487bec Return error code from pclose 2021-11-05 11:59:17 +00:00
Robert Wright
12955bc5bc Add takeUntil Data.String.Parser parser 2021-11-01 13:54:46 +00:00
madman-bob
a6a64c6ddf
[ contrib ] Alternating lists of known parity (#2043) 2021-10-30 00:12:44 +01:00
Mathew Polzin
fa06e9936b
Warn about unreachable default clauses (#1942)
* so much experimentation

* tests that show preliminary evidence the new stuff is working.

* small amount of cleanup

* more cleanup of various troubleshooting code.

* new test case added.

* only log unreachable indices if there are any.

* when traversing deeper simply skip over defaults since they have already been reviewed.

* Remove fallback clause that the changes in this PR correctly identified as unreachable.

* tidying up more.

* move some common functions to a new Core.Case.Util module.

* refer to case builder and case tree under new parent module.

* update imports to look for CaseTree in new submodule.

* update api ipkg

* remove unneeded application operators.

* remove or comment out unreachable default clauses caught by the changes in this PR.

* a bit of code documentation and renaming for clarity.

* bump previous version in CI.

* fix API usage of Util module.

* Add issue 1079 test cases.

* forgot to add new test cases file.

* remove commented-out lines by request of RefC author.

* Use a SortedSet instead of nubbing a list.

* update new case tree import.

* Update src/Core/Case/Util.idr

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

* remove function with nothing to offer above and beyond a differently named copy of the same code.

* replace a large tuple with a record; discover not all of the tuple's fields were needed.

* fix shadowing warning.

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2021-10-02 12:55:21 +01:00
Stefan Höck
af5657d23a
[ performance ] Memoise toplevel constants (#1899)
* [ performance ] memoize toplevel constants

* [ test ] memoization tests

* [ fix ] fix blodwen-lazy for racket and gambit
2021-09-08 16:46:19 +01:00
Edwin Brady
f4cc2f1ea8
Merge pull request #1721 from edwinb/AliasQli-master
Updated: add doublePow to primitives
2021-07-15 23:17:53 +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
f51aa22046 Bring #1719 up to date with latest changes 2021-07-15 22:04:49 +01:00
Edwin Brady
62586627d8 fix arity for blodwen-set-thread-data
This is an update of PR #540, thanks to @lodi
2021-07-15 15:02:43 +01:00
Stiopa Koltsov
9f61e542b4 Move rm -rf to the beginning of the test
While the discussion about how to refactor test framework is not
finished (#1654), make this change: move `rm -rf build` in the
beginning of the test. For these reasons:

* it is useful to inspect the contents of the `build` directory
  especially after the test failure
* if build crashes mid-test (e.g. process killed), next run should
  not be affected by the `build` directory from the previous run
2021-07-13 22:54:53 +01:00
Johann Rudloff
d5abff4e46
[ fix #1260 ] Use blodwen-stringbytelen instead of C's strlen (#1261) 2021-07-13 11:52:15 +01:00
Niklas Larsson
eb0c59c908
Enable incremental compilation on Windows. (#1694) 2021-07-13 11:29:34 +01:00
Edwin Brady
9bd32c4a3d Fix chez033 on windows
This prints lots of warnings since incremental compilation is not
available, so turn that off when running on windows for now.
2021-07-11 17:04:07 +01:00
Edwin Brady
c839c98c7d Add test for incremental compilation
Ideally we'd have a complete incremental build in CI, but that could be
a bit fiddly to set up at the moment (updating bootstrap code might make
it easier). This tests that the basic facilities work, though - there's
a lot can go wrong even in a small test like this, trust me, I have made
those mistakes :).
2021-07-11 00:05:00 +01:00
Zoe Stafford
0ecbd517e8
[ improvement ] VMCode (#1662) 2021-07-07 17:06:59 +01:00
CodingCellist
fac0e32f48
[ fix ] Chez channels (#1596) 2021-07-02 13:13:50 +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
Kamiλ Shakirov
8e30b296c0
[ refactor ] Remove Data.Strings module (#1607) 2021-06-28 13:48:37 +01:00
Stiopa Koltsov
60d597fccd Use pragma once instead of include guard
Pragma once is supported by all compilers for the last ten years.
Better use it instead of include guards (which use different styles
in different files).
2021-06-28 12:05:22 +01:00
G. Allais
d2986e5fea
[ refactor ] to allow testpools to specify a backend (#1591) 2021-06-21 22:12:17 +01:00
Fabián Heredia Montiel
a28bc65544
Fix deadlocks [Rebased, Squashed] (#1536)
Co-authored-by: Arnaud Bailly <arnaud.oqube@gmail.com>
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
Co-authored-by: Fabián Heredia Montiel <fabianhjr@protonmail.com>
Co-authored-by: Ruslan Feizerakhmanov <me@russoul.me>
2021-06-15 14:31:31 +01:00
claymager
b946ec0277
[ fix ] Create library dir if necessary (#1300) 2021-06-14 16:12:46 +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
Ruslan Feizerakhmanov
7aee7c9b7c
[ new ] --install-with-src; refactoring around FCs (#1450)
Why:

* To implement robust cross-project go-to-definition in LSP
  i.e you can jump to definition of any global name coming
  from library dependencies, as well as from the local project files.

What it does:

*  Modify `FC`s to carry `ModuleIdent` for .idr sources,
   file name for .ipkg sources or nothing for interactive runs.

*  Add `--install-with-src` to install the source code alongside
   the ttc binaries. The source is installed into the same directory
   as the corresponding ttc file. Installed sources are made read-only.

*  As we install the sources pinned to the related ttc files we gain
   the versioning of sources for free.
2021-06-05 12:53:22 +01:00
Stefan Höck
baa6051d69
[ fix ] use twos complement truncation for signed ints (#1471) 2021-06-04 10:35:07 +01:00
Kamiλ Shakirov
ad656a8d47
Remove realpath (#1457) 2021-05-25 11:01:28 +01:00
Matúš Tejiščák
4de7b2133a
[ new ] Add chez-sep codegen (#1359)
Co-authored-by: Johann Rudloff <johann@sinyax.net>
2021-05-11 08:20:19 +01:00
Stefan Höck
f028981e5a
[ fix #801 ] Use Number for up to 32 bit integers on JS backends (#1375) 2021-05-10 12:17:09 +01:00
Stefan Höck
6cdf05f1ec
[ new ] Add Int(8/16/32/64) (#1352)
This adds new `Int8`, `Int16`, `Int32` and `Int64` data types
to the compiler, thus working towards properly specified integer
types as discussed in #1048.

In addition, the following changes / corrections are made:

* Support casts from `Char`, `String`, and `Double` to all integer
  types (and back). This fixes #1270.
* Make sure that all casts to limited-precision integers are properly
  bounds checked (this was not the case so far for casts from `String`
  and `Double` to `Int`)
* Add a thorough set of tests to make sure all bounds checks work
  correctly for all supported casts and arithmetic operations
2021-05-04 08:22:06 +01:00
Stefan Höck
bbea929cf3
[ refactor ] Cleanup integral primops (#1211) 2021-04-28 09:32:46 +01:00
Niklas Larsson
473b8ee740 Windows test fixes
Translate node error codes
Strip 'b' from flags
Simplify directory wrangling in chez016
2021-04-12 18:47:57 +02:00
Raoul Hidalgo Charman
1211f860b6
Fix issues with use of unix sockets (#1284)
This change adds logic to set up sockaddr correctly for connect and
bind, handles the AF_UNIX case for getSockAddr and expands the existing
test to cover unix sockets.
2021-04-12 11:22:45 +01:00
Sören Tempel
c725b11c89 Flush standard out after writing prompt to it
On Unix-like operating systems stdio.h is usually line-buffered. As
putStr uses fputs(3) from stdio.h internally, output will be written to
standard out after a newline character is written to the buffer. Since
the prompt does not contain a newline, it will only be written to
standard output after the user presses return. I encountered this issue
on Alpine Linux which uses musl libc (instead of glibc). However, I
believe this issue is likely also reproducible with glibc. This commit
fixes this issue by flushing standard output after writing the prompt to
it. Surprisingly, `src/Idris/IDEMode/REPL.idr` already does this
correctly, `src/Idris/REPL.idr` does not though.
2021-04-09 15:17:00 +01:00
Kamiλ Shakirov
2ac4bea220
[ install ] Check if 'realpath' exists for Chez and Racket backends (#1210) 2021-04-06 15:42:04 +01:00
Guillaume ALLAIS
00929deed6 [ cosmetic ] nicer error messages for uncaught exceptions 2021-03-25 15:59:46 +00:00
Stefan Höck
8d4321eb9a
Add Data.Bits to base (#1033) 2021-03-04 20:59:56 +00:00
G. Allais
d2eeb7ce86
[ fix #758 ] desugar non-binding sequencing in do blocks to (>>) (#1095) 2021-02-24 11:07:16 +00:00
Stefan Hoeck
7401961425
[ new ] Bitwise XOR for Bits64 and Integer (#1026) 2021-02-16 15:14:56 +00:00
Andy Lok
bb1edab3aa Show more codes in error report 2021-02-12 18:37:12 +00:00
Ohad Kammar
891b2d667a
[ fix ] All the REPL commands should be in CommandTable (#1036)
Co-authored-by: Ohad Kammar <ohad.kammar@ed.ac.uk>
2021-02-08 17:25:49 +00:00
stefan-hoeck
f50b22548f tests for bitops 2021-02-08 15:47:23 +00:00
Wen Kokke
bd683938bf
Overhaul of concurrency primitives (#968)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-02-05 16:16:20 +00:00
stefan-hoeck
606bc577b5 fixed whitespace for *.sh 2021-01-22 15:08:49 +00:00
stefan-hoeck
8b96614454 fixed whitespace for *.c and *.h files 2021-01-22 15:08:49 +00:00
Stefan Hoeck
fb08004041
removed trailing whitespace (#955) 2021-01-21 11:33:03 +00:00
Fabián Heredia Montiel
b0e0bf17d4 Add time to windows runs due to flaky tests. 2021-01-19 18:40:35 +00:00
Stiopa Koltsov
b76c9d91e0 Remove trailing whitespaces and add trailing newlines 2021-01-16 10:00:03 +00:00