2021-01-16 17:18:18 +03:00
Changes since Idris 2 v0.3.0
2021-02-15 21:56:05 +03:00
============================
2021-01-16 17:18:18 +03:00
REPL/IDE mode changes:
* Added `:search` command, which searches for functions by type
2021-02-15 21:56:05 +03:00
* `:load` /`:l` and `:cd` commands now only accept paths surrounded by double quotes
2021-01-16 17:18:18 +03:00
2021-02-27 17:15:19 +03:00
Other changes:
* The `version` field in `.ipkg` files is now used. Packages are installed into
a directory which includes its version number, and dependencies can give
version number ranges.
* Idris now looks in the current working directory, under a subdirectory
`depends` for local installations of packages before looking globally.
2020-08-18 19:41:45 +03:00
Changes since Idris 2 v0.2.1
----------------------------
2020-08-26 17:48:19 +03:00
Library changes:
2021-02-05 19:16:20 +03:00
* Overhaul of the concurrency primitives:
- Renamed `System.Concurrency.Raw` to `System.Concurrency` .
- Modified the implementation of `Prelude.IO.fork` in the Chez Scheme RTS, which
now returns a semaphore instead of a thread object. This allows the main
thread to wait for the child thread to finish (see next bullet). The Racket
implementation already returned a thread descriptor, which could be used to
wait for the thread to finish.
- Added `Prelude.IO.threadWait` which waits for a thread, identified by a
`ThreadID` , to finish. This operation is supported by both the Chez Scheme and
the Racket RTS'es.
- Added semaphores to `System.Concurrency` , supported by both the Chez Scheme
and Racket RTS'es.
- Added barriers to `System.Concurrency` , supported by both the Chez Scheme
and Racket RTS'es.
- Added synchronous channels to `System.Concurrency` , supported by both the Chez
Scheme and Racket RTS'es.
- Fixed the support for mutexes in the Racket RTS. Formerly, they were
implemented with semaphores, and calling`mutexRelease` multiple times would
increment the internal counter multiple times, allowing multiple concurrent
`mutexAcquire` operations to succeed simultaneously. Currently, `mutexRelease`
fails when called on a mutex which isn't owned. (However, `mutexRelease` does
not check whether the mutex is in fact owned by the current thread, which may
be a bug.)
- Modified the support for condition variables in the Racket RTS. Formerly,
2021-02-15 21:56:05 +03:00
they were implemented using synchronous channels, meaning that:
+ `conditionSignal` was a blocking operation; and
+ calling `conditionSignal` on a condition variable on which no thread
was waiting would wake the next thread to call `conditionWait` ,
whereas condition variables are supposed to be stateless, and only
wake threads already in the queue.
2021-02-05 19:16:20 +03:00
The implementation was replaced with an implementation based on asynchronous
channels and mutexes, based on the following paper:
2021-02-15 21:56:05 +03:00
[Implementing Condition Variables with Semaphores ](https://www.microsoft.com/en-us/research/wp-content/uploads/2004/12/ImplementingCVs.pdf ) by Andrew Birrell
2021-02-05 19:16:20 +03:00
- Removed `threadID` and `blodwen-thisthread` . Formerly, in the Chez Scheme
backend, this function returned "the thread id of the current thread" as a
value of type `ThreadID` . However, `fork` returned a "thread object" as a
value of type `ThreadID` . These are *different kinds of values* in Chez
Scheme. As there was nothing one could do with a value of type `ThreadID` , I
chose to remove `threadID` , as it allowed me to implement `threadWait` more
easily.
- Renamed `blodwen-lock` and `blodwen-unlock` to `blodwen-mutex-acquire` and
`blodwen-mutex-release` for consistency, as these functions are referred to
with acquire and release both in Chez Scheme and in the Idris2 concurrency
module.
2020-08-26 17:48:19 +03:00
* Added `Data.HVect` in `contrib` , for heterogeneous vectors.
2021-01-13 16:04:08 +03:00
* Various other library functions added throughout `base` and `contrib`
2020-08-26 17:48:19 +03:00
2020-08-18 19:41:45 +03:00
Command-line options changes:
* Added `--color` and `--no-color` options for colored terminal output.
Color is enabled by default.
2020-08-19 12:27:05 +03:00
* Added `--console-width <auto|n>` option for printing margins. By default the
2020-08-18 19:41:45 +03:00
`auto` option is selected, the result is that the compiler detects the current
terminal width and sets it as the option value, otherwise a user value can be
2020-08-19 12:27:05 +03:00
provided. An explicit `0` has the effect of simulating a terminal with
2020-08-18 19:41:45 +03:00
unbounded width.
Remove linearity subtyping
It's disappointing to have to do this, but I think necessary because
various issue reports have shown it to be unsound (at least as far as
inference goes) and, at the very least, confusing. This patch brings us
back to the basic rules of QTT.
On the one hand, this makes the 1 multiplicity less useful, because it
means we can't flag arguments as being used exactly once which would be
useful for optimisation purposes as well as precision in the type. On
the other hand, it removes some complexity (and a hack) from
unification, and has the advantage of being correct! Also, I still
consider the 1 multiplicity an experiment.
We can still do interesting things like protocol state tracking, which
is my primary motivation at least.
Ideally, if the 1 multiplicity is going to be more generall useful,
we'll need some kind of way of doing multiplicity polymorphism in the
future. I don't think subtyping is the way (I've pretty much always come
to regret adding some form of subtyping).
Fixes #73 (and maybe some others).
2020-12-27 22:58:35 +03:00
Language and compiler changes:
2020-08-18 19:41:45 +03:00
2021-01-13 16:04:08 +03:00
* Removed multiplicity subtyping, as this is unsound and unfortunately causes
more problems than it solves. This means you sometimes now need to write
linear versions of functions as special cases. (Though note that the 1
multiplicity is still considered experimental, so hopefully this will change
for the better in the future!)
* Added new syntax for named applications of explicit arguments:
2020-08-27 20:47:42 +03:00
2020-10-01 12:41:30 +03:00
`f {x [= t], x [= t], ...}`
`f {x [= t], x [= t], ..., _}`
2021-01-13 16:04:08 +03:00
* Added syntax for binding all explicit arguments (in the left hand side);
2020-10-01 12:41:30 +03:00
`f {}`
2021-01-13 16:04:08 +03:00
* Added new syntax for record updates (without the need for the `record`
keyword):
2020-10-01 12:41:30 +03:00
`{x := t, x $= t, ...}`
2020-08-27 20:47:42 +03:00
2021-01-13 16:04:08 +03:00
* Local implementations of interfaces (in `let` or `where` blocks) now work,
along with `%hint` annotations on local definitions, meaning that local
definitions can be searched in auto implicit search.
+ Note, though, that there are still some known limitations (with both local
hints and local implementations) which will be resolved in the next version.
2020-10-11 20:55:43 +03:00
* New experimental ``refc`` code generator, which generates C with reference
counting.
2021-01-13 16:04:08 +03:00
* Added primitives to the parsing library used in the compiler to get more precise
boundaries to the AST nodes `FC` .
2020-08-18 19:41:45 +03:00
REPL/IDE mode changes:
* Added `:color (on|off)` option for colored terminal output.
2020-08-19 12:27:05 +03:00
* Added `:consolewidth (auto|n)` option for printing margins. Mirrors the
command line option.
2020-08-18 19:41:45 +03:00
2020-06-01 03:45:15 +03:00
Changes since Idris 2 v0.2.0
----------------------------
Language changes:
* `Bits8` , `Bits16` , `Bits32` and `Bits64` primitive types added, with:
2021-02-15 21:56:05 +03:00
+ `Num` , `Eq` , `Ord` and `Show` implementations.
+ Casts from `Integer` , for literals
+ Casts to `Int` (except for `Bits64` which might not fit),
`Integer` and `String`
+ Passed to C FFI as `unsigned`
+ Primitives added in `Data.Buffer`
2020-06-01 15:39:18 +03:00
* Elaborator reflection and quoting terms
2021-02-15 21:56:05 +03:00
+ Requires extension `%language ElabReflection`
+ API defined in `Language.Reflection` , including functions for getting
types of global names, constructors of data types, and adding new top
level declarations
+ Implemented `%macro` function flag, to remove the syntactic noise of
invoking elaborator scripts. This means the function must always
be fully applied, and is run under `%runElab`
2020-07-04 22:26:49 +03:00
* Add `import X as Y`
2021-02-15 21:56:05 +03:00
+ This imports the module `X` , adding aliases for the definitions in
namespace `Y` , so they can be referred to as `Y` .
2020-07-05 00:59:48 +03:00
* `do` notation can now be qualified with a namespace
2021-02-15 21:56:05 +03:00
+ `MyDo.do` opens a `do` block where the `>>=` operator used is `MyDo.(>>=)`
2020-06-01 03:45:15 +03:00
2020-06-12 16:12:32 +03:00
Library changes:
2020-06-21 16:46:14 +03:00
* `IO` operations in the `prelude` and `base` libraries now use the
`HasIO` interface, rather than using `IO` directly.
2020-06-24 01:10:22 +03:00
* Experimental `Data.Linear.Array` added to `contrib` , supporting mutable
linear arrays with constant time read/write, convertible to immutable arrays
with constant time read.
2021-02-15 21:56:05 +03:00
+ Anything in `Data.Linear` in `contrib` , just like the rest of `contrib` ,
should be considered experimental with the API able to change at any time!
Further experiments in `Data.Linear` are welcome :).
2020-06-24 01:10:22 +03:00
* Experimental `Control.Linear.LIO` added to `contrib` , supporting computations
which track the multiplicities of their return values, which allows linear
resources to be tracked.
2020-06-20 14:55:42 +03:00
* Added `Control.Monad.ST` , for update in-place via `STRef` (which is like
`IORef` , but can escape from `IO` ). Also added `Data.Ref` which provides an
interface to both `IORef` and `STRef` .
2020-06-26 20:16:14 +03:00
* Added `Control.ANSI` in `contrib` , for usage of ANSI escape codes for text
styling and cursor/screen control in terminals.
2020-06-12 16:12:32 +03:00
2020-06-19 12:36:07 +03:00
Command-line options changes:
* Removed `--ide-mode-socket-with` option. `--ide-mode-socket` now accepts an
optional `host:port` argument.
2020-06-17 06:06:07 +03:00
* Added options to override source directory, build directory and output
directory: `--source-dir` , `--build-dir` , `--output-dir` .
+ These options are also available as fields in the package description:
`sourcedir` , `builddir` , `outputdir` .
2020-06-19 12:36:07 +03:00
2020-06-18 13:30:35 +03:00
Compiler changes:
2020-06-19 12:36:07 +03:00
2021-02-15 21:56:05 +03:00
* It is now possible to create new backends with minimal overhead.
`Idris.Driver` exposes the function `mainWithCodegens` that takes
a list of codegens. The feature in documented [here ](https://idris2.readthedocs.io/en/latest/backends/custom.html ).
2020-07-30 15:08:03 +03:00
* New code generators `node` and `javascript` .
2020-06-18 13:30:35 +03:00
2020-08-04 14:51:57 +03:00
REPL/IDE mode changes:
2020-06-16 15:59:47 +03:00
* Implemented `:module` command, to load a module during a REPL session.
2020-07-08 20:06:02 +03:00
* Implemented `:doc` , which displays documentation for a name.
* Implemented `:browse` , which lists the names exported by a namespace.
2020-07-27 15:45:10 +03:00
* Added `:psnext` , which continues the previous proof search, looking for the
next type correct expression
+ Correspondingly, added the IDE mode command `proof-search-next` (which takes
no arguments)
* Added `:gdnext` , which continues the previous program search, looking for the
next type correct implementation
+ Correspondingly, added the IDE mode command `generate-def-next` (which takes
no arguments)
2020-08-04 14:51:57 +03:00
* Improved program search to allow deconstructing intermediate values, and in
simple cases, the result of recursive calls.
2020-06-16 15:59:47 +03:00
2020-05-20 13:31:24 +03:00
Changes since Idris 2 v0.1.0
----------------------------
The implementation is now self-hosted. To initialise the build, either use
the [bootstrapping version of Idris2 ](https://github.com/edwinb/Idris2-boot )
2020-05-22 16:14:09 +03:00
or build from the generated Scheme, using `make bootstrap` .
2020-05-20 13:31:24 +03:00
2020-05-22 15:28:07 +03:00
Language changes:
2020-05-20 13:31:24 +03:00
2020-05-22 15:28:07 +03:00
* `total` , `covering` and `partial` flags on functions now have an effect.
2020-05-24 21:58:20 +03:00
* `%default <totality status>` has been implemented. By default, functions must
be at least `covering`
+ That is, `%default covering` is the default status.
2020-05-22 16:21:48 +03:00
* Fields of records can be accessed (and updated) using the dot syntax,
such as `r.field1.field2` or `record { field1.field2 = 42 }` .
2021-02-15 21:56:05 +03:00
For details, see [the "records" entry in the user manual ](https://idris2.readthedocs.io/en/latest/reference/records.html )
2020-05-22 18:01:47 +03:00
* New function flag `%tcinline` which means that the function should be
inlined for the purposes of totality checking (but otherwise not inlined).
This can be used as a hint for totality checking, to make the checker look
inside functions that it otherwise might not.
2020-05-20 13:31:24 +03:00
* %transform directive, for declaring transformation rules on runtime
expressions. Transformation rules are automatically added for top level
implementations of interfaces.
* A %spec flag on functions which allows arguments to be marked for partial
evaluation, following the rules from "Scrapping Your Inefficient Engine"
(ICFP 2010, Brady & Hammond)
2020-05-22 21:26:10 +03:00
* To improve error messages, one can use `with NS.name <term>`
or `with [NS.name1, NS.name2, ...] <term>` to disable disambiguation
for the given names in `<term>` . Example: `with MyNS.(>>=) do ...` .
2020-05-20 13:31:24 +03:00
Library additions:
* Additional file management operations in `base`
2020-05-21 14:00:09 +03:00
* New module in `base` for time (`System.Clock`)
* New modules in `contrib` for JSON (`Language.JSON.*`); random numbers
(`System.Random`)
2020-05-20 13:31:24 +03:00
2020-05-22 16:21:48 +03:00
Compiler updates:
* Data types with a single constructor, with a single unerased arguments,
are translated to just that argument, to save repeated packing and unpacking.
(c.f. `newtype` in Haskell)
+ A data type can opt out of this behaviour by specifying `noNewtype` in its
options list. `noNewtype` allows code generators to apply special handling
to the generated constructor/deconstructor, for a newtype-like data type,
that would otherwise be optimised away.
* 0-multiplicity constructor arguments are now properly erased, not just
given a placeholder null value.
2020-05-20 13:31:24 +03:00
Other improvements:
* Various performance improvements in the typechecker:
+ Noting which metavariables are blocking unification constraints, so that
they only get retried if those metavariables make progress.
+ Evaluating `fromInteger` at compile time.
* Extend Idris2's literate mode to support reading Markdown and OrgMode files.
2021-02-15 21:56:05 +03:00
For more details see: ["literate" in the user manual ](https://idris2.readthedocs.io/en/latest/reference/literate.html ).
2020-05-20 13:31:24 +03:00
Changes since Idris 1
---------------------
Everything :). For full details, see:
2021-02-15 21:56:05 +03:00
[updates ](https://idris2.readthedocs.io/en/latest/updates/updates.html )