purescript

A strongly-typed language that compiles to JavaScript

OTHER License

Downloads
10.2K
Stars
8.4K
Committers
200

Bot releases are hidden (Show)

purescript - v0.8.0 - "TIMESLIDES"

Published by paf31 over 8 years ago

A massive thanks to everyone involved in this release!

Breaking Changes

None, but there are lots of new warnings related to upcoming breaking changes in 0.9:

  • Operators as aliases will become mandatory, and regular operators (as functions) will now generate warnings.
  • Non-exhaustive functions will get a Partial constraint in 0.9, so the exhaustivity checker will now attempt to generate warnings by looking for Partial constraints in scope.
  • The qualified import syntax has been deprecated.
  • Class imports will use the new class syntax in 0.9 and the alternative syntax is deprecated.

Enhancements

  • Add native Partial constraint (@garyb)
  • Reduce backtracking in parser to hopefully improve quality of parsing error messages (@paf31)
  • Drop requirement to parenthesize single constraints in instance contexts (@garyb)
  • Case expressions can now match multiple values (@natefaubion)
  • Add operator aliases (@garyb)
  • Show identifiers correctly in ctags (@nwolverson)
  • Fix #1523, add --json-errors flag for editor integrations (@paf31)
  • Error and warning corrections are now available to editors via --json-errors (@nwolverson)
  • Check integer values are within range in codegen (@garyb)
  • Support for unicode operators (@paf31)
  • The parser now supports unicode symbols for forall and function arrows (@DavidLindbom)
  • Module Imports
    • Use class keyword for class references in imports (@garyb)
    • Type imports no longer require () (@garyb)
    • Allow import hiding with qualified imports (@garyb)
    • Naming conflicts are now resolved at the use site (@garyb)
  • Error Messages
    • Fix #1662, display extra type info in instance errors (@paf31)
    • Add information about skolem constants to type errors (@paf31)
    • Sort rows in unification errors (@paf31)
  • Warnings
    • Warn on unspecified imports (@garyb)
    • Warn when import X hiding (..) imports nothing (@garyb)
    • Warn on duplicate imports and exports (@garyb)
    • Warn about unused class imports (@garyb)

Bug Fixes

  • Renamer updates, fixes naming bug in some unlikely situations (@garyb)
  • Fix #1645, implement new indentation rules for types to avoid very wide errors (@paf31)
  • Fix "resource exhausted" issue on MacOS (@mgmeier)
  • Fix #1664, check kind before expanding wildcards. (@paf31)
  • Fix up shadowed module names in JS codegen (@garyb)
  • Fix #1185, fix #1369, add everythingWithScope traversal to correct some scoping issues. (@paf31)
  • Fix two cases where errors were missing context (@garyb)
  • Fix #1636, instantiate polytypes fully, even under constraints. (@paf31)
  • Fix missing data constructors in re-exports (@garyb)
  • Fix codegen error with instance for re-exported class (@garyb)
  • Fix #1479, encode .js files as UTF8. (@paf31)
  • Fix a bug related to redundancy checking in cases (#1853, @nicodelpiano)
  • Fix a TCO/composition inlining bug (@garyb, @hdgarrood)
  • Fix renaming for nested constructor binders (#1839, @sharkdp)
  • Fix generic deriving bug with >1 type argument (@hdgarrood)
  • Fix generate fresh binder names unless all names in case are equal (#1825, @paf31)
  • Fix external require expressions when minifying (#1794, @paf31)
  • Rename foreign argument to fix compiling issue (@anttih)
  • Allow use of bottom integer (@garyb)

Other

  • Fix #1700, remove warnings for syntactic features removed in 0.7.0 (@paf31)
  • Fix psc-publish test (@passy)
  • Relax rules for docs comments (#1820, @hdgarrood)
  • Qualified name lookup is now supported in PSCi (#974, @soupi)
  • https://github.com and [email protected] URLs are now allowed by psc-publish (@passy, @codedmart)
  • Docs are now generated for module re-exports (@hdgarrood)
  • Use friendly module name in psc-docs error (@nwolverson)
  • Distinguish between the different ProperNames (@garyb)
  • Warn about unspecified constructors in type imports (@garyb)
  • Fix warning about values missing from virtual modules (@garyb)
purescript - v0.8.0-RC1

Published by paf31 almost 9 years ago

purescript - v0.7.6.1

Published by paf31 almost 9 years ago

Fixes a bug in generic deriving.

See the release notes for 0.7.6.

purescript - v0.7.6

Published by paf31 almost 9 years ago

Thanks once again to everyone involved in this release!

This release includes some updates to generic deriving which require updating to the latest version of purescript-generics.

Features

  • Field puns, fix #921 (@balajirrao)

    It is now possble to construct objects by using values in scope with the same name as the field labels. For example, the expression { foo, bar } is equivalent to { foo: foo, bar: bar }. Patterns desugar in the same way.

Enhancements

  • Modules are now parsed in parallel (@paf31)
  • Use Types.Proxy.Proxy instead of Data.Generic.Proxy. This fixes #1573 (@tfausak)
  • Update generic deriving for latest purescript-generics changes (@paf31)
  • New import warnings - unused data constructors, unused imports (@nwolverson)
  • psc-publish: only warn on dirty working tree on dry runs (@hdgarrood)
  • Add more information to psci :browse command (@soupi)
  • Add support for --require-path option to psc-bundle (@natefaubion)
  • Improved error reporting in psc-publish (@hdgarrood)
  • Reduce noise in instance declarations in documentation (@hdgarrood)

Bug Fixes

  • New approach to unification, fixing some loops in the type checker (@paf31)
  • Fix #1632, instantiate type variables in anyProxy calls in generic instances (@paf31)
  • Fix warnings for unqualified implicit imports (@nwolverson)
  • Fix #1596, don't show type checker warnings in the event of an error (@paf31)
  • Fix #1602, improvements around code generation of string literals (@michaelficarra)
  • Fix #1090, allow accessors in operator sections (@paf31)
  • Fix #1590, limit depth of pretty-printed expressions (@paf31)
  • Fix #1591, use the 'negate' in scope (@paf31)
  • Fix #1335, track scoped type variables when skolemizing (@paf31)
  • Fix #1175, check types inside where clauses inside instances (@paf31)
  • Some refactoring (@phadej)
  • Fixed some error messages (@zudov)

Deployment

  • Use base-compat to reduce the need for CPP (@phadej)
  • Write license-generator in Haskell (@phadej)
  • Add GHC 7.10.3 to CI build matrix (@phadej)
purescript - v0.7.5.3

Published by paf31 almost 9 years ago

Bug Fixes

  • #1072, #1130, #1578, #1577, #1582
purescript - v0.7.5.2

Published by paf31 almost 9 years ago

Fixes a build issue with GHC versions < 7.10. Functionally equivalent to v0.7.5.1.

purescript - v0.7.5.1

Published by paf31 almost 9 years ago

Bug Fixes

  • Fix #1169, #1315, #1534, #1543, #1548, #1551, #1557, #1570
  • Fix memory leak caused by WriterT (#1297) by @paf31
  • Display hints after main error (#1563) by @paf31
  • Friendlier errors by @paf31
  • Documentation fixes by @nwolverson
  • Haddock fixes by @trofi
purescript - v0.7.5

Published by paf31 almost 9 years ago

A big thank you to everyone who was involved in this release, from filing issues, through fixing bugs to testing patches.

The main focus areas for this release, as part of the 0.8 milestone, were error messages and performance.

Breaking Changes

None!

Enhancements

  • Pretty printing of types and expressions in errors was improved (@paf31)

  • Externs files are now saved as JSON (@paf31)

  • Support for parallel builds has been added (@paf31)
    Builds will now use multiple cores by default, but the number of capabilities can be modified by passing the -N option to the GHC runtime:

    psc <input files> +RTS -N8
    
  • Binders can now be given type annotations (@5outh)

    For example:

    example = do
      n :: Int <- get
      put (n + 1)
    

    This can be useful when disambiguating types.

  • There is a new warning for missing type signatures on top-level declarations (@paf31)

  • There are new warnings for shadowed and unused type variables (@garyb)

  • Contextual information in warnings was improved (@garyb)

  • The qualified keyword is now optional when importing modules qualified (@michaelficarra)

  • @zudov changed the behavior of PSCi on CTRL+C/D to match GHCi and other REPLs.

  • A bug in row unification was fixed (#1310, @paf31)

  • Constrained types can now be defined without a forall keyword. This is useful in some nullary type class and rank-N scenarios. (@paf31)

Bug Fixes

  • @garyb added some additional checks for transitive module exports.
  • Type synonyms are now expanded more eagerly to avoid some error cases in the type checker (@paf31)
  • Better support for multi-byte UTF-8 characters (@senju)
  • A check has been added to the exhaustivity checker to avoid exponential blowup (@paf31)
  • Empty case statements are no longer syntactically valid (@zudov)

Other

  • @aspidites fixed all compiler warnings in the core libraries.
  • @zudov and @phadej have made improvements to the Stack distribution of the compiler, and the Stackage builds.
  • @garyb has added a warning for operators in type classes, since they will be disallowed before 0.8.
purescript - v0.7.4.1

Published by garyb about 9 years ago

This patch release fixes two bugs related to the new instance resolution algorithm and overlapping instances:

  • psci would not work due to overlaps in the PSCI.Support module
  • free would not build due to its dependency on inject

The solution for now is to make overlapping instances into a warning (instead of an error) at the site of their use.

Later we might revisit this decision and allow the user to express classes like Inject which are necessarily overlapping.

purescript - v0.7.4

Published by paf31 about 9 years ago

Breaking Changes

  • The type class instance search algorithm has changed. The search will now eagerly match an instance for each subgoal based on the instance head, or fail. This makes certain instances in previous versions of purescript-transformers invalid, so users of this release should upgrade to the latest transformers.
  • A module must be imported to be re-exported.

Enhancements

  • RedefinedModule errors now include position info #1024 (@garyb)
  • Multiple imports of the same module are now resolved correctly, allowing for combinations of qualified and unqualified importing #817 #1112 (@garyb)
  • Errors for unresolvable imports and exports have been clarified #1232 (@garyb)
  • A warning is emitted when importing Type(..) when Type is a synonym or has no constructors. #1391 (@garyb)
  • Superclass constraints can now be relied upon when resolving instances #421 (@paf31)
  • A serious performance regression was partially addressed, memory usage should now be drastically reduced #1297 (@garyb)
  • Module re-export handling has been much improved. If a module is partially imported, only the specifically imported members are re-exported. Qualified modules can also be re-exported. #291 #1244 (@garyb)
  • Parser error messages are now formatted in a manner more consistent with other errors #1098 (@epost)
  • Using -ffi to specify JavaScript FFI files is now optional, files with a .js extension will be detected as FFI files automatically when encountered. #1268 (@mjgpy3)

Bug fixes

  • Fixed an error when attempting to derive for Void #1380 (@nicodelpiano)
  • "The impossible happened in desugarDo" should no longer occur #386 (@paf31)

Other

@zudov, @phadej and @erdeszt made more updates and improvements to the CI build.

purescript - v0.7.3

Published by paf31 about 9 years ago

Major Features

  • @gbaz has implemented generic deriving. This allows instances for the Generic class in the purescript-generics package to be derived by the compiler.

    A Generic instance can be derived as follows:

    data Example = Foo String | Bar Int | Baz Boolean
    
    derive instance genericExample :: Generic Example
    

    purescript-generics provides examples of usage, such as gShow, gEq and gCompare, for printing, equality tests and comparison respectively.

    See #1138.

  • @garyb has implemented a test for orphan instances which will now cause the build to fail with an error. See #1247

Enhancements

  • @mjgpy3 has added a warning when an input glob does not match any files.

Bug Fixes

  • The psc: <<loop>> has been fixed. This was due to a bug in the error pretty printer. (@paf31)
  • An issue with unicode characters in string literals was fixed by @michaelficarra.
  • Compiler errors are now pretty printed in psc-publish (@paf31)
  • Modules are no longer linted if they are not being rebuilt (@paf31)
  • FFI bindings are now reloaded when changed, in PSCi (@paf31)

Other

  • @phadej and @zudov have improved our CI process, so that PureScript now compiles against three versions of GHC and two LTS Stackage releases, as well as the nightly stackage releases.
  • @phadej and @lukerandall have worked on supporting PureScript in Stackage.
purescript - v0.7.2.1

Published by paf31 about 9 years ago

Functionally equivalent to v0.7.2. This release fixes a version incompatibility with Stackage.

purescript - v0.7.2

Published by garyb about 9 years ago

Bug fixes

  • Fixed haddock for the Language.PureScript.Bundle module #1262 (@wuzzeb)
  • Some erroneous error positions were fixed for kind and missing instance errors #1086 (@garyb)
  • The number of warnings printed for exhaustivity checks was limited to 5 #1281 (@nicodelpiano)
  • Home directory is checked for .psci file after the current working directory #883 (@mjgpy3)
  • Line numbers now show for shadowed name warnings #1165 (@nicodelpiano)
  • Cabal file was fixed for Nix packaging #1302 (@MasseGuillaume)
  • Kind query for types defined in psci now works #1235 (@mjgpy3)
  • Boolean operations are now being inlined again #1312 (@garyb)
  • Int operations are now being inlined again #1330 (@garyb)
  • "Writing..." and "Compiling..." messages are no-longer printed in psci #1276 (@paf31)

Enhancements

  • Exhaustivity checker was extended to report errors about redundant cases #1289 (@nicodelpiano)
  • Improved triggering of suggestion for errors about using (<<<) instead of (.) #1284 (@mjgpy3)
  • Only show the module name rather than the filename for pattern errors #1296 (@nicodelpiano)
  • Error reporting in psc-bundle was improved #1307 (@hdgarrood)
  • psc-publish code is now part of the library module #1304 (@hdgarrood)
  • psc-publish now has --version and --help options #1300 (@garyb)
  • psc-publish now has a --dry-run option for checking whether the module can be published #1308 (@hdgarrood)
  • psc-publish now requires a clean working tree #1306 (@hdgarrood)
  • psc-publish can now find bower on Windows machines #1317 (@hdgarrood)
  • psc-publish now uses OS-specific path delimiters to fix another bug on Windows #1326 (@hdgarrood)
  • Error list heading was made emacs-friendly #1327 (@epost)
purescript - v0.7.1

Published by paf31 over 9 years ago

Minor fixes after 0.7.0:

  • @hdgarrood has worked on improvements to psc-publish to support the new Pursuit website.
  • @mjgpy3 has improved warning messages
  • @wuzzeb has improved the pretty printers
  • @hdgarrood has added CI builds for GHC 7.10 and 7.6

Enhancements

  • @nicodelpiano has added exhaustivity checking as a new warning type. Incomplete pattern matches will now generate warnings like this:

    Warning in module Data.Either.Unsafe:
      Warning in value declaration fromRight:
      Warning at src/Data/Either/Unsafe.purs line 14, column 1 - line 15, column 1:
    Pattern could not be determined to cover all cases.
        The definition has the following uncovered cases:
          (Data.Either.Left _)
      See https://github.com/purescript/purescript/wiki/Error-Code-NotExhaustivePattern for more information, or to contribute content related to this error.
    
purescript - v0.7.0 - "MELTDOWN"

Published by paf31 over 9 years ago

Introduction

This release ("MELTDOWN") aims to handle as many planned breaking changes as possible, to ease the upgrade path before 1.0. It is necessary to upgrade almost all PureScript code to compile with this release.

The latest versions of the core libraries have all been updated to compile with this release. Older versions of the core libraries will not work with this release, and the latest versions of libraries will not build with older compiler releases.

Detailed instructions for those who need to migrate their code can be found on the wiki.

As usual, many thanks go to all of the contributors who helped with this release!

Breaking changes

  • The psc executable has been replaced with psc-make, which has been renamed to psc (in an effort to standardize on CommonJS module output). Features which were previously only available in old psc (dead code elimination, bundling code for the browser) are now handled by the new executable psc-bundle, which works with the output of the new psc (for faster, incremental builds).
  • There are now Int and Number literals. To disambiguate the two, integer Number values must now be written with a decimal place (3.0 rather than 3).
  • The Prelude module is no longer imported automatically, and must be imported the same way as any other module.
  • No modules are included with the compiler now, they have been broken out into their own libraries:
  • Debug.Trace has been renamed to Control.Monad.Eff.Console, and trace has been renamed to log.
  • [] syntax for array types has been removed. It is still possible to use [] array literals however.
    • [] should now be written as Array, and [a] as Array a.
  • Cons patterns for arrays have been removed.
  • Declaring operators in classes will now produce a warning. Changes will be coming to operators in PureScript 0.8, and moving to named members in classes with operators as aliases (e.g. (<$>) = map) should make the transition easier in the future.
  • JavaScript for the FFI can no longer be provided inline.
    • Values must instead be provided in a separate .js file, and passed to the compiler with the -ffi flag.
    • Values should be provided in the form exports.foo = ..., similar to a CommonJS module
    • The file should have a comment // module X.Y.Z where X.Y.Z is the name of the module the JS values are for.
    • See here for an example

Enhancements

  • Module exports (@andyarvanitis). Currently, only full module exports are supported, but imported modules can be re-exported using the following syntax:
    purescript module M1 (module M2) where import M2
  • Documentation improvements (@hdgarrood):
    • psc-docs can now generate multiple output files, allowing documentation to be collected into functional groups.
    • A new tool psc-publish has been added, which generates module documentation in a JSON format required by Pursuit 2 (coming soon)
  • @hdgarrood has worked on improving the quality of code completion inside psci, and generally tidying up and refactoring that code.
  • @puffnfresh has worked on dramatically increasing the performance of incremental builds, with improvements up to 10x compared to the previous release.
  • The new --require-path option allows the syntax of module imports in generated CommonJS modules to be customized (@garyb).
  • @etrepum has added support for building with Stack.
  • PSCi now supports computations in the Eff monad. (@paf31)
  • The compiler now emits warnings in the following cases:
    • Operator name used in type class definition (@garyb)
    • Type wildcard used (@nicodelpiano)
    • Shadowed variable name (@paf31)
  • @balajirrao has improved the appearance of unknown and rigid types appearing in error messages.
  • @puffnfresh has added position information to pattern match errors.
  • @puffnfresh has added some new optimizations (inlining <<< and $)

Bug Fixes

  • psc, psc-docs and psc-bundle now support file globs as command-line arguments, fixing a bug related to the command length on Windows machines (@paf31)
  • @wuzzeb has fixed some issues in the pretty printer.
  • @mjgpy3 has improved error messages related to incorrect pattern matches on data constructors.

Tools

  • Pulp has been updated:
    • The new psc and psc-bundle binaries are supported
    • FFI modules are now identified and compiled based on a convention
    • pulp docs now generates individual Markdown files for each source module
  • gulp-purescript has been updated:
    • The new psc and psc-bundle binaries are supported
    • FFI modules are now supported

Libraries

  • The following libraries have been moved into the core library set:
    • purescript-lists - Strict and lazy linked list data structures
    • purescript-assert - Low level assertion library for tests
    • purescript-parallel - An applicative functor for parallel composition of asynchronous computations.
    • purescript-arrows - Arrow type classes and standard instances.
    • purescript-tailrec - A type class for stack-safe monadic tail recursion.
  • The requirements for libraries in the purescript-contrib organization have been tightened, to try to ensure that libraries stay maintained.
purescript - v0.7.0-rc.1

Published by paf31 over 9 years ago

Important note

This release should be used with the latest versions of the core libraries, which are also tagged as -rc.1.

Breaking changes

  • There are now Int and Number literals. To disambiguate the two, integer Number values must now be written with a decimal place (3.0 rather than 3).
  • The Prelude module is no longer imported automatically, and must be imported the same way as any other module.
  • No modules are included with the compiler now, they have been broken out into their own libraries:
  • [] syntax for array types has been removed. It is still possible to use [] array literals however.
    • [] should now be written as Array, and [a] as Array a.
  • Cons patterns for arrays have been removed.
  • Declaring operators in classes will now produce a warning. Changes will be coming to operators in PureScript 0.8, and moving to named members in classes with operators as aliases (e.g. (<$>) = map) should make the transition easier in the future.
  • JavaScript for the FFI can no longer be provided inline.
    • Values must instead be provided in a separate .js file, and passed to the compiler with the -ffi flag.
    • Values should be provided in the form exports.foo = ..., similar to a CommonJS module
    • The file should have a coment // module X.Y.Z where X.Y.Z is the name of the module the JS values are for.
    • See here for an example

Full release notes coming soon

purescript - v0.6.9.5

Published by paf31 over 9 years ago

This release contains two patches:

  • Case statements were generating incorrect function name arguments #1008 (@paf31)
  • Comments and verbose error flags were mixed up #991 (@garyb)
purescript - v0.6.9.3

Published by paf31 over 9 years ago

Breaking Changes

  • refEq and refIneq are no longer exported from the Prelude.

Bug Fixes

  • Instances can now be defined before the corresponding class declaration (@paf31)
  • A bug related to imports in psci was fixed. (@paf31)
  • A typechecker bug related to type class dictionaries was fixed. (@garyb)
  • A bug related to operator precedence in codegen was fixed. (@garyb)

Enhancements

  • psci now supports long-form directives (@mrhania)
  • Syntax for imports and other declaration types in psci was improved. (@hdgarrood)
  • Markdown comments can now be included at the module level (@joneshf)
  • Error messages are now represented internally as an algebraic data type, and pretty printing has been improved by using the boxes library. Errors now link to the wiki. (@paf31)
  • psc-docs can now generate tags files for Vim and Emacs (@jacereda)
  • psci now supports a --node-opts flag for passing options to the Node executable. (@MichaelXavier)
  • Code gen now preserves names of more function arguments in case statements (@andyarvanitis)
  • There is now a Semigroup instance for Ordering (@pseudonom)

Documentation

  • The Prelude now has Markdown documentation (various contributors - thank you!)
  • The Pursuit website has been updated with new versions of libraries, including Markdown documentation (@hdgarrood)

Libraries

  • The following libraries are now core libraries:
    • purescript-tailrec - A type class for monadic tail recursion
    • purescript-monad-eff - A type class for monads supporting native effects
    • purescript-integers - Integer numeric type
    • purescript-invariant - Invariant functors
    • purescript-parallel - An applicative functor for parallel composition of asynchronous computations

Other

  • There is an experimental C++11 backend for PureScript called pure11.
purescript - v0.6.8

Published by paf31 over 9 years ago

Breaking Changes

  • The Num type class has been refined to allow more interesting instances. The Semiring, ModuloSemiring, Ring and DivisionRing classes have been introduced. Most code should continue to compile, since Number was one of only a handful of instances, but library developers will need to break up their Num instances.

Enhancements

  • @garyb has improved the readability of psc-docs output.

Notes

  • All uses of the deprecated ErrorT have been replaced with ExceptT and the transformers and mtl dependencies bumped accordingly.
purescript - v0.6.7.1

Published by paf31 over 9 years ago

Bug Fixes

  • A fix for a bug in the type class instance resolution code (#870, @paf31)