2024-01-02 06:08:56 +03:00
This CHANGELOG describes the merged but unreleased changes. Please see [CHANGELOG ](./CHANGELOG.md ) for changes to all previously released versions of Idris2. All new PRs should target this file (`CHANGELOG_NEXT`).
# Changelog
## [Next version]
2024-06-17 13:50:13 +03:00
### CLI changes
* The `idris2 --list-packages` command now outputs information about the
location and available TTC versions for each package it finds. It also shows
the current Idris2 TTC version so you can spot packages that do not have a
compatible TTC install. The TTC version tracks breaking changes to the
compiled binary format of Idris2 code and it is separate from Idris2's
semantic version (e.g. 0.7.0). A library without the correct TTC version
installed will be ignored by the compiler when it tries to use that library as
a dependency for some other package.
2024-01-06 00:59:11 +03:00
### Building/Packaging changes
* The Nix flake's `buildIdris` function now returns a set with `executable` and
`library` attributes. These supersede the now-deprecated `build` and
`installLibrary` attributes. `executable` is the same as `build` and `library`
is a function that takes an argument determining whether the library should be
installed with sourcecode files or not; other than that, `library`
functionally replaces `installLibrary` .
2024-01-09 08:58:17 +03:00
* The Nix flake's `buildIdris` `executable` property (previously `build` ) has
been fixed in a few ways. It used to output a non-executable file for NodeJS
builds (now the file has the executable bit set). It used to output the
default Idris2 wrapper for Scheme builds which relies on utilities not
guaranteed at runtime by the Nix derivation; now it rewraps the output to only
depend on the directory containing Idris2's runtime support library.
2024-01-22 08:05:26 +03:00
* The Nix flake now exposes the Idris2 API package as `idris2Api` and Idris2's
2024-01-06 00:59:11 +03:00
C support library as `support` .
2024-06-11 13:32:22 +03:00
* A new `idris2 --dump-ipkg-json` option (requires either `--find-ipkg` or
specifying the `.ipkg` file) dumps JSON information about an Idris package.
2024-01-02 06:08:56 +03:00
### Language changes
2024-01-02 06:47:36 +03:00
* Autobind and Typebind modifier on operators allow the user to
customise the syntax of operator to look more like a binder.
See [#3113 ](https://github.com/idris-lang/Idris2/issues/3113 ).
2024-04-03 17:41:57 +03:00
* Fixity declarations without an export modifier now emit a warning in peparation
for a future version where they will become private by default.
2024-03-16 01:41:29 +03:00
* Elaborator scripts were made to be able to access the visibility modifier of a
definition, via `getVis` .
2024-06-11 19:45:09 +03:00
* The language now has a ``%foreign_impl`` pragma to add additional languages
to a ``%foreign`` function.
2024-01-02 06:08:56 +03:00
### Compiler changes
2024-03-09 22:53:23 +03:00
* The compiler now differentiates between "package search path" and "package
directories." Previously both were combined (as seen in the `idris2 --paths`
output for "Package Directories"). Now entries in the search path will be
printed under an "Package Search Paths" entry and package directories will
continue to be printed under "Package Directories." The `IDRIS2_PACKAGE_PATH`
environment variable adds to the "Package Search Paths." Functionally this is
not a breaking change.
2024-04-27 20:08:09 +03:00
* The compiler now supports `impossible` in a non-case lambda. You can now
write `\ Refl impossible` .
2024-04-09 05:58:40 +03:00
* The compiler now parses `~x.fun` as unquoting `x` rather than `x.fun`
and `~(f 5).fun` as unquoting `(f 5)` rather than `(f 5).fun` .
2024-06-05 16:02:04 +03:00
* LHS of `with` -applications are parsed as `PWithApp` instead of `PApp` . As a
consequence, `IWithApp` appears in `TTImp` values in elaborator scripts instead
of `IApp` , as it should have been.
2024-03-21 15:32:37 +03:00
### Backend changes
2024-01-22 16:25:22 +03:00
#### RefC Backend
2024-03-21 15:32:37 +03:00
* Compiler can emit precise reference counting instructions where a reference
is dropped as soon as possible. This allows you to reuse unique variables and
optimize memory consumption.
2024-06-05 16:02:04 +03:00
* Fix invalid memory read in `strSubStr` .
2024-01-22 16:25:22 +03:00
2024-06-05 15:59:38 +03:00
* Fix memory leaks of `IORef` . Now that `IORef` holds values by itself,
`global_IORef_Storage` is no longer needed.
2024-01-22 16:25:22 +03:00
2024-06-05 15:59:38 +03:00
* Pattern matching generates simpler code. This reduces `malloc` /`free` and memory
2024-01-23 15:59:23 +03:00
consumption. It also makes debugging easier.
2024-02-20 17:01:06 +03:00
* Stopped useless string copying in the constructor to save memory. Also, name
generation was stopped for constructors that have tags.
2024-06-05 15:59:38 +03:00
* Special constructors such as `Nil` and `Nothing` were eliminated and assigned to
`NULL` .
2024-02-20 17:01:06 +03:00
2024-06-05 15:59:38 +03:00
* Unbox `Bits32` , `Bits16` , `Bits8` , `Int32` , `Int16` , `Int8` . These types are now packed into
2024-03-21 15:32:37 +03:00
Value*. Now, RefC backend requires at least 32 bits for pointers.
16-bit CPUs are no longer supported. And we expect the address returned by
2024-06-05 15:59:38 +03:00
`malloc` to be aligned with at least 32 bits. Otherwise it cause a runtime error.
2024-03-21 15:32:37 +03:00
* Rename C function to avoid confliction. But only a part.
2024-04-17 17:48:43 +03:00
* Supress code generation of _arglist wrappers to reduce code size and compilation time.
* Removed Value_Arglist to reduce Closure's allocation overhead and make code simply.
* Switch calling conventions based on the number of arguments to avoid limits on
the number of arguments and to reduce stack usage.
2023-04-04 17:38:07 +03:00
#### Chez
* Fixed CSE soundness bug that caused delayed expressions to sometimes be eagerly
evaluated. Now when a delayed expression is lifted by CSE, it is compiled
using Scheme's `delay` and `force` to memoize them.
#### Racket
* Fixed CSE soundness bug that caused delayed expressions to sometimes be eagerly
evaluated. Now when a delayed expression is lifted by CSE, it is compiled
using Scheme's `delay` and `force` to memoize them.
2024-01-06 23:11:33 +03:00
#### NodeJS Backend
* The NodeJS executable output to `build/exec/` now has its executable bit set.
That file already had a NodeJS shebang at the top, so now it is fully ready to
go after compilation.
2024-01-02 06:08:56 +03:00
### Library changes
#### Prelude
2024-06-06 12:59:30 +03:00
* Added pipeline operators `(|>)` and `(<|)` .
2024-01-02 06:08:56 +03:00
#### Base
* `Data.List.Lazy` was moved from `contrib` to `base` .
* Added an `Interpolation` implementation for primitive decimal numeric types and `Nat` .
* Added append `(++)` for `List` version of `All` .
2024-03-19 16:22:32 +03:00
* Moved helpers and theorems from contrib's `Data.HVect` into base's
`Data.Vect.Quantifiers.All` namespace. Some functions were renamed and some
already existed. Others had quantity changes -- in short, there were some
breaking changes here in addition to removing the respective functions from
contrib. If you hit a breaking change, please take a look at
[the PR ](https://github.com/idris-lang/Idris2/pull/3191/files ) and determine if you
simply need to update a function name or if your use-case requires additional
code changes in the base library. If it's the latter, open a bug ticket or
start a discussion on the Idris Discord to determine the best path forward.
2024-01-14 20:26:51 +03:00
* Deprecate `bufferData` in favor of `bufferData'` . These functions are the same
with the exception of the latter dealing in `Bits8` which is more correct than
`Int` .
2024-01-15 16:01:25 +03:00
* Added an alternative `TTImp` traversal function `mapATTImp'` taking the original
`TTImp` at the input along with already traversed one. Existing `mapATTImp` is
implemented through the newly added one. The similar alternative for `mapMTTImp`
is added too.
2024-03-16 01:21:05 +03:00
* Removed need for the runtime value of the implicit argument in `succNotLTEpred` .
2024-03-07 17:38:28 +03:00
2024-06-11 13:05:48 +03:00
* Added utility functions `insertWith` , `insertFromWith` and `fromListWith` for
`SortedMap` .
2024-06-05 14:00:57 +03:00
* Implemented `leftMost` and `rightMost` for `SortedSet` .
2024-05-16 20:37:37 +03:00
* Added `funExt0` and `funExt1` , functions analogous to `funExt` but for functions
with quantities 0 and 1 respectively.
2024-06-05 15:59:38 +03:00
* `SortedSet` , `SortedMap` and `SortedDMap` modules were extended with flipped variants
of functions like `lookup` , `contains` , `update` and `insert` .
2024-05-23 18:00:56 +03:00
* Moved definition of `Data.Vect.nubBy` to the global scope as `nubByImpl` to
allow compile time proofs on `nubBy` and `nub` .
2024-05-23 18:09:11 +03:00
* Removed need for the runtime value of the implicit length argument in
`Data.Vect.Elem.dropElem` .
2024-06-10 22:03:08 +03:00
* Some pieces of `Data.Fin.Extra` from `contrib` were moved to `base` to modules
`Data.Fin.Properties` , `Data.Fin.Arith` and `Data.Fin.Split` .
2024-01-02 06:08:56 +03:00
#### Contrib
* `Data.List.Lazy` was moved from `contrib` to `base` .
* Existing `System.Console.GetOpt` was extended to support errors during options
parsing in a backward-compatible way.
2024-02-12 20:35:52 +03:00
2024-03-19 16:22:32 +03:00
* Moved helpers from `Data.HVect` to base library's `Data.Vect.Quantifiers.All`
and removed `Data.HVect` from contrib. See the additional notes in the
CHANGELOG under the `Library changes` /`Base` section above.
2024-06-10 22:03:08 +03:00
* Some pieces of `Data.Fin.Extra` from `contrib` were moved to `base` to modules
`Data.Fin.Properties` , `Data.Fin.Arith` and `Data.Fin.Split` .
* Function `invFin` from `Data.Fin.Extra` was deprecated in favour of
`Data.Fin.complement` from `base` .
2024-02-12 20:35:52 +03:00
#### Network
2024-06-05 15:59:38 +03:00
* Add a missing function parameter (the flag) in the C implementation of `idrnet_recv_bytes`