Changelog History
Page 4
-
v0.11.7 Changes
November 15, 2017โจ Enhancements
- โ Add position to type class declaration errors (@b123400)
- โ Add valid location list to orphan instance errors (@i-am-tom)
- Expand error message for UnusableDeclaration (#3088, @i-am-tom)
- Inline
Unsafe.Coerce.unsafeCoerce
(@coot)
๐ Bug Fixes
- Correctly quote uppercased field labels in errors (@Thimoteus)
purs ide
inserts conflicting imports for types (#3131, @nwolverson)- Instantiate abstraction body during inference to fix a type checking bug (@LiamGoodacre)
- ๐ Fix a bug related to the desugaring of nested parentheses (@MonoidMusician)
- ๐ Fix a loop in the kind checker (@paf31)
- ๐ Fix a bug in type operator precedence parsing (@paf31)
- Eliminate some redundant whitespace in the generated JS output (@matthewleon)
- Only add newline before initial group of comment lines during code generation (@brandonhamilton)
- โ Treat kinds as used in import warnings (@nwolverson)
purs ide
- โ Add an "editor mode" (@kRITZCREEK)
When the
editor-mode
flag is specified at startup the server will not start afile watcher process any more. Instead it only reloads after successful rebuild commands. This is a lot less fragile than relying on the file system APIs, but will mean that a manual load needs to be triggered after builds that didn't go throughpurs ide
.purs ide
now groupshiding
imports with implicit ones (@kRITZCREEK)- ๐ Return documentation comments in
purs ide
completions (@nwolverson) - โ Add an
actualFile
parameter to the rebuild command (@kRITZCREEK) - โ Add qualified explicit import (@nwolverson)
- ๐ Fixed case-splitting on local non-exported datatypes (@LightAndLight)
- ๐ Make the
filters
parameter in thetype
command optional (@b123400)
๐
purs docs
- ๐ Embed CSS for HTML docs (@hdgarrood)
- ๐ Fix source links for re-exports (@felixSchl)
- ๐ Use order given in export list in generated docs (@hdgarrood)
- ๐ป Prevent browser from treating the title and source link as one word (@Rufflewind)
- ๐ Fix fragment links to type constructors in HTML (@hdgarrood)
purs repl
- โ Add
:complete
directive topurs repl
to support completion in more editors (@actionshrimp)
Other
- โ Add docs for duplicate labels in record types (@paf31)
- โ Adds a document for the design of
purs ide
. (@kRITZCREEK) - โก๏ธ Update
PROTOCOL.md
docs forpurs ide
(@BjornMelgaard) - โฌ๏ธ Upgrade to GHC version 8.2 (@kRITZCREEK)
- ๐ Allow
blaze-html-0.9
(@felixonmars) - โฌ๏ธ Bump
Glob
dependency (@mjhoy) - โ
Use
Hspec
inTestDocs
(@hdgarrood) - ๐ Fix AppVeyor deployment (#2774) (@hdgarrood)
- Various type safety improvements to the AST (@kRITZCREEK)
- โ Remove some references to old executables (@hdgarrood)
- ๐ Update the installation documentation (@hdgarrood)
- โก๏ธ Update test dependencies (@hdgarrood)
- ๐ Only build
master
and versioned tags in AppVeyor (@hdgarrood)
-
v0.11.6 Changes
July 10, 2017๐ New Features
๐
RowToList
support(@LiamGoodacre)
There is a new type class in
typelevel-prelude
calledRowToList
, which turns a row of types into a type-level list. This allows us to work with closed rows in more ways at the type level. The compiler will now solve these constraints automatically for closed rows of types.โจ Enhancements
- ๐ Allow things to be hidden from Prim (@garyb)
- Re-evaluate REPL globs on
:reload
(@hdgarrood) - ๐ Include comments in child declarations in HTML docs (@hdgarrood)
IDE Enhancements
- Collect data constructors (@kRITZCREEK)
- โ Adds declarations for Prim (@kRITZCREEK)
- Repopulates the rebuild cache when populating volatile state (@kRITZCREEK)
- โ Add declaration type filter (#2924) (@sectore)
- ๐ Improve reexport bundling (@kRITZCREEK)
- Resolve synonyms and kinds (@kRITZCREEK)
๐ Bug Fixes
- Replace synonyms in instance constraints (@LiamGoodacre)
- Encode PSCI's server content as UTF-8 string (@dgendill)
- ๐ Fix child declaration ordering in docs (@hdgarrood)
- ๐ Improve instance ordering in HTML docs (@hdgarrood)
- ๐ Fix links to type operators in HTML docs (@hdgarrood)
Other
- โ Add source span annotations to Declaration (@garyb)
- โ Add source span annotations to DeclarationRef (@garyb)
- โ Remove
purescript.cabal
and add to.gitignore
(@garyb) - ๐ฆ Raise upper bound on
aeson
inpackage.yaml
(@garyb) - ๐ Only build master and semver tags in Travis (@hdgarrood)
-
v0.11.5 Changes
June 05, 2017Compiler
โจ Enhancements
Type signatures in instances
(@cdepillabout)
๐ Type class instances can now include type signatures for class members, as documentation:
data MyType = MyType String instance showMyType :: Show MyType where show :: MyType -> String show (MyType s) = "(MyType " <> show s <> ")"
๐ Bug Fixes
- Encode HTML content as UTF8 when using
purs repl
with--port
(@dgendill) - Disallow some invalid newtype-derived instances (@paf31)
- Disallow
forall
within constraints (#2874, @sectore) - Convert
\r\n
into\n
after reading files (@kRITZCREEK) - ๐ Fix PSCi tests (@kRITZCREEK)
- ๐ Better variable naming hygiene in TCO. (#2868, @houli)
- Simplify TCO generated code (@matthewleon)
- โ Remove newlines from printed custom type errors (@matthewleon)
- ๐ Fix some
purs
command line help message issues (@Cmdv) - ๐จ Apply relative paths during pretty printing of errors (@kRITZCREEK)
- ๐ Desugar
let
properly when generating docs (@paf31) - ๐ Fix kind signature for
RowCons
type class in documentation (@tslawler) - ๐ Fix an issue with error messages for
TypesDoNotUnify
involving duplicate labels (#2820, @thoradam)
Other
- โก๏ธ Update
package.yaml
(@sol) - โ
Parse support modules from actual test support
purs
(@noraesae) - โก๏ธ Update
build
command to run tests (@sectore) - โฌ๏ธ Bumps lower bound for
directory
(@kRITZCREEK) - ๐ฆ Switch
core-tests
topsc-package
(#2830, @matthewleon) - Small fix for the copyright dates (@seanwestfall)
- โก๏ธ Update
CONTRIBUTING.md
for "new contributor" label (@thoradam)
purs ide
๐ Features
- โ Add a new namespace filter (#2792, @sectore, @stefanholzmueller)
A new filter, which restricts query results to the value, type and/or kind namespaces, which allows improvements to the completion and import commands.
- โ Adds a command to add qualified imports (@kRITZCREEK)
๐ This empowers editor plugins to add imports for qualified identifiers, for example in the Emacs plugin.
- ๐ New import formatting (@kRITZCREEK)
- Group reexports in completions (@kRITZCREEK)
Editors can now choose to let
purs ide
group reexports for the same value, to reduce noise when completing values likeData.Functor.map
which are reexported a lot and show up that many times in the completion list.โจ Enhancements
- ๐ Parse modules in parallel (@kRITZCREEK)
This can yield significant speedups in the initial load times. For example a full load of
slamdata/slamdata
improves from 11 to 6 seconds- Introduce completion options (@kRITZCREEK)
๐ Bug Fixes
- Resolve synonyms and kinds (@kRITZCREEK)
- ๐ Work around laziness when measuring command performance (@kRITZCREEK)
- Simplify state type (@kRITZCREEK)
- Extract namespace ADT (@kRITZCREEK)
- ๐ Decodes source files as UTF8 when parsing out the imports (@kRITZCREEK)
- ๐ Fix the import command for kinds (@kRITZCREEK)
- Reads files in text mode for adding imports (@kRITZCREEK)
- โ Add
-h
/--help
toide
subcommands (@simonyangme)
- Encode HTML content as UTF8 when using
-
v0.11.4 Changes
April 17, 2017โจ Enhancements
- 0๏ธโฃ
purs
executable will now display help text by default (@matthewleon) - โ Adding
-h
/--help
toide
subcommands (@simonyangme) - Some simplifications to the tail call optimization (@matthewleon)
๐ Bug Fixes
- โ Remove newline from printed custom type errors (@matthewleon)
- ๐ Fix pretty printing of rows in error messages (#2820, @thoradam)
- ๐ Allow user to propagate Warn constraints (@paf31)
- ๐ Match type level strings in docs renderer (#2772, @hdgarrood)
- ๐ Fix encoding bug in
purs ide
list import command (@kRITZCREEK) purs ide
now reads files in text mode for adding imports (@kRITZCREEK)
Other
- โฌ๏ธ Bump
aeson
lower bound to 1.0 (@hdgarrood) - โ Add a bunch of NFData instances (@hdgarrood)
- Turn off coveralls upload for now (@paf31)
- ๐
purs
command line help message fixes (@Cmdv) - ๐ฆ Switch core-tests to
psc-package
(#2830, @matthewleon) - โก๏ธ Update
CONTRIBUTING.md
notes (@thoradam)
- 0๏ธโฃ
-
v0.11.3 Changes
April 08, 2017๐ Bug Fixes
- ๐ Fix the exhaustivity check for pattern guards (@alexbiehl)
Other
- ๐ Require
directory >=1.2.3.0
for XDG support (@bergmark) - ๐จ @noraesae has refactored some PSCi code to improve the test suite.
- ๐ Use
hpack
to generate the.cabal
file (@kRITZCREEK) - ๐ Use XDG Base Directory Specification for
psci_history
(@legrostdg)
-
v0.11.2 Changes
April 02, 2017๐ New Features
Polymorphic Labels
(@paf31)
A new
RowCons
constraint has been added toPrim
.RowCons
is a 4-way relation between- Symbols
- Types
- Input rows
- Output rows
which appends a new label (1) with the specified type (2) onto the front of the input row (3), to generate a new output row (4). The constraint can also be run backwards to subtract a label from an output row.
This allows us to quantify types over labels appearing at the front of a row type, by quantifying over the corresponding symbol/type pair. This gives us a limited form of polymorphic labels which enables things like writing a single lens for any record accessor.
โจ Enhancements
- ๐ Use XDG Base Directory Specification for the location of the
psci_history
file (@legrostdg) - Collect more information for classes and synonyms in
purs ide
(@kRITZCREEK)
๐ Bug Fixes
- Desugar pattern guards after type checking, to avoid an issue with the exhaustivity checker (@alexbiehl)
Other
- โ A new PSCi evaluation test suite was added (@noraesae)
- ๐ Use
hpack
to generate the.cabal
file (@kRITZCREEK)
-
v0.11.1 Changes
March 28, 2017๐ Bug Fixes
Compiler
- Enable TCO for variable intros and assignments #2779 (@paf31)
- ๐ Fixed special case in codegen for guards #2787 (@paf31)
๐ Docs generation
- ๐ Wrap decl title in span for better double-click selection #2786 (@rightfold)
- List instance info under correct sections, fix #2780 (@paf31)
-
v0.11.0 Changes
March 25, 2017๐ This release includes several breaking changes, in preparation for the 1.0 release, as well as many enhancements and bug fixes.
๐ Most users will probably want to wait until all aspects of the release have been finalized. Progress on libraries and tools is being tracked here.
๐ Many thanks to the contributors who helped with this release!
๐ฅ Breaking Changes
(@garyb, @paf31)
=>
now acts like a binary type operatorIt was previously possible to specify many constraints in the same context by separating them with commas inside parentheses on the left of the
=>
:runFreeT :: โ m f. (Functor f, Monad m) => ...
This is no longer allowed. Instead,
=>
now acts like a binary operator, with a constraint on the left and a type on the right. Multiple constraints must be introduced using currying, as with regular function arguments:runFreeT :: โ m f. Functor f => Monad m => ...
This is in preparation for adding constraint kinds, at which point
=>
will become an actual binary type operator, defined inPrim
.*
and!
kinds have been removedThe kind symbols
*
(for the kind of types) and!
(for the kind of effects) have been โ removed from the parser. Instead of*
, useType
, which is defined inPrim
. Instead of!
, useEffect
, which can now be imported fromControl.Monad.Eff
.๐ The
#
symbol, which is used to construct a row kind, is still supported. We cannot move this kind intoPrim
(because it is polykinded, and we do not support kind polymorphism).One single consolidated executable
The various
psc-*
executables have been replaced with a single executable calledpurs
. The various subcommands are documented on the--help
page:bundle Bundle compiled PureScript modules for the browser compile Compile PureScript source files docs Generate Markdown documentation from PureScript source files hierarchy Generate a GraphViz directed graph of PureScript type classes ide Start or query an IDE server process publish Generates documentation packages for upload to Pursuit repl Enter the interactive mode (PSCi)
Wrapper scripts will be provided in the binary distribution.
๐ฆ
psc-package
was removed๐ฆ
psc-package
has been removed from the main compiler distribution. It will still ๐ฆ be maintained along with the package sets repo, but will not be bundled with the compiler.๐ A binary distribution which is compatible with this release is available.
๐ฉ Implicitly discarded values in
do
blocks now raise errorsCode which discards the result of a computation in a
do
block:duplicate :: Array a -> Array a duplicate xs = do x <- xs [true, false] -- the result here is discarded pure x
will now raise an error. The compiler allows values of certain types to be discarded, based on the
Discard
class inControl.Bind
. The only type which can be discarded is ๐Unit
, but the feature was implemented using a type class to enable support for alternative preludes.No more dependency on the Bower executable
๐ฆ In addition to removing
psc-package
from the compiler distribution, we have also โ removed any explicit dependency on the Bower executable. The compiler will not assume ๐ฆ use of any particular package manager, but will aim to provide generic support for ๐ฆ package managers generally, via command line options and hooks.purs publish
will continue to use the Bower JSON formats. Thebower.json
format is now referred to as the "manifest file", while the output ofbower list --json
, which is used bypurs publish
internally, is referred to as the "resolutions file".โจ Enhancements
Pattern Guards
(@alexbiehl)
In addition to regular guards:
foo x | condition x = ...
the compiler now supports pattern guards, which let the user simultaneously โ test a value against a pattern, and bind names to values.
For example, we can apply a function
fn
to an argumentx
, succeeding only iffn
returnsJust y
for somey
, bindingy
at the same time:bar x | Just y <- fn x = ... -- x and y are both in scope here
Pattern guards can be very useful for expressing certain types of control flow when using algebraic data types.
๐ HTML Documentation
(@hdgarrood)
๐ The
--format html
option has been added topurs docs
. The HTML format uses ๐ the Pursuit template, and is very useful for rendering documentation for offline ๐ use.๐ Here is an example of the generated HTML.
Duplicate Labels
(@paf31)
๐ Row types now support duplicate labels, which can be useful when using the
Eff
monad. For example, we could not previously use thecatchException
function if the resulting action also required theEXCEPTION
effect, since otherwise the type of the inner action would contain a duplicate label.Rows are now unordered collections (of labels and types) with duplicates. However, the collection of types for a specific label within a row is ordered. Conceptually, a row can be thought of as a type-level
Map Label (NonEmptyList Type)
.A type constructor (such as
Record
) which takes a row of types as an argument should define what its meaning is on each row. The meaning of a value of typeRecord r
is a JavaScript object where the type of the value associated with each label is given by the head element of the non-empty list of types for that label.Row Constraints
(@doolse, @paf31)
A new constraint called
Union
has been added toPrim
.Union
is a three-way relation between rows of types, and the compiler will solve it automatically when it is possible to do so.Union
is a left-biased union of rows which takes into account duplicate labels. If the same label appears in rowsl
andr
, andUnion l r u
holds, then the label will appear twice inu
.๐
Union
makes it possible to give a type to the function which merges two records:merge :: forall r1 r2 r3. Union r1 r2 r3 => Record r1 -> Record r2 -> Record r3
๐ Note that this is a left-biased merge - if the two input record contain a common label, the type of the label in the result will be taken from the left input.
Patterns in
let
expressions(@noraesae)
Let expressions and
where
clauses can now use binders on the left hand side of a declaration:map f xs = let { head, tail } = uncons xs in [f head] <> map f tail
Unlike in Haskell, declarations with these patterns cannot appear in dependency cycles, and bound names can only be used in declarations after the one in which they are brought into scope.
Find record accessors in Type Directed Search
(@kRITZCREEK)
Type-directed search will now include results for record accessors. This can be very useful when working with extensible records with a type-driven programming workflow.
Other Enhancements
- โ Add basic usability check and error for ambiguously-typed type class members (@LiamGoodacre)
- ๐ Improved skolem escape check (@paf31)
- ๐ Fix links to declarations in
Prim
(@hdgarrood) - Emit
_
instead offalse
case forif then else
to improve optimizations (@rightfold) - โ Add
InvalidDerivedInstance
error to improve errors for derived instances (@paf31) - ๐ Make generated code for superclass instances less ugly (@paf31)
- ๐ Support polymorphic types in typed binders (@paf31)
- ๐ Make file paths relative in error messages (@paf31)
- ๐ Improve errors from module sorter (@paf31)
- ๐ Improve error for unused type variables (@paf31)
- Include source span in externs file for error reporting purposes (@paf31)
- ๐ Improve instance arity errors (@mrkgnao)
purs ide
๐ Features
๐ Improve import parsing
- ๐
purs ide
now uses a new import parser, which allowspurs ide
to handle any import section that the compiler would accept correctly. (@kRITZCREEK) - ๐ Parse imports with hanging right paren (@matthewleon)
- ๐ Reuses lenient import parsing for the list import command (@kRITZCREEK)
Don't create the output/ directory if it can't be found
(@kRITZCREEK)
purs ide
will now no longer leave empty output/ directories behind when it is started in a directory that is not a PureScript project.Collect type class instances
(@kRITZCREEK)
purs ide
collects instances and stores them with their respective type class. There's no way to retrieve these yet, but we will extend the protocol soon.๐ Bug Fixes
- No longer strip trailing dots for Pursuit queries (@kRITZCREEK)
- ๐ Fix #2537 (
psc-ide
shouldn't crash when building a non-existent file) (@kRITZCREEK) - ๐ Fix #2504 (fix a crash related to prematurely closed handles) (@kRITZCREEK)
- Speed up rebuilding by x2, by rebuilding with open exports asynchronously (@kRITZCREEK)
- Return operators in
purs ide
imports list (@nwolverson) - Also detect location information for operators (@kRITZCREEK)
Cleanup
- โ Removes unnecessary clause in import pretty printing (@kRITZCREEK)
- โ Removes the deprecated
--debug
option (@kRITZCREEK) - โ Restructure testing to avoid running the server (@kRITZCREEK)
purs repl
- โ Add back
.purs-repl
file support (@paf31) - PSCi command changes, add
:clear
(@noraesae) - Declarations no longer require
let
(@noraesae) - ๐ Improve CLI error and startup messages (@noraesae)
๐ Bug Fixes
- ๐ Changes to help the tail call optimization fire more consistently (@paf31)
- ๐ Fix
everythingWithScope
traversal bug #2718 (@paf31) - Errors for open rows in derived instances (@paf31)
- Instantiate types in record literals as necessary (@paf31)
- ๐ Fix
Generic
deriving with synonyms (@paf31) - Rebuild modules if necessary when using
--dump-corefn
(@paf31) - Ensure solved type classes are imported (@LiamGoodacre)
- ๐ Allow for older Git versions in
purs publish
(@mcoffin) - ๐ Fix
purs publish --dry-run
(@hdgarrood) - Exported data constructors can now contain quotes (@LiamGoodacre)
๐ Documentation
- Capitalise *script into *Script (@noraesae)
๐ Performance
- โก๏ธ Optimize
keepImp
(@paf31) - Replace
nub
withordNub
(@matthewleon) - Combine inlining optimizations into a single pass (@paf31)
Other
- โ Add
HasCallStack
to internalError (@alexbiehl) - ๐ Use Stackage LTS 8.0 (@noraesae)
- โ Address Travis timeout issues (@hdgarrood)
- ๐ Improve module structure in PSCi test suite (@noraesae)
- ๐ Fix the PSCi script (@mrkgnao)
- ๐ Include Git commit information in non-release builds (@hdgarrood)
- โ Add test case for #2756 (@int-index)
- Some code cleanup in the module imports phase (@matthewleon)
-
v0.10.7 Changes
February 11, 2017๐ This release contains a bug fix for a bug in
psc-bundle
which was introduced in 0.10.6. -
v0.10.6 Changes
February 07, 2017โจ Enhancements
- โ Add support for user defined warnings via the
Warn
type class (@LiamGoodacre, blog post) - ๐ Support nested record update (@LiamGoodacre, blog post)
- Inline
unsafePartial
(@paf31) - Fail early when
bind
is brought into scope insidedo
(@paf31)
๐ Bug Fixes
- Disallow polymorphic types in binders, preventing a crash (@paf31)
- Rebuild modules if necessary when using
--dump-corefn
(@paf31) TypeLevelString
/TypeConcat
should not be quoted (@michaelficarra)- Generate JS static member accesses whenever possible (@michaelficarra)
- Require dependencies to exist during sorting phase (@paf31)
- ๐ Fix inlining for
negateInt
(@paf31) - ๐ Fix object key quoting (@hdgarrood)
- Don't expand synonyms until after kind checking (@paf31)
- ๐ Fix 'Unknown type index' on mismatch between class and instance argument counts (@LiamGoodacre)
- ๐ Style comment types differently (@matthewleon)
psc-ide
- Return operators in
psc-ide
imports list (@nwolverson) - Collect type class instances (@kRITZCREEK)
- ๐ Log failing to accept or parse an incoming command (@kRITZCREEK)
- ๐ Fix #2537 (@kRITZCREEK)
- ๐ Fix #2504 (@kRITZCREEK)
- Also detect location information for operators (@kRITZCREEK)
- Speeds up rebuilding by x2 (@kRITZCREEK)
- โ Restructure testing to avoid running the server (@kRITZCREEK)
psc-publish
- โ Add modules for rendering HTML documentation (@hdgarrood)
- ๐ Fix
psc-publish --dry-run
(@hdgarrood) - ๐ Fix failure to parse git tag date in
psc-publish
(@hdgarrood) - โ Add git tag time to
psc-publish
JSON (@hdgarrood) - โ Remove
Docs.Bookmarks
(@hdgarrood)
๐ Performance
- Combine inlining optimizations into a single pass (@paf31)
- ๐ Use
Map.foldlWithKey'
instead offoldl
(@hdgarrood) - ๐ Minor memory usage improvements in
Language.PureScript.Docs
(@hdgarrood)
Other
- Generate data constructors without IIFEs (@hdgarrood)
- โ Add stack-ghc-8.0.2.yaml (@noraesae)
- โ Add
HasCallStack
tointernalError
(@alexbiehl) - โก๏ธ Update
psc-package
to use turtle 1.3 (@taktoa) - โ Remove
JSAccessor
; replace withJSIndexer
(@michaelficarra) - Store more information in
RenderedCode
(@hdgarrood)
- โ Add support for user defined warnings via the