Skip to content

@hdgarrood hdgarrood released this Apr 7, 2019


[purs ide] Treat module declarations like any other (#3541)

This means we can now complete module names with the completion API as well as being able to query for module level documentation and goto-defintion for module names.

The list loadedModules command has also been deprecated, since you can now use the completion command with a filter for modules instead. (@kRITZCREEK)

Truncate types in errors (#3401)

Large types in error messages are now truncated. For example:

module Main where

data Id a = Id a

foo :: Id (Id (Id (Id (Id Int))))
foo = "hi"

now produces

  Could not match type
  with type
    Id (Id (Id (... ...)))

The previous behaviour of printing the types in full may be recovered by passing the --verbose-errors flag to the compiler. (@hdgarrood)

Don't generate unused imports in JavaScript output (#2177)

In both CommonJS compiler output and JavaScript purs bundle output, we no longer emit JS imports for modules whose use sites have all been optimized out. This reduces the number of warnings produced by other JavaScript bundlers or compressors such as "Side effects in initialization of unused variable Control_Category". (@rhendric)

Simplify purs publish resolutions format (#3565)

The format for resolutions files passed via the CLI to purs publish has been simplified. A new-style resolutions file should look something like this:

  "purescript-prelude": {
     "version": "4.0.0",
     "path": "bower_components/purescript-prelude"
  "purescript-lists": {
     "version": "6.0.0",
     "path": "bower_components/purescript-lists"

The version field is used for generating links between packages on Pursuit, and the path field is used to obtain the source files while generating documentation: all files matching the glob "src/**/*.purs" relative to the
path directory will be picked up.

The version field is optional, but omitting it will mean that no links will be generated for any declarations from that package on Pursuit. The "path" field is required.

The old format is still accepted, but it has been deprecated, and purs publish will now produce a warning when consuming it.

This change allows us to work around a bug in Bower which prevented packages with larger dependency trees (such as Halogen) from being uploaded to Pursuit (purescript-contrib/pulp#351). (@hdgarrood)

Improve error messages for cycles in type class declarations (#3223)

A cycle in type class declarations, such as

class C a <= D a
class D a <= C a

now produces a more informative error, which no longer confusingly refers to type synonyms, and which displays all of the classes involved in the cycle. (@Saulukass)

Bug fixes

  • Naming a constructor PS no longer causes JS runtime errors when using purs bundle (#3505, @mhcurylo)
  • purs publish now warns instead of failing if not all dependencies have a resolved version, e.g. if some have been installed via a branch or commit reference instead of a version range (#3061, @hdgarrood)
  • Fix handling of directive prologues like "use strict" in purs bundle (#3581, @rhendric)


Assets 8
You can’t perform that action at this time.