Oct 26

A new version of Idris, 0.9.15.1, has been released. You can find this on hackage, or from the download page.

The tutorial has also been updated.

Thanks as always to everyone who has contributed, either with code, documentation or by testing and reporting issues. You can find the names of all contributors in the CONTRIBUTORS file in the source repository.

Idris is still research software, so we expect there to be bugs. Please don’t keep them to yourself! If you find any problem, please report it on the github issue tracker. It is very helpful if you can also provide a small test case which reproduces your problem.

Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.

The main new features and updates are:

  • Naming of data and type constructors is made consistent across the standard library.
    • Note: This change will break existing code!
    • Data and Type Constructors now consistently begin with a capital letter, which means in particular we have Refl, FZ and FS for refl, fZ and fS.
    • The empty type is now called Void, and its eliminator void.
  • EXPERIMENTAL support for Uniqueness Types
  • EXPERIMENTAL support for Partial Evaluation, as described in Scrapping your Inefficient Engine.
  • The Java and LLVM backends have been factored out into separate projects, idris-java and idris-llvm.

There are several minor updates and improvements:

  • More efficient representation of the proof state, leading to faster elaboration of large expressions.
  • Two new tactics: skip and fail. skip does nothing, and fail takes a string as an argument and produces it as an error, with corresponding reflected tactics.
  • Improved display in the interactive prover.
  • Unary negation now desugars to `negate`, which is a method of the `Neg` type class. This allows instances of `Num` that can’t be negative, like `Nat`, and it makes correct IEEE Float operations easier to encode. Additionally, unary negation is now available to DSL authors.
  • New REPL command `:printdef` displays the internal definition of a name.
  • New REPL command `:pprint` pretty-prints a definition or term with LaTeX or HTML highlighting.
  • Terms in code blocks in documentation strings are now parsed and type checked. If this succeeds, they are rendered in full colour in documentation lookups, and with semantic highlighting for IDEs.
  • Fenced code blocks in docs defined with the “example” attribute are rendered as code examples.
  • Fenced code blocks declared to be Idris code that fail to parse or type check now provide error messages to IDE clients.

Jul 16

A new version of Idris, 0.9.14, has been released. You can find this on hackage, or from the download page.

The tutorial has also been updated.

This release is primarily to improve robustness and efficiency, and solves several long-standing issues. There is also a new, improved, JavaScript backend and better syntactic support for reflection.

Thanks as always to everyone who has contributed, either with code, documentation or by testing and reporting issues. You can find the names of all contributors in the CONTRIBUTORS file in the source repository.

Idris is still research software, so we expect there to be bugs. Please don’t keep them to yourself! If you find any problem, please report it on the github issue tracker. It is very helpful if you can also provide a small test case which reproduces your problem.

Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.

The main new features and updates are:

  • Tactic for case analysis in proofs
  • Induction and case tactic now work on expressions
  • Support for running tests for a package with the tests section of .ipkg files and the --testpkg command-line option
  • Clearly distinguish between type providers and postulate providers at the use site
  • Allow dependent function syntax to be overridden in dsl blocks, similarly to functions and let. The keyword for this is pi.
  • Updated effects library, with simplified API
  • All new JavaScript backend (avoids callstack overflows)
  • Add support for %lib directive for NodeJS
  • Quasiquotes and quasiquote patterns allow easier work with reflected terms.`(EXPR) quasiquotes EXPR, causing the elaborator to be used to produce a reflected version of it. Subterms prefixed with ~ are unquoted – on the RHS, they are reflected terms to splice in, while on the LHS they are patterns. A quasiquote expression can be given a goal type for the elaborator, which helps with disambiguation. For instance, `(() : ()) quotes the unit constructor, while `(() : Type) quotes the unit type. Both goal types and quasiquote are typechecked in the global environment.
  • Better inference of unbound implicits.

Jun 9

A new version of Idris, 0.9.13.1, has been released. You can find this on hackage, or from the download page.

This is a bug fix release: it fixes a problem with the interaction between lazy values and the new implementation of erasure introduced in 0.9.13, and slightly improves unification error messages.


Jun 3

A new version of Idris, 0.9.13, has been released. You can find this on hackage, or from the download page.

The tutorial has also been updated.

This release primarily improves robustness and efficiency, and more in-depth documentation. In particular, there is a new implementation of erasure by usage analysis.

Thanks as always to everyone who has contributed, either with code, documentation or by testing and reporting issues. You can find the names of all contributors in the CONTRIBUTORS file in the source repository.

Being research software, we expect there to be bugs. Please don’t keep them to yourself! If you find any problem, please report it on the github issue tracker. It is very helpful if you can also provide a small test case which reproduces your problem.

Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.

Aside from erasure, the new features and updates are:

  • New (first class) nested record update/access syntax:
    • record { a->b->c = val } x sets field accessed by c (b (a x)) to val
    • record { a->b->c } x accesses field, equivalent to c (b (a x))
  • IDE support for retrieving structured information about metavariables
  • Experimental Bits support for JavaScript
  • IdrisDoc: a Haddock- and JavaDoc-like HTML documentation generator
  • Command line option -e (or --eval) to evaluate expressions without loading the REPL. This is useful for writing more portable tests.
  • Many more of the basic functions and datatypes are documented
  • Primitive types such as Int and String are documented
  • Removed javascript lib in favor of idris-hackers/iQuery
  • Specify codegen for :compile REPL command (e.g. :compile javascript program.js)
  • Remove :info REPL command, subsume and enhance its functionality in the :doc command.
  • The banner at startup can be suppressed by adding :set nobanner to the initialisation script.
  • :apropos now accepts space-delimited lists of query items, and searches for the conjunction of its inputs. It also accepts binder syntax as search strings - for instance, -> finds functions.
  • Totality errors are now treated as warnings until code generation time, when they become errors again. This allows users to use the interactive editing features to fix totality issues, but no programs that violate the stated assumptions will actually run.
  • Added :makelemma command, which adds a new top level definition to solve a metavariable.
  • Extend :addclause to add instance bodies as well as definitions
  • Reverse parameters to BoundedList -- now matches Vect, and is easier to instantiate classes.
  • Move foldl into Foldable so it can be overridden.
  • Experimental :search REPL command for finding functions by type

Apr 4

A new version of Idris, 0.9.12, has been released. You can find this on hackage, or from the download page.

The tutorial has also been updated.

There are some changes in this release which may break old code, specifically laziness, codata and the effects library have been significantly updated. Full details are in the new tutorial, and in the Effects tutorial.

Thanks as always to everyone who has contributed, either with code, documentation or by testing and reporting issues. You can find the names of all contributors in the CONTRIBUTORS file in the source repository.

Being research software, we expect there to be bugs. Please don’t keep them to yourself! If you find any problem, please report it on the github issue tracker. It is very helpful if you can also provide a small test case which reproduces your problem.

Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.

Details of the new feature and updates follow.

Laziness

Laziness is now implemented via the type system, using the following constructs:

Lazy : Type -> Type
Delay : a -> Lazy a
Force : Lazy a -> a

Both Delay and Force may be left implicit, so laziness is usually silent apart from an explicit Lazy in a type, e.g.

boolCase : (b : Bool) -> (t : Lazy a) -> (e : Lazy a) -> a
boolCase True  t e = t
boolCase False t e = e

Codata

Similarly, codata is now implemented via the type system, using the following constructs:

Inf : Type -> Type
Delay : a -> Inf a
Force : Inf a -> a

Again, both Delay and Force may be left implicit. Data types may mix data and codata. Old style codata declarations are still supported, where Inf is added implicitly. The following declarations are therefore equivalent:

codata Stream : Type -> Type where
  (::) : a -> Stream a -> Stream a

data Stream : Type -> Type where
  (::) : a -> Inf (Stream a) -> Stream a

Lazy and Inf are closely related (in fact, the underlying implementation uses the same type). The only difference in practice is in totality checking, where Lazy is erased (i.e. terms are checked for termination normally, ignoring laziness annotations), and Inf uses a productivity checker, where any use of Delay must be constructor guarded.

Metavariables in types

Proof search now works for metavariables in types, giving some interactive type inference. For example:

vec : ?vtype
vec = with Vect ["a","b","c"]

This can either be solved interactively, using :ps at the REPL, or the appropriate vim mode or emacs mode commands. e.g. assuming it is defined on line 37 of vtest.idr:

*vtest> :ps 37 vtype
Vect 3 String

Alternatively, it can be solved explicitly in code:

vec : ?vtype
vec = with Vect ["a","b","c"]

vtype = proof search

Documentation comments

There is a new syntax for inline documentation. Documentation starts with |||, and
arguments are documented by preceding their name with @. For example:

||| Add two natural numbers
||| @ n the first number (examined by the function)
||| @ m the second number (not examined)
plus (n, m : Nat) -> Nat

Other changes

There have been several improvements in robustness and efficiency. Other changes are:

  • JavaScript and Node codegen now understand the %include directive.
  • Concept of null is now understood in the JavaScript and Node codegen.
  • Lots of performance patches for generated JavaScript.
  • New commands :eval (:e) and :type (:t) in the prover, which either normalise or show the type of expressions.
  • Allow type providers to return postulates in addition to terms.
  • Syntax for dealing with match failure in <- and pattern matching let.
  • Allow the auto-solve behaviour in the prover to be disabled, for easier debugging of proof automation. Use :set autosolve and :unset autosolve.
  • Updated effects library.
  • New :apropos command at REPL to search documentation, names, and types.
  • Unification errors are now slightly more informative.
  • Add covering function option, which checks whether a function and all descendants cover all possible inputs (subset of total).

Feb 4

A new version of Idris, 0.9.11.1, has been released. You can find this on hackage, or from the
download page.

The tutorial has also been updated.

This release mostly improves robustness and efficiency. The user visible changes are:

  • Agda-style equational reasoning (in Syntax.PreorderReasoning)
  • case construct now abstracts over the scrutinee in its type
  • Added label type 'name (equivalent to the empty type). This is intended for field/effect disambiguation. name can be any valid identifier. Two labels are definitionally equal if they have the same name.
  • General improvements in error messages, especially %error_reverse annotation, which allows a hint as to how to display a term in error messages
  • --ideslave mode now transmits semantic information about many of the strings that it emits, which can be used by clients to implement semantic highlighting like that of the REPL. This has been implemented in the Emacs mode and the IRC bot, which can serve as examples.
  • New expression form: with [name] [expr] privileges the namespace name when disambiguating overloaded names. For example, it is possible to write with Vect [1,2,3] at the REPL instead of the (Vect _ _) [1,2,3], because the Vect constructors are defined in a namespace called Vect.
  • assert_smaller internal function, which marks an expression as smaller than a pattern for use in totality checking. e.g. assert_smaller (x :: xs) (f xs) asserts that f xs will always be structurally smaller than (x :: xs).
  • assert_total internal function, which marks a subexpression as assumed to be total, e.g assert_total (tail (x :: xs)).
  • Terminal width is automatically detected if Idris is compiled with curses support. If curses is not available, automatic mode assumes 80 columns.
  • Changed argument order for Prelude.Either.either.
  • Experimental neweffects library, intended to replace effects in the next release.

Internal changes are:

  • Faster parsing and elaboration
  • Smaller .ibc files
  • Pretty-printer now used for all term output

Thanks, as ever, to everyone who has helped put this release together. You can find their names in the CONTRIBUTORS file in the source repository.

Being research software, we expect there to be bugs. Please don't keep them to yourself! If you find any problem, please report it on the github issue tracker. It is very helpful if you can also provide a small test case which reproduces your problem.

Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.


Feb 2

Edwin Brady gave a talk on programming with dependent types in Idris at CodeMesh 2013 in December 2013. You can now see a video of the talk.


Nov 28

A new version of Idris, 0.9.10, has been released. You can find this on hackage, or from the
download page, which contains a package for OS X and contains links to interactive editing modes for vim and emacs.

The tutorial has also been updated. The user visible changes are:

  • Type classes now implemented as dependent records, meaning that method types may now depend on earlier methods.
  • More flexible class instance resolution, so that function types and lambda expressions can be made instances of a type class.
  • Add !expr notation for implicit binding of intermediate results in monadic/do/etc expressions.
  • Extend Effects package to cope with possibly failing operations, using if_valid, if_error, etc.
  • At the REPL, it now refers to the previous expression.
  • Semantic colouring at the REPL. Turn this off with --nocolour.
  • Some prettifying of error messages.
  • The contents of ~/.idris/repl/init are run at REPL start-up.
  • The REPL stores a command history in ~/.idris/repl/history.
  • The [a..b], [a,b..c], [a..], and [a,b..] syntax now pass the totality checker and can thus be used in types. The [x..] syntax now returns an actually infinite stream.
  • Add %reflection option for functions, for compile-time operations on syntax.
  • Add expression form quoteGoal x by p in e which applies p to the expected expression type and binds the result to x in the scope e.
  • Performance improvements in Strings library.
  • Library reorganisation, separated into prelude and base.

There are several internal changes, mostly improving performance and fixing bugs:

  • New module/dependency tree checking.
  • New parser implementation with more precise errors.
  • Improved type class resolution.
  • Compiling Nat via GMP integers.
  • Performance improvements in elaboration.
  • Improvements in termination checking.
  • Various REPL commands to support interactive editing, and a client/server mode to allow external invocation of REPL commands.

Thanks, as ever, to everyone who has helped put this release together. You can find their names in the CONTRIBUTORS file in the source repository.

Being research software, we expect there to be bugs. Please don’t keep them to yourself! If you find any problem, please report it on the github issue tracker. It is very helpful if you can also provide a small test case which reproduces your problem.

Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.


Jul 31

A new version of Idris, 0.9.9, has been released on hackage. The tutorial has also been updated. The user visible changes are:

  • Apply functions by return type, rather than with arguments:
    • t <== f means "apply f with arguments such that it returns a value of type t"
  • Allow the result type of a rewrite to be specified:
    • rewrite prf ==> ty in val rewrites by prf, and checks that the resulting goal
      type is ty (Example)
  • Allow names to be attached to provisional definitions
    • lhs ?= {name} rhs generates a lemma called 'name' which makes the types of the lhs and rhs match. {name} is optional --- a unique name is generated if it is absent.
  • Experimental LLVM backend
  • Added Data.HVect module
  • Fix fromInteger to take an Integer, rather than an Int.
  • Integer literals for Fin n
  • Renamed O to Z, and fO to fZ to avoid confusion with the digit 0.
  • Swapped Vect arguments, now Vect : Nat -> Type -> Type
  • Added new DecEq instances
  • Add equiv tactic, which rewrites a goal to an equivalent (convertible) goal

Internal changes:

  • Add annotation for unification traces
  • Add mrefine tactic for refining by matching against a type
  • Type class resolution fixes
  • Much faster coverage checking

Thanks to everyone who has helped put this release together.

As always, please report any problems on the github issue tracker. Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.


May 28

A new version of Idris, 0.9.8, has been released on hackage. The user visible changes are:

  • Added “rewrite … in …” construct
  • Allow type class constraints in ‘using’ clauses
  • Renamed EFF to EFFECT in Effect package
  • Experimental Java backend
  • Tab completion in REPL
  • Dynamic loading of C libraries in the interpreter
  • Testing IO actions at the REPL
  • Improve rendering of :t
  • Fixed some INTERNAL ERROR messages

Several internal changes have been made:

  • Fix non-linear pattern checking
  • Improved name disambiguation
  • More flexible unification and elaboration of lambdas
  • Various unification and totality checking bug fixes

Thanks to everyone who has helped put this release together.

As always, please report any problems on the github issue tracker. Also, do let us know how you get on in general either via the mailing list or the #idris channel on irc.freenode.net.