PureScript v0.9.1 发布了。更新如下:
Breaking Changes
Name resolving
(@garyb)
The way names are resolved has now been updated in a way that may result in some breakages. The short version is: now only names that have been imported into a module can be referenced, and you can only reference things exactly as you imported them.
Some examples:
Partial Constraints
The compiler will now generate an error for a missing Partial
constraints, where it would previously have issued a warning.
Module Restrictions
- Imports must now appear before other declarations in a module.
- A source file must now contain exactly one module.
These restrictions will allow us to improve incremental build times in future, since we will only need to parse a small prefix of each file in order to figure out what needs to be rebuilt. Right now, we need to parse every file fully.
Foreign Function Interface Changes
(@paf31)
Foreign modules are now found by filename rather than by searching for a custom JavaScript comment. The foreign module is found by changing the extension of the corresponding PureScript module from .purs
to .js
.
This change was made to be more consistent with psc-ide
, and also to adopt a simple convention which will port well to other backends.
Operator Aliases
(@garyb)
All operators must be defined as aliases from now on. That is, it is no longer valid to define an operator as a name in local scope (e.g. let (#) x y = x y in ...
). This change makes it possible to generate better JavaScript code for operators, by desugaring them to the functions they alias.
Other
下载地址:
详情:https://github.com/purescript/purescript/releases/tag/v0.9.1