Commit Graph

2425 Commits

Author SHA1 Message Date
Fabián Heredia Montiel
dd7081e2fe Use --tag (non-reversed) variant of sha256sum for NetBSD compat
Co-authored-by: Ben Hormann <benhormann@users.noreply.github.com>
2021-07-15 11:54:10 -05:00
Fabián Heredia Montiel
9b8de95a38 Detect hashFn once
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
2021-07-15 11:54:10 -05:00
Fabián Heredia Montiel
106487ca59 [refactor] Move pathLookup from Compiler.Common to Utils.Path 2021-07-15 11:54:10 -05:00
Stiopa Koltsov
61e04e36cf Use gsha256sum when sha256sum doesn't exist
On my mac laptop there's no `sha256sum` command, but there's
`gsha256sum`: using `g` prefix is common when GNU utilities are
installed on macOS.

```
SCHEME=chez make bootstrap
```

no longer fails on my laptop.

The downside is that compilation now continuously prints a warning
about `sha256sum` command not found (when it is not found).  And I
don't know how to fix it cross-platform way.

```
1/5: Building Network.Socket.Data (Network/Socket/Data.idr)
sh: sha256sum: command not found
2/5: Building Network.FFI (Network/FFI.idr)
sh: sha256sum: command not found
3/5: Building Network.Socket.Raw (Network/Socket/Raw.idr)
sh: sha256sum: command not found
4/5: Building Network.Socket (Network/Socket.idr)
sh: sha256sum: command not found
5/5: Building Control.Linear.Network (Control/Linear/Network.idr)
sh: sha256sum: command not found
```
2021-07-15 11:54:10 -05:00
Edwin Brady
b8082f4ed7
Merge pull request #1714 from edwinb/lodi-thread-data
fix arity for blodwen-set-thread-data
2021-07-15 16:21:31 +01:00
Edwin Brady
267b8f5406
Merge pull request #1713 from edwinb/mb64-fix-unquote-thing
Bring PR #530 up to date
2021-07-15 16:21:17 +01:00
Edwin Brady
dad1804509 Fix for thread data in racket/gambit too 2021-07-15 15:12:50 +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
Mathew Polzin
8d8d3ef71e woops, missed the first let when resolving merge. thank goodness we are dealing with a static type system 2021-07-15 06:40:38 -07:00
Mathew Polzin
289f1cc954 merge w/ upstream. 2021-07-15 06:29:56 -07:00
Edwin Brady
f79ff202e7 Bring quotation fix up to date
This is an update of PR #530 (Thanks to @mb64!)
2021-07-15 14:29:12 +01:00
Edwin Brady
86aaed5ae1
Merge branch 'master' into fix-unquote-thing 2021-07-15 14:13:25 +01:00
Edwin Brady
15bc6a3980
Merge pull request #1708 from stepancheg/fork-io-array
Fork Data.IOArray into the compiler
2021-07-15 14:09:58 +01:00
Edwin Brady
35f23ac1d6
Merge pull request #1712 from edwinb/MarcelineVQ-elab-name-changes
Add more name reflections
2021-07-15 14:08:31 +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
Guillaume ALLAIS
efcf44e8ba [ cosmetic ] use the whole range when underlining the problem 2021-07-15 07:32:43 +01:00
Mathew Polzin
221dadeb20 set default alt error count to 1 and create a config option that sets it to any number. 2021-07-14 20:23:29 -07:00
Mathew Polzin
1f21e787b1 Use commit to reduce the alternative parsing space as soon as an opening paren is encountered. 2021-07-14 17:22:40 -07:00
Stiopa Koltsov
47205049cf Fork Data.IOArray into the compiler
To be able to modify `Data.IOArray` as proposed in #1677.

Currently `Data.IOArray` cannot be modified because compiler need
to be built with previous compiler. This PR removes compiler
dependency on `Data.IOArray`.
2021-07-15 00:38:08 +01:00
Edwin Brady
8cd265cf47
Merge pull request #1698 from stepancheg/move-rm-rf-build
Move rm -rf to the beginning of the test
2021-07-14 16:00:46 +01:00
Edwin Brady
5cb77ad675
Merge pull request #1704 from edwinb/with-params
Fix 'with' under implicit parameters
2021-07-14 15:56:58 +01:00
Thomas E. Hansen
9fc3ee79e1
Merge branch 'master' into pragma-topic. 2021-07-14 16:45:05 +02:00
Edwin Brady
a5abb5b2a3
Merge pull request #1702 from stepancheg/rm-prim-get-errno
Remove prim__getErrno from Prelude.IO
2021-07-14 14:56:03 +01:00
Edwin Brady
1dbc9a7143 Fix 'with' under implicit parameters
The 'with' type and application need to treat the parameters with the
same plicity, but the application has just always treated them as
explicit since it never looked. It's easiest just to make them all
explicit, since this isn't a user visible type. Fixes #1695.
2021-07-14 14:51:52 +01:00
Mathew Polzin
830e5dc12d Fix bug with what value was propagated from rhs of alt parse failure and add test case for '@' as value constructor. 2021-07-14 00:25:02 -07:00
Stiopa Koltsov
291823c752 Remove prim__getErrno from Prelude.IO
The function is not used, and it is defined incorrectly.
2021-07-14 03:15:49 +01:00
André Videla
bd4245ccaf
Merge pull request #1699 from stepancheg/refc-generated
Use the same generated string in RefC backend as in other backends
2021-07-13 23:46:26 +00: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
Stiopa Koltsov
13a9676805 Use the same generated string in RefC backend as in other backends 2021-07-13 23:00:13 +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
Mathew Polzin
385a61a364 fix linting errors and use a public import of List1 instead of forcing other files to import List1 just to use Libraries.Text.Parser 2021-07-13 10:53:58 -07:00
Thomas E. Hansen
bfbe974254
[ doc ] Add topics (#1498) for pragmas. Implements --help pragma.
This adds the ability to do `idris2 --help pragma` and get a list of the
various pragmas and their options, similar to `idris2 --help logging`.
2021-07-13 17:52:40 +02:00
Nick Drozd
9cca3a7d35
Use Not instead of -> Void (#1667) 2021-07-13 15:32:01 +01:00
Stiopa Koltsov
d910677d74 IDRIS2_VERIFY macro
```
IDRIS2_VERIFY(cond, message_format, ...)
```

When condition is false, crash.

Used in native functions where correct error handling is hard or
not impossible.

For example, `malloc` rarely fails, but if it fails, better crash
with clear error message than spend time debugging null pointer
dereference.
2021-07-13 13:57:24 +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
stefan-hoeck
f6b4f188e1 [ new ] support compile time evaluation of new integer primops 2021-07-13 11:28:02 +01:00
Rujia Liu
9dfad52173
[fix] refc backend broken with msys2 (#1668) 2021-07-13 11:27:36 +01:00
stefan-hoeck
fdb2d4f2a4 [ doc ] updated javascript documentation 2021-07-13 11:15:20 +01:00
CodingCellist
80e7e179ad
[ fix #1652 ] Save casefnty to TTC (#1686) 2021-07-13 11:04:07 +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
Mathew Polzin
fd9045bc4a update tests 2021-07-12 23:25:49 -07:00
Mathew Polzin
8e1f2cf4ce fix lack of error for @ used as identifier and display multiple alternative errors. 2021-07-12 23:11:43 -07: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
Stiopa Koltsov
1fac812435 In RefC, allocate the exact size of value subtype
* remove `Value.payload` field
* `IDRIS2_NEW_VALUE` macro now allocates the size needed for the struct
2021-07-12 16:27:09 +01:00
Nick Drozd
a07d42ac91
Delete old Order file, update changelog and contributors (#1685) 2021-07-12 10:53:45 +01:00
Edwin Brady
b05ec6eff5
Merge pull request #1676 from edwinb/inc-fix
Need --script for incrementally compiled apps
2021-07-11 18:22:20 +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
c95ebd554d Disable incremental compilation on Windows
It currently doesn't work anyway, so fall back to whole program
compilation which at least means the test doesn't get in the way.
2021-07-11 16:20:47 +01:00