* [ fix ] Fix issue with eager evaluation of crashing functions
* Mark functions that call unsafe builtins as non-constant
* Better detection of crash primop when deciding if functions can be constant
* Change the printing of namespaced operator to show
parenthesis around operators
* Update warning when conflicting fixities are found
* Do not warn about redundant but compatible fixities
* [ fix ] Programmer-provided terms should be alwaysReduce
This ports Edwin's commit that fixes the original issue back to Idris
Co-authored-by: Edwin Brady <ecb10@st-andrews.ac.uk>
* [ tests ] Added regression test for #1878
* Updated CHANGELOG.md and CONTRIBUTORS
---------
Co-authored-by: Edwin Brady <ecb10@st-andrews.ac.uk>
* [ fix ] collect constructors on LHS of cases alts
* [ tests ] Updated expected
These functions do refer to these constructors at runtime, so this is the correct output
* Update CHANGELOG.md
* [test] update test output again
* [ new ] Implement bit-rotation operators
Whereas `shiftR` and `shiftL` throw bits off the edge, the `rotR` and
`rotL` operations wrap the bits around to the start of the bit-stream.
* [ test ] visualise bit patterns instead
* [ fix ] print bit patterns the right way around
---------
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
- call sequences in termination errors now carry location information
- new error message (`BadPath`) for late-starting loops
- [ fix ] transitive closure of size-change graphs no longer ignores function arguments
- update existing tests accordingly
* implement popen and pclose (to an extent) for NodeJS
* bring node020 back into tests.
* ah, I see what was being done here. Fix the idris for the test.
* fix test's unreachable clause warning
* fix expectation
* Add note to CHANGELOG
* small tweaks to get popen into merge-ready state.
* make color output toggling simpler and also more robust
* don't unintentionally assert that tests are run in an environment where colors are turned on.
* Update src/Idris/Env.idr
Also updated test real002 to use the actual Control.App from
libs/base/Control/App.idr. Before it was using a different version that
existed within its test directory, tests/idris2/real002/Control/App.idr
* Fix symbom mangling
* Revert "Fix symbom mangling"
This reverts commit 6481e80155.
* Fix typo
* [RefC] Add missed prims of setBuffer* .
* [ fix ] formatting
* [ re #2609 ] Use 'UInt' instead of 'Word'
More descriptive/to the point / Less assumed knowledge.
There are no *LE suffixes for UInt8, since endianness is to do with
multiple bytes and UInt8 is a single one.
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
Co-authored-by: Thomas E. Hansen <teh6@st-andrews.ac.uk>
* [ base ] Deprecate setByte in favour of setBits8
Deprecate getByte; fix Core.Binary.Prims
Along with `setByte`, the `getByte` function should similarly be
deprecated since it also assumes the value will have the given size,
rather than guaranteeing it in the type.
CI highlighted some required changes in `Core.Binary.Prims` thanks to
`-Werror`. The fix was to add some `cast` calls where the old `getByte`
and `setByte` used to be.
The RefC buffer test will need updating once we remove the functions
completely. Added a note for future peeps.
* [ fix ] .ipkg install dir
* [ test ] .ipkg install dir
* [ doc ] update CHECKLIST
* [ doc ] add explanation to pkg016 test
* [ cleanup ] no need to clutter CHECKLIST
A common issue for users is that the behaviour of the various repl
commands are not documented anywhere despite some of them having complex
behaviour (e.g. `:set` which accepts a specific set of options). This
implements the ability to call `:?|:h|:help` on repl commands to request
detailed help for a specific repl command, while preserving the
behaviour that calling the help command without any arguments prints the
general help text.
Generic help is defined as the first line of the help text.
Detailed help is defined as the entire help text.
This means that `:help :t`, for example, does not error (there is no
detailed help) but instead just prints the single line of help text.
* [ repl ] Use unlines for detailed help (see #2087)
Ideally, the lines affected should be multiline strings. But for some
arcane reason, newlines in those get swallowed in Nix and Windows
**CI** only Ô.o
This was already documented in issue #2087.
* [ new ] --except for golden testing lib
To allow CI to pass despite #2087
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
I don't think there's a good solution at least until we start
parsing these comments so let's just keep them as they were written
by the library writer.
* [ refactor ] use Bits32 for enum types during codegen
* [ test ] add test case
* [ test ] restore vmcode test result
* [ fix ] more B32 conversions
* [ refactor ] flexible ENUM representation
* [ text ] fix codegen test
* 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
* Actually install the version
This should make things start working
* [ fix ] use backtracking to resolve transitive dependencies
* [ fix ] use backtracking to resolve dependencies
* [ fix ] test pkg006
* Fix missing import
Co-authored-by: stefan-hoeck <hock@zhaw.ch>
* 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
* Actually install the version
This should make things start working
* [ fix ] semantic highlighting in IDE mode
Bring back (?) highlighting of goals
* [ debug ] better logging: add length
* [ test ] turns out lengths are not needed!
* 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
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
* 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>