Tags: DIJamner/Idris-dev
Tags
New in 0.99.2 Library Updates + Added `Data.Buffer` to `base`. This allows basic manipulation of mutable buffers of `Bits8`, including reading from and writing to files. Tool Updates + Idris now checks the list of packages specified at the command line against those installed. If there is a mismatch Idris will complain. Miscellaneous Updates + Documentation updates for the new `Control.ST` library + Various stability/efficiency fixes
New in 0.99.1: Language updates * Language pragmas now required for the less stable existing features, in addition to the existing `TypeProviders` and `ErrorReflection`: + `ElabReflection`, which must be enabled to use `%runElab` + `UniquenessTypes`, which must be enabled to use `UniqueType` + `DSLNotation`, which must be enabled to define a `dsl` block + `FirstClassReflection`, which must be enabled to define a `%reflection` function * New language extension `LinearTypes`: + This allows adding a /multiplicity/ to a binder which says how often it is allowed to be used; either 0 or 1 (if unstated, multiplicity is "many") + The typing rules follow Conor McBride's paper "I Got Plenty o' Nuttin'" + This is highly experimental, unfinished, not at all polished. and there are still lots of details to sort out. Some features don't quite work properly yet. But it is there to play with for the brave! Tool Updates + Idris' output has been updated to more accurately reflect its progress through the compiler i.e. Type Checking; Totality Checking; IBC Generation; Compiling; and Code Generation. To control the loudness of the reporting three verbosity levels are introduced: `--V0`, `--V1`, and `--V2`. The old aliases of `-V` and `--verbose` persist. + New REPL command `:!` that runs an external shell command. + The REPL now colourises output on MinTTY consoles (e.g., Cygwin and MSYS) on Windows, which previously did not occur due to a bug. + Idris now runs in a UTF-8-compatible codepage on Windows. This fixes many Unicode-rendering issues on Windows (e.g., error messages stating `commitBuffer: invalid argument (invalid character)`). + Idris now has a `--warnipkg` flag to enable auditing of Idris packages during build time. Currently auditing check's the list of modules specified in the `iPKG` file with those presented in the package directory. Library Updates + Terminating programs has been improved with more appropriate functions (`exitWith`, `exitFailure`, and `exitSuccess`) and a data structure (`ExitCode`) to capture a program's return code. + Casting a `String` to an `Int`, `Integer` or a `Double` now ignores leading and trailing whitespace. Previously only leading whitespace was ignored. + RTS functions `openFile`, `do_popen`, and `ARGV` are now properly encoded using UTF-8 on Windows.
* `record` syntax now allows updating fields, including nested fields, by applying a function using the `$=` operator. For example: ```idris record Score where constructor MkScore correct : Nat attempted : Nat record GameState where constructor MkGameState score : Score difficulty : Nat correct : GameState -> GameState correct st = record { score->correct $= (+1), score->attempted $= (+1) } st ``` * Implicit parameter to interfaces are now allowed. For example: ```idris interface Shows (ts : Vect k Type) where shows : HVect ts -> Vect k String ``` In this interface, `k` is an implicit parameter, but previously needed to be explicit * The File Effect has been updated to take into account changes in `Prelude.File` and to provide a 'better' API. * `natEnumFromThen` and `natEnumFromTo` have been updated to correctly calculate reverse ranges. Range syntax `[a,b..c]` now can be used again to generate reverse ranges. * `divBN` and `modBN` now can only be used for unsigned numbers. * `return`, which has been an alias for `pure` for many releases, is now deprecated. * Replace instance with implementation: + `InstanceN` is deprecated, use `ImplementationN` instead. + `InstanceCtorN` is deprecated, use `ImplementationCtorN` instead. + `addInstance` is deprecated, use `addImplementation` instead. + `%instance` keyword is deprecated, use `%implementation` instead. * Idris packages are now installed within a sub-directory `libs` of Idris' data directory, before they were installed in the directory's root. * Idris' documentation system now displays the documentation for auto implicits in the output of `:doc`. This is tested for in `docs005`. * New command line flag `--info` that displays information about the installation. * New command line flag `--sourcepath <dir>` that allows adding directories to the source search path. * Allow 'installation' of a package's IdrisDoc documentation into a central location. The default location is the subdirectory `docs` of Idris' data directory. * New flag `--installdoc <ipkg>` provided to install documentation * New flag `--docdir` provided to show default documentation installation location. * New environment variable `IDRIS_DOC_PATH` to allow specification of an alternative installation path for documentation. * Semantic meaning behind several environment variables has been clarified in documentation and code. See compilation section of the reference manual for more details. * Interface parameter constraints are now printed in the output of `:doc`. This is tested for in `docs006`. * New, faster, better, implementation of the coverage checker * The test suite now uses [tasty-golden](https://hackage.haskell.org/package/tasty-golden). New tests must be registered in `test/TestData.hs`, as explained in the relevant `README.md`. * Added OSX and Windows continous integration with Travis and Appveyor. * The :e command can now handle an $EDITOR with arguments in it, like "emacs -nw"
* `rewrite` can now be used to rewrite equalities on functions over dependent types * `rewrite` can now be given an optional rewriting lemma, with the syntax `rewrite [rule] using [rewrite_lemma] in [scope]`. * Reorganised elaboration of `implementation`, so that interfaces with dependencies between methods now work more smoothly * Allow naming of parent implementations when defining an implementation. For example: ``` [PlusNatSemi] Semigroup Nat where (<+>) x y = x + y [MultNatSemi] Semigroup Nat where (<+>) x y = x * y -- use PlusNatSemi as the parent implementation [PlusNatMonoid] Monoid Nat using PlusNatSemi where neutral = 0 -- use MultNatSemi as the parent implementation [MultNatMonoid] Monoid Nat using MultNatSemi where neutral = 1 ``` * Interface definitions can now include data declarations (but not data definitions). Any implementation of the interface must define the method using a data type. The effect is to cause Idris to treat the method as a data type (for unification and interface resolution purposes). * Experimentally, allow named implementations to be available by default in a block of declarations with `using` notation. For example: ``` using implementation PlusNatMonoid test : Nat -> Nat test x = x <+> x <+> neutral ``` * Constraint arguments can now appear anywhere in function types, not just at the top level or after an implicit argument binding. * Experimental extended `with` syntax, which allows calling functions defined in a with block directly. For example: ``` data SnocList : List a -> Type where Empty : SnocList [] Snoc : SnocList xs -> SnocList (xs ++ [x]) snocList : (xs : List a) -> SnocList a my_reverse : List a -> List a my_reverse xs with (snocList xs) my_reverse [] | Empty = [] my_reverse (ys ++ [x]) | (Snoc p) = x :: my_reverse ys | p ``` The `| p` on the right hand side means that the `with` block function will be called directly, so the recursive structure of `SnocList` can direct the recursion structure of `my_reverse`. * Added `%fragile` directive, which gives a warning and a message when a fragile name is referenced. For use in detailing fragile APIs. * The totality checker now looks under `case` blocks, rather than treating them as mutually defined functions with their top level function, meaning that it can spot more total functions. * The totality checker now looks under `if...then...else` blocks when checking for productivity. * The `%assert_total` directive is now deprecated. Instead, you can use one of the functions `assert_total`, `assert_smaller` or `assert_unreachable` to describe more precisely where a totality assertion is needed. * `Control.WellFounded` module removed, and added to the Prelude as `Prelude.WellFounded`. * Added `Data.List.Views` with views on `List` and their covering functions. * Added `Data.Nat.Views` with views on `Nat` and their covering functions. * Added `Data.Primitives.Views` with views on various primitive types and their covering functions. * Added `System.Concurrency.Sessions` for simple management of conversations between processes * Taking cues from cabal, the `iPKG` format has been extended to include more package metadata information. The following fields have been added: + `brief`: Brief description of the package. + `version`: Version string to associate with the package. + `readme`: Location of the README file. + `license`: Description of the licensing information. + `author`: Author information. + `maintainer`: Maintainer information. + `homepage`: Website associated with the package. + `sourcepage`: Location of the DVCS where the source can be found. * The Idris man page is now installed as part of the cabal/stack build process. * Improved startup performance by reducing the processing of an already imported module that has changed accessibility. * A limited set of command line options can be used to override package declared options. Overridable options are currently, logging level and categories, default totality check, warn reach, IBC output folder, and idris path. Note overriding IBC output folder, only affects the installation of Idris packages. * Remove deprecated options `--ideslave` and `--ideslave-socket`. These options were replaced with `--ide-mode` and `--ide-mode-socket` in 0.9.17 * The code generator output type `MavenProject` was specific to the Java codegen and has now been deprecated, together with the corresponding `--mvn` option. * Definitional equality on Double is now bit-pattern identity rather than IEEE's comparison operator. This prevents a bug where programs could distinguish between -0.0 and 0.0, but the type theory could not, leading to a contradiction. The new fine-grained equality prevents this. * Naming conventions for Idris packages in an iPKG file now follow the same rules for executables. Unquoted names must be valid namespaced Idris identifiers e.g. ``package my.first.package``. Quoted package names allow for packages to be given valid file names, for example, ``package "my-first-package"``. * The implicit coercion from String to TTName was removed. * Decidable equality for TTName is available.
PreviousNext