purescript v0.8.2 Release Notes

Release Date: 2016-02-29 // about 8 years ago
  • ๐Ÿ’ฅ Breaking Changes

    None

    โœจ Enhancements

    • psc-ide is now distributed with the compiler! (@kRITZCREEK)

    The psc-ide-server and psc-ide-client executables are now maintained and distributed alongside the compiler. This will ensure that the externs file format used by psc-ide-server is kept in sync with changes in the compiler.

    • Source maps (@nwolverson)

    Source maps can be generated using the --source-maps flag. See the example repository for a full demonstration of source maps using Webpack.

    • Operator aliases for data constructors (@garyb)

    Aliases can now be defined for data constructors. For example:

      data List a = Nil | Cons a (List a)
    
      infixr 6 Cons as :
    

    Here, the : operator can be used as a function to replace the Cons constructor, and also in binders.

    • Eq and Ord deriving (@paf31)

    Eq and Ord instances can now be derived, using the derive instance syntax:

      derive instance eqList  :: (Eq  a) => Eq  (List a)
      derive instance ordList :: (Ord a) => Ord (List a)
    
    • ๐Ÿ“„ Types are now inferred in psc-docs and psc-publish (@hdgarrood)

    If type annotations are missing in source files, they will be inferred by psc-docs and psc-publish before documentation generation.

    • ๐ŸŽ‰ Initial version of new syntax for operator sections (#1846, @paf31)

    Operator sections can now be written using underscores. For example:

      decrementAll :: Array Int -> Array Int
      decrementAll = map (_ - 1)
    

    which is equivalent to:

      decrementAll :: Array Int -> Array Int
      decrementAll = map (\x -> x - 1)
    

    ๐Ÿ› Bug Fixes

    • ๐Ÿ‘ Allow one open import without warning (@garyb)

    Warnings for open imports were a pain point for some users after the 0.8 release. This change allows a single open import without a warning. This is still safe in the presence of dependency updates, and does not lead to ambiguity for editor plugins searching for declaration sites.

    Other

    • โšก๏ธ @phadej has updated the Stack build to use the latest LTS and nightly builds.
    • ๐Ÿ”จ @izgzhen has refactored the PSCi code to be more readable.
    • ๐Ÿ”จ @hdgarrood has refactored the test suite.