What's new? (Ela Platform 2016.3)
Ela Platform 2016.3 is an iterative release that focuses on Ela standard library. It also comes with
updated versions of Ela and Elide and expands Ela documentation.
Ela compiler has the following changes:
- A bug fixed that could result in an internal compiler error. Ela compiler could crash instead of generating an appropriate error message when analysing pattern matching inside a do-notation with invalid patterns.
Ela library changes
The biggest change in a standard library is an addition of a new
This module implements units of measurement, which are typically used to indicate length,
volume, mass, and so on. Units can be used to operate with compatible units (such as grams or kilograms)
without the need of explicit convertion, which helps prevent programming errors:
g = measure.atom "g"
kg = measure.complex "kg" 1000 g
literal'g = measure.value g
literal'k = measure.value kg
show $ 12.03k + 430g
More details are available in module documentation:
Ela standard library has other changes and additions as well:
- A class
Num is extended with a
~= function which can be described as "almost equal" function. It can be useful when writing generic code that can compare integer and floats. For integers this function is always identical to regular equality function. This function is currently implemented for all Ela numeric types (Int, Integer, Long, Single, Double, Sym and Peano).
- Multiple functions are added to the
string module including but not limited to:
- A new function
quotrem is added to the
- New functions
rndListIO that create an infinite list of random numbers are added to the
Maybe now have an instance of class
Ela Platform 2016.3 comes with a new version of Elide that addresses a bug related to AST view generation
and adds a support for displaying a do-notation inside an AST view.
Besides updates to the library reference this version of Ela Platform comes with notable updates in the
- An article Records is expanded with a new section about pattern matching, a section that describes operations with records and a section that describes relationship between records and tuples.
- An article Tuples is expanded with a new section about pattern matching and with new section about operations with tuples.
- An article Lists is expanded with new sections about pattern matching and operations with lists.
- A new article Arbitrary size integers is added to the language reference.