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.13.6

Published by natefaubion almost 5 years ago

Bug Fixes

  • Reset IDE state before performing a full reload. (#3766, @kritzcreek)

    This prevents a space leak in the IDE.

  • Added source spans to ado desugaring. (#3758, @dariooddenino)

    Previously errors in ado desugaring might have had no line information.

  • Generate correct arity failure case for some guarded matches. (#3763, @nwolverson)

    Specifically when a multi-way case contains a pattern guard or multiple
    guard expressions, the desugared case expression could contain a guard with
    a different arity to the matched expressions, resulting in an error.

Improvements

  • Improved ambiguous variable check for functional dependencies. (#3721, @MonoidMusician)

    Previously the compiler might warn about ambiguous variables that aren't actually ambiguous
    due to functional dependencies. This check now fully takes functional dependencies into
    consideration.

  • Optimize import desugaring for full builds (#3768, @colinwahl)

    The compiler was performing redundant work when resolving dependencies for modules resulting
    in poor asymptotics. This work is now shared across modules yielding a 30-40% improvement in
    build times for full builds.

  • Use PureScript escapes in string pretty-printing (#3751, @hdgarrood)

    Previously the compiler might print invalid escape sequences when pretty-printing code for
    error messages. It now prints correctly escaped code based on PureScript's lexical grammar.

  • Optimize away binds to wildcards in do-notation (#3220, @matthewleon, @hdgarrood)

    This avoids generating variable assignments if no variables are actually bound in do-notation.
    Previously the compiler would emit a unique variable name that went unused.

  • Output docs.json files for Prim modules (#3769, @f-f)

    This change allows downstream tools such as spago to obtain documentation data for Prim modules.
    Please note, however, that the API for the docs.json files is unstable and may change without warning.

Other

  • Fix various typos in source comments (#3760, @bwignall)
purescript -

Published by hdgarrood almost 5 years ago

This is a small bugfix release to address some issues which were introduced in 0.13.4.

Bug fixes

  • Fix "too many open files" during compiling (#3743, @hdgarrood)

    The compiler would not promptly close files after opening them, which could easily lead to reaching the open file limit, causing the compiler to crash.

  • Fix incorrect unused import warnings when kinds are re-exported (#3744, @hdgarrood)

    Fixes a bug in which unused import warnings were generated for kinds which were re-exported (and therefore should have been considered "used").

Other

  • Fix Haddock markup error preventing Haddock docs being generated (#3745, @cdepillabout)
  • Add upper bound on Protolude to prevent 0.2.4 from being selected (#3752, @hdgarrood)
purescript - v0.13.4

Published by hdgarrood almost 5 years ago

Enhancements

  • Use content hashes when determining whether a file needs rebuilding (#3708, @hdgarrood)

    We now calculate and store content hashes of input files during compilation. If a file's modification time has changed since the last compile, we compare the hash to the previous hash; if the hash is unchanged, this allows us to skip rebuilding this file, speeding up the build.

  • Include import declaration qualifiers in unused import warnings (#3685, @matthew-hilty)

    Previously, warnings didn't distinguish between import declarations from the same module. Code like the following

    import A.B (x) -- `x` is used.
    import A.B (y) as C -- `y` is not used.
    

    would induce a warning like The import of module A.B is redundant even though only the qualified import declaration C is actually redundant. The warning now would be The import of module A.B (qualified as C) is redundant.

  • Include kind imports when determining unused import warnings (#3685, @matthew-hilty)

    Previously, kind imports were ignored. The linter wouldn't emit any warnings for code like the following.

    import A.B (kind K) -- `kind K` is not used.
    

    And the linter, disregarding kind K, would emit an UnusedImport instead of an UnusedExplicitImport for code like the following.

    import A.B (x, kind K) -- `x` is not used, but `kind K` is.
    
  • Better reporting of I/O errors (#3730, @hdgarrood)

    If an unexpected I/O error occurs during compiling, we now include details in the error message. For example, when trying to write compilation results onto a device which has run out of space, we previously would have received a "CannotWriteFile" error with no further information. Now, we receive the underlying error message too:

    I/O error while trying to write JSON file: ./output/cache-db.json
    
      ./output/cache-db.json: hClose: resource exhausted (No space left on device)
    

Bug fixes

  • Improve type class resolution in the presence of constrained higher-order functions (#3558, @matthew-hilty)

    This is perhaps best illustrated with an example.

    newtype LBox row a = LBox (∀ r. (∀ lbl _1. Row.Cons lbl a _1 row ⇒ IsSymbol lbl ⇒ SProxy lbl → r) → r)
    
    unLBox ∷ ∀ row a r. (∀ lbl _1. Row.Cons lbl a _1 row ⇒ IsSymbol lbl ⇒ SProxy lbl → r) → LBox row a → r
    unLBox g (LBox f) = f g
    
    read ∷ ∀ row a. Record row → LBox row a → a
    read rec = unLBox \lbl → Record.get lbl rec
    

    The read function would previously fail with the error

    No type class instance was found for
    
        Prim.Row.Cons lbl4
                      a5
                      t2
                      row6
    

    although that dictionary should have been available in the function passed to unLBox. Now, it type checks successfully.

  • Fix cache invalidation false negatives by storing timestamps (#3705, @hdgarrood)

    Previously, an input file would be considered 'modified', and thus requiring rebuilding on a subsequent compile, if its modification time specifies a point in time after any of the modification times of the corresponding output files. This has turned out to be insufficient; files can often change in a way that this algorithm misses, because the input file might still have a timestamp older than the output files. Often this can happen by switching between git branches or by updating a dependency.

    This problem can manifest as compiler errors which don't appear to make sense or correspond to what is inside a source file, and which (until now) would need to be fixed by a clean rebuild (e.g. rm -r output).

    We now make a note of the modification time when we read an input file, and we consider that input file to have changed on a subsequent compile if the modification time is different to what it was before.

    The hope with this fix is that it should never be necessary to remove an output directory to get a build to run successfully. If you do run into this problem again, it is a bug: please report it.

  • Fix exports incorrectly being identified as unused in purs bundle (#3727, @rhendric)

    References to properties on the exports object would previously not be picked up by purs bundle as uses of those properties, which could lead to them being incorrectly removed. For example:

    'use strict';
    
    exports.foo = 1;
    exports.bar = exports.foo;
    

    would remove the exports.foo = 1; statement, breaking the assignment to exports.bar, if foo were not used elsewhere. This statement is now no longer removed.

  • Show entire rows in type errors in the presence of the --verbose-errors flag (#3722, @Woody88)

    The row diffing feature, which elides common labels in rows occurring in type errors, did not previously respect the --verbose-errors flag, giving the same output regardless of whether it was set or not. Now, if the flag has been supplied, we always show the entire row.

Other

  • Add Makefile command to run license generator (#3718, @hdgarrood)

  • Update language-javascript to 0.7.0.0 (@rhendric, @hdgarrood)

    This enables a number of newer JavaScript syntactic constructs to be used in FFI files. Please see the language-javascript release notes for details.

  • Fix for object shorthand syntax in FFI files (#3742, @hdgarrood)

purescript -

Published by hdgarrood about 5 years ago

Enhancements

  • Eliminate empty type class dictionaries in generated code (#2768, @LiamGoodacre)

    Empty type class dictionaries — dictionaries which do not contain any type class member implementations at runtime — are often used to provide evidence at compile-time to justify that a particular operation will not fail; for example, Prim.Row.Cons can be used to justify that we can expect a record to contain a particular field with a particular type. Unfortunately, constructing empty dictionaries can be costly, especially in more complex scenarios such as type-level programming. This release implements a new optimization which avoids the need to build empty dictionaries at runtime by instead inserting undefined into the generated code. This optimization can both reduce code size and improve performance in certain contexts.

  • Render doc-comments for data constructors and type class members in HTML documentation (#3507, @marcosh)

    Documentation comments for data constructors and type class members are now picked up by purs docs, and will soon start appearing in Pursuit too. For example:

    -- | Doc-comments like this one were always rendered in Pursuit
    data Maybe a =
      -- | Now this one (for the Just constructor) will be rendered too
      = Just a
      -- | And this one (for Nothing)
      | Nothing
      
    -- | Doc-comments like this one were always rendered in Pursuit
    class Eq a where
      -- | Now this one (for the `eq` method) will be rendered too
      eq :: a -> a -> Boolean
    
  • Show diffs of rows in errors and hints (#3392, @dariooddenino)

    In type mismatches between rows, we now elide common labels so that the problem is easier to identify. For example, consider the following code, which has a type error due to the types of the b fields in the two records not matching:

    foo =
      { a: 1, b: "hi", c: 3, d: 4, e: 5 }
    bar =
      { a: 1, b: 2, c: 3, d: 4, e: 5 }
    baz =
      [ foo, bar ]
    

    Previously, the type error would include the entirety of each record type:

    Could not match type
            
      String
            
    with type
         
      Int
    
    while trying to match type ( a :: Int   
                               , b :: String
                               , c :: Int   
                               , d :: Int   
                               , e :: Int   
                               )            
    with type ( a :: Int
              , b :: Int
              , c :: Int
              , d :: Int
              , e :: Int
              )
    

    This can become quite difficult to read in the case of large record types. Now, we get this:

    Could not match type
            
      String
            
    with type
         
      Int
         
    while trying to match type                
                               ( b :: String
                               ...          
                               )            
                                            
    with type             
                ( b :: Int
                ...       
                ) 
    

Bug fixes

  • Remove more dead code in purs bundle (#3551, @rhendric)

    The dead code elimination in purs bundle now no longer incorrectly considers declarations to be used in the presence of local variables which happen to share their names, and is therefore able to remove these declarations when they are unused.

  • Fix parsing of comma-separated guards in let statements (#3713, @natefaubion)

    The 0.13 parser would previously choke on guards separated by commas in let statements within do/ado blocks, such as

    test = ado
      let
        foo
          | bar
          , baz =
            42
          | otherwise = 100
      in
        foo
    

    This has now been fixed.

Other

  • Add placeholder purs.bin to fix npm installs (#3695, @hdgarrood)
  • Refactor and simplify BuildPlan a little (#3699, @hdgarrood)
  • Update link to partial type class guide in error message hints (#3717, @alextes)
purescript - v0.13.2

Published by hdgarrood over 5 years ago

Enhancements

  • Add --debug flag to purs bundle command (#3666, @rhendric)

    This flag causes an optimized-for-humans JSON representation of the modules
    being bundled to be dumped to stderr, prior to dead code elimination.

  • Ignore duplicate file inputs to CLI commands (#3653, @dyerw)

    If, after expanding globs, a particular file path appears more than once, the
    compiler will now ignore the extra occurrences, instead of emitting a
    DuplicateModule error.

Bug fixes

  • Fix printing of tokens with string escapes (#3665, @hdgarrood)
  • Fix multiple "let"s in ado before the final "in" (#3675, @natefaubion)
  • Throw a parse error (not internal error) when using quoted labels as puns (#3690, @natefaubion)

Other

  • Parser: Remove partial type signatures for parameterized productions (#3667, @natefaubion)
  • Make git consider *.out files as binary for the golden tests (#3656, @kritzcreek)
  • Fix build failures on older GHCs by tightening base lower bound (#3659, @hdgarrood)
  • Pin happy version to address build failures when building with Cabal (#3660, @hdgarrood)
  • Add upper bounds when producing source distributions (#3661, @hdgarrood)
  • Update test dependency on typelevel-prelude (#3649, @hdgarrood)
  • Update author and maintainer sections of cabal file (#3663, @hdgarrood)
  • Update to GHC 8.6.5, Stackage LTS 13.26 (#3688, @hdgarrood)
  • Various CI maintenance (#3687, @hdgarrood)
  • Move the "purescript" npm package into the compiler repo (#3691, @hdgarrood)
purescript - v0.13.1

Published by hdgarrood over 5 years ago

Notice: This release has been unpublished due to an error in the package tarball.

purescript - v0.13.0

Published by natefaubion over 5 years ago

Grammar/Parser Changes

0.13 is a very exciting release for me (@natefaubion). For the past few months I've been working on a complete rewrite of the existing parser. The old parser has served us very well, but it has grown very organically over the years which means it's developed some unsightly limbs! Throughout the process I've tried to iron out a lot of dark corner cases in the language grammar, and I hope this release will set us on a firm foundation so we can start to specify what "PureScript the Language" actually is. This release is definitely breaking, but I think you'll find the changes are modest. I also hope that this release will open up a lot of opportunities for syntactic tooling, both using the existing parser or even using alternative parsers (which are now possible).

Breaking

There are a number of breaking changes, but I think you'll find that most code will continue to parse fine. We've tested the parser against the existing ecosystem and several large production applications at Awake, Lumi, and SlamData. The migration burden was either non-existent or only involved a few changes.

  • The only whitespace now allowed in code is ASCII space and line endings. Since you must use indentation to format PureScript code (unlike Haskell), we felt it was best to be more restrictive in what you can write instead of allowing potentially confusing behavior (implicit tab-width, zero-width spaces, etc). You can still use unicode whitespace within string literals.
  • The only escapes accepted in string literals are \n\r\t\'\"\\, \x[0-9a-fA-F]{1,6} (unicode hex escape), and \[\r\n ]+\ (gap escapes). We had inherited a vast zoo of escape codes from the Parsec Haskell Language parser. We decided to minimize what we support, and only add things back if there is significant demand.
  • Octal and binary literals have been removed (hex remains).
  • \ is no longer a valid operator. It conflicts with lambda syntax.
  • @ is no longer a valid operator. It conflicts with named binder syntax.
  • forall is no longer a valid identifier for expressions. We wanted a consistent rule for type identifiers and expression identifiers.
  • Precedence of constructors with arguments in binders (a@Foo b must be a@(Foo b)).
  • Precedence of kind annotations (a :: Type -> Type b :: Type must now be (a :: Type -> Type) (b :: Type)).
  • Precedence of type annotations (:: has lowest precedence, rather than sitting between operators and function application).
  • Various edge cases with indentation/layout. Again, most code should work fine, but there were some cases where the old parser let you write code that violated the offside rule.

Fixes

  • Many fixes around parse error locations. The new parser should yield much more precise error locations, especially for large expressions (like in HTML DSLs).
  • Reported source spans no longer include whitespace and comments.
  • Reported source span for the last token in a file is now correct.

Enhancements

  • where is still only sugar for let (it does not introduce bindings over guards), but it is now usable in case branches in the same manner as declarations.
  • _ is now allowed in numeric literals, and is an ignored character (ie. 1_000_000 == 1000000).
  • Raw string literals (triple quotes) can now contain trailing quotes (ie. """hello "world"""" == "hello \"world\"").
  • Kind annotations are now allowed in forall contexts (#3576 @colinwahl).
  • The new parser is much faster and can avoid parsing module bodies when initially sorting modules. We also do more work in parallel during the initialization phase of purs compile. This means that time to start compiling is faster, and incremental builds are faster. In my testing, a noop call to purs compile on the Awake codebase went from ~10s to ~3s.

Other Changes

Breaking

  • Fix sharing in function composition inlining (#3439 @natefaubion). This is really a bugfix, but it has the potential to break code. Previously, you could write recursive point-free compositions that the compiler inadvertently eta-expanded into working code by eliminating sharing. We've changed the optimization to respect strict evaluation semantics, which can cause existing code to stack overflow. This generally arises in instance definitions. Unfortunately, we don't have a way to disallow the problematic code at this time.
  • Fail compilation when a module imports itself (#3586 @hdgarrood).
  • Disallow re-exporting class and type with the same name (#3648 @joneshf).

Enhancements

  • Better illegal whitespace errors (#3627 @hdgarrood).
  • Only display class members that are not exported from the module when throwing a TransitiveExportError for a class (#3612 @colinwahl).
  • Tweaks to type pretty printing (#3610 @garyb).
  • Unify matching constraints (#3620 @garyb).
  • Improve error message on ModuleNotFound error for Prim modules (#3637 @ealmansi).

Docs

  • Make markdown format behave like html. Remove --docgen opt. Separate directories for html and markdown docs (#3641 @ealmansi).
  • Make html the default output format (#3643 @ealmansi).
  • Write ctags and etags to filesystem instead of stdout (#3644 @ealmansi).
  • Add --output option for purs docs (#3647 @hdgarrood).
  • Use externs files when producing docs (#3645 @hdgarrood). docs is now a codegen target for purs compile where documentation is persisted as a docs.json file in the output directory.

Internal

  • Remove failable patterns and NoMonadFailDesugaring extension (#3610 @adnelson).
  • Add tests for grammar fixes addressed by CST (#3629 #3631 @hdgarrood).
  • Keep Parser.y ASCII to avoid locale issues with happy (#3640 @jmackie).
  • Improve display of internal errors (#3634 @hdgarrood).
purescript -

Published by hdgarrood over 5 years ago

This small release fixes three issues which were introduced in 0.12.4.

Filter out module declarations when suggesting imports (#3591)

When determining candidates for imports, ignore modules. This allows you to easily import types which come from modules of the same name, like Effect. (@kRITZCREEK)

Running purs ide server crashes on macOS (#3594)

Running purs ide server on macOS would immediately crash with the error purs: Network.Socket.listen: unsupported operation (Operation not supported on socket); this has now been fixed. (@f-f)

Take qualification into consideration when determining type class cycles (#3595)

When checking for cycles in type classes, the compiler is now able to distinguish classes which have come from different modules, meaning that e.g. class SomeOtherModule.Foo <= Foo is no longer incorrectly reported as a class having itself as a superclass. (@hdgarrood)

purescript - v0.12.4

Published by hdgarrood over 5 years ago

Enhancements

[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
  
    String
  
  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 (https://github.com/purescript-contrib/pulp/issues/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)

Other

  • Raise upper bound on aeson in package.yaml (#3537, @jacereda)
  • Add Nix test dependencies to stack.yaml (#3525, @jmackie)
  • [purs ide] Represent filters as a data type rather than functions (#3547, @kRITZCREEK)
  • Carry data constructor field names in the AST (#3566, @garyb)
  • Convert prim docs tests to use tasty (#3568, @hdgarrood)
  • Bump bower version used in tests (#3570, @garyb)
  • Add tests for purs bundle (#3533, @mhcurylo)
  • Update to GHC 8.6.4 (#3560, @kRITZCREEK)
  • Rerun some of the compiler tests to test with purs bundle (#3579, @rhendric)
purescript -

Published by paf31 over 5 years ago

Enhancements

  • Add better positions for UnknownName errors for types/kinds (#3515, @colinwahl)

    Previously an UnknownName error (arising from e.g. referring to a non-existent type, or a type which you forgot to import) would have a span covering the whole type annotation. Now, the error span only covers the relevant part of the type.

  • Boost performance of purs docs by simplifying re-export handling (#3534, @hdgarrood)

Bug fixes

  • Fix applicative do notation breaking API documentation generation with purs docs (#3414, @hdgarrood)
  • Fix the REPL browser backend (#3387, @dariooddenino)

Other

  • Make the license generator a proper stack script (@kRITZCREEK)
  • Include the module from which something was imported for re-exports in externs files (@hdgarrood)
  • Add AppVeyor build status to README.md (@hdgarrood)
purescript - v0.12.2

Published by garyb almost 6 years ago

New features

  • Named type wildcards (#3500, @natefaubion)

    It's now possible to use ?hole style syntax in type signatures where you want the compiler to tell you the missing type. This was previously possible by using _ in a type signature, but now _ can be used without raising a warning, as long as it does not appear in a top level declaration.

Enhancements

  • Improve error message for missing node.js in the repl (#3456, @justinwoo)
  • Add Boolean kind to Prim.Boolean (#3389, @justinwoo)
  • Link to documentation repo as docs for non-Prim built-in types/kinds (#3460, @JordanMartinez)
  • PSCi: Support multiple command types in paste-mode (#3471, @LiamGoodacre)
  • Add row:column printing for source positions in error messages (#3473, @justinwoo)
  • Add :print directive for customizable repl printing (#3478, @hdgarrood)
  • Implement qualified do (#3373, @pkamenarsky)
  • Add better source positions to kind errors (#3495, @natefaubion)

Fixes

  • Remove references to previous kinds * and ! (#3458, @LiamGoodacre)
  • Fix linting of unused type variables (#3464, @LiamGoodacre)
  • Avoid dropping super class dicts for the same class (#3461, @LiamGoodacre)
  • Fix issue where Partial can foil TCO optimizations (#3218, @matthewleon)
  • Fix quoting of record labels in error messages (#3480, @hdgarrood)
  • Prevent invalid JS being generated from awkward record labels (#3486, @hdgarrood)
  • Fix unnecessary quoting of reserved names when used as labels (#3487, @hdgarrood)
  • Fix source spans for binding groups (#3462, @LiamGoodacre)
  • Fix kind error for recursive data type (#3511, @natefaubion)

Other (internals)

  • Add annotations to Type and Kind (#3484, @natefaubion)
  • Use handwritten JSON instances for Type/Kind (#3496, @natefaubion)
  • Remove pretty print constructors from Type (#3498, @natefaubion)
  • Add JSON compatibility tests (#3497, @hdgarrood)
  • Remove the concept of the 'current module' in Docs (#3506, @hdgarrood)
purescript - v0.12.1

Published by garyb almost 6 years ago

Enhancements

  • Print types of missing typeclass members (#3398, @fehrenbach)
  • Added Prim.TypeError.QuoteLabel for pretty printing labels in custom type errors (#3436, @dariooddenino)
  • purs ide accepts codegen targets for the rebuild command (#3449, @kRITZCREEK)

Fixes

  • Fixes errors spans for CannotFindDerivingType (#3425, @kRITZCREEK)
  • Fixes a traversal bug where ObjectNestedUpdate was surviving desugaring (#3388, @natefaubion)
  • Fixes type operators reexports (#3410, @natefaubion)
  • Fixes ST magic-do and inlining (#3444, @natefaubion)
  • Fixes missing span information when using do-syntax without importing bind or discard (#3418, @natefaubion)
  • Fixes missing span information when shadowing an open import with a module definition (#3417, @natefaubion)
  • Fixes stale :browse environment after :reload (#3001, @rndnoise)

Other

  • Fix test-support dependency versions and update psci browse test (#3374, @LiamGoodacre)
  • Changes to build with GHC 8.4.3 (#3372, @kRITZCREEK)
  • Set --haddock flag based on BUILD_TYPE (#3409, @justinwoo)
  • Use microlens-platform instead of lens (#3400, @joneshf)
  • Avoid Data.ByteString.Lazy.toStrict (#3433, @coot)
  • Add ffiCodegen to MakeActions (#3434, @coot)
  • Add nix config to stack.yaml (#3435, @f-f)
purescript - v0.12.0

Published by garyb over 6 years ago

Breaking changes

  • Added applicative-do notation; ado is now a keyword. An full explanation of the behaviour and usage of ado is available in a comment on the issue. (#2889, @rightfold)
  • Removed wrapper scripts for the old binary names (psc, psci, etc.) (#2993, @hdgarrood)
  • Removed compiler support for deriving purescript-generics. purescript-generics-rep is still supported. (#3007, @paf31)
  • Instances with just one method now require the method to be indented (bug fix, but potentially breaking) (#2947, @quesebifurcan)
  • Overlapping instances are now an error rather than a warning, but can be resolved with the new instance chain groups feature (#2315, @LiamGoodacre)
  • Reworked the CoreFn json representation. This change enables use of the Zephyr tree shaking tool for PureScript. (#3049, #3342, @coot)
  • It is no longer possible to export a type class that has superclasses that are not also exported (bug fix, but potentially breaking) (#3132, @parsonsmatt)
  • Eq and Ord deriving will now rely on Eq1 and Ord1 constraints as necessary where sometimes previously Eq (f _) would be required. Eq1 and Ord1 instances can also be derived. (#3207, @garyb)
  • Some Prim type classes have been renamed/moved, so will require explicit importing (#3176, @parsonsmatt):
    • RowCons is now Prim.Row.Cons
    • Union is now Prim.Row.Union
    • Fail is now Prim.TypeError.Fail
    • Warn is now Prim.TypeError.Warn
  • Users can no longer specify modules under the Prim namespace (#3291, @parsonsmatt)
  • TypeConcat and TypeString have been replaced because they were in kind Symbol but weren't literals. The Prim.TypeError.Doc kind and related constructors (Text, Quote, Beside, Above) have been added in their place. The Fail and Warn type classes now accept a Doc instead of a Symbol.
    (#3134, @LiamGoodacre)
  • In simple cases instance overlaps are now checked at declaration time rather than being deferred until an attempt is made to use them. (#3129, @LiamGoodacre)
  • Chaining non-associative or mixed associativity operators of the same precedence is no longer allowed (#3315, @garyb)
  • The --dump-corefn and --source-maps arguments to purs compile have been removed. There is now a --codegen argument that allows the specific codegen targets to be specified - for example, --codegen corefn will not produce JS files, --codgen js,corefn will produce both. If the sourcemaps target is used js will be implied, so there's no difference between --codegen js,sourcemaps and --codegen sourcemaps). If no targets are specified the default is js. (#3196, @garyb, @gabejohnson)
  • Exported types that use foreign kinds now require the foreign kinds to be exported too (bug fix, but potentially breaking) (#3331, @garyb)
  • The pursuit commands were removed from purs ide due to lack of use and editor tooling implementing the features instead (#3355, @kRITZCREEK)

Enhancements

  • Added Cons compiler-solved type class for Symbol (#3054, @kcsongor)
  • The Append compiler-solved type class for Symbol can now be run in reverse (#3025, @paf31)
  • Find Usages for values and constructors in purs ide (#3206, @kRITZCREEK)
  • purs ide treats hiding imports the same as open imports when sorting (#3069, @kRITZCREEK)
  • Added inlining for fully saturated usages of runEffFn/mkEffFn (#3026, @nwolverson)
  • Improved explanation of UnusableDeclaration error (#3088, #3304, @i-am-tom)
  • Improved rendering of comments in generated JavaScript by removing additional newlines (#3096, @brandonhamilton)
  • Instance chain support. (#2315, @LiamGoodacre)

    We can now express an explicit ordering on instances that would previously have been overlapping.
    For example we could now write an IsEqual type class to compute if two types are equal or apart:

    class IsEqual (l :: Type) (r :: Type) (o :: Boolean) | l r -> o
    instance isEqualRefl :: IsEqual x x True
    else instance isEqualContra :: IsEqual l r False
    

    Note the else keyword that links the two instances together.
    The isEqualContra will only be up for selection once the compiler knows it couldn't possible select isEqualRefl - i.e that l and r are definitely not equal.

  • Improved orphan instance error to include locations where the instance would be valid (#3106, @i-am-tom)
  • Added an explicit error for better explanation of duplicate type class or instance declarations (#3093, @LiamGoodacre)
  • purs ide now provide documentation comments (#2349, @nwolverson)
  • Clarified meaning of duplicate labels in a Record row (#3143, @paf31)
  • Explicit import suggestions consistently use (..) for constructors now (#3142, @nwolverson)
  • Improved tab completion in purs repl (#3227, @rndnoise)
  • Large compiler perfomance improvement in some cases by skipping source spans in Eq, Ord for binders (#3265, @bitemyapp)
  • Added support for error/warning messages to carry multiple source spans (#3255, @garyb)
  • Improved tab completion in purs repl when parens and brackets are involved (#3236, @rndnoise)
  • Improved completion in purs repl after :kind and :type (#3237, @rndnoise)
  • Added the "magic do" optimisation for the new simplified Effect type (Control.Monad.Eff is still supported) (#3289, @kRITZCREEK, #3301, @garyb)
  • Improvide build startup times when resuming a build with incremental results (#3270, @kRITZCREEK)
  • Added compiler-solved Prim.Row.Nub type class (#3293, @natefaubion)
  • Improved docs for Prim.Row.Cons and Prim.Row.Union (#3292, @vladciobanu)
  • Functor can now be derived when quantifiers are used in constructors (#3232, @i-am-tom)
  • purs repl will now complete types after :: (#3239, @rndnoise)
  • Added compiler-solved Prim.Row.Lacks type class (#3305, @natefaubion)
  • Added current output path to missing output error message from purs ide (#3311, @rgrinberg)
  • Improved parser error messages for .purs-repl (#3248, @rndnoise)
  • require in generated JavaScript now includes full index.js file paths (#2621, @chexxor)
  • Added more compiler-solved type classes and supporting types and kinds to Prim:
    • Prim.Ordering module with kind Ordering, type LT, type EQ, type GT
    • Prim.RowList module with class RowToList, kind RowList, type Nil, type Cons
    • Prim.Symbol module with class Compare, class Append, class Cons
      (#3312, @LiamGoodacre, @kRITZCREEK)
  • Generated code for closed records now explicitly reconstructs the record rather than looping (#1493, @fehrenbach, blog post with more details)
  • Enhanced purs --help message to include hint about using --help with commands (#3344, @hdgarrood)
  • IncorrectConstructorArity error message now includes a hint of how many arguments are expected for the constructor (#3353, @joneshf)
  • purs ide now uses absolute locations for file paths for better experience in some editors (#3363, @kRITZCREEK)

Bug fixes

  • Fixed a bug with names cause by Prim always being imported unqualified (#2197, @LightAndLight)
  • Fixed overlapping instances error message to reflect its new status as an error (#3084, @drets)
  • Added source position to TypeClassDeclaration errors (#3109, @b123400)
  • Fixed entailment issues with skolems and matches in the typechecker (#3121, @LiamGoodacre)
  • Fixed multiple parentheses around a type causing a crash (#3085, @MonoidMusician)
  • Fixed purs ide inserting conflicting imports for types (#3131, @nwolverson)
  • Fixed constraints being inferred differently for lambda expressions compared with equational declarations (#3125, @LiamGoodacre)
  • Updated glob handling to prevent excessive memory usage (#3055, @hdgarrood)
  • Added position information to warnings in type declarations (#3174, @b123400)
  • Fixed documentation generated for Pursuit rendering functional dependency variables as identifier links (#3180, @houli)
  • Naming a function argument __unused no longer breaks codegen (#3187, @matthewleon)
  • Added position information to ShadowedName warning (#3213, @garyb)
  • Added position information to UnusedTypeVar warning (#3214, @garyb)
  • Added position information to MissingClassMember, ExtraneousClassMember, ExpectedWildcard errors (#3216, @garyb)
  • Added position information to ExportConflict errors (#3217, @garyb)
  • Fixed ctags and etags generation when explicit exports are involved (#3204, @matthewleon)
  • Added position information to ScopeShadowing warning (#3219, @garyb)
  • Added position information for various FFI related errors and warnings (#3276, @garyb)
  • Added all available positions to CycleInModule and DuplicateModule errors (#3273, @garyb)
  • Added position information for IntOutOfRange errors (#3277, @garyb, @kRITZCREEK)
  • Warnings are now raised when a module re-exports a qualified module with implicit import (#2726, @garyb)
  • purs repl now shows results for :browse Prim (#2672, @rndnoise)
  • Added position information to ErrorParsingFFIModule (#3307, @nwolverson)
  • Added position information for ScopeConflict cause by exports (#3318, @garyb)
  • Added position information to errors that occur in binding groups and data binding groups (#3275, @garyb)
  • Fixed a scoping issue when resolving operators (#2803, @kRITZCREEK, @LightAndLight)
  • Type synonyms are now desugared earlier when newtype deriving (#3325, @LiamGoodacre)
  • Fixed subgoals of compiler-solved type classes being ignored (#3333, @LiamGoodacre)
  • Added position information to type operator associativity errors (#3337, @garyb)
  • Updated description of purs docs command (#3343, @hdgarrood)
  • Fixed purs docs issue with re-exporting from Prim submodules (#3347, @hdgarrood)
  • Enabled purs ide imports for Prim submodules (#3352, @kRITZCREEK)
  • Fixed purs bundle failing to bundle in the 0.12-rc1 (#3359, @garyb)
  • Enabled :browse for Prim submodules in purs repl (#3364, @kRITZCREEK)

Other

  • Updated installation information to include details about prebuild binaries (#3167, @MiracleBlue)
  • Test suite now prints output when failing cases are encountered (#3181, @parsonsmatt)
  • Updated test suite to use tasty (#2848, @kRITZCREEK)
  • Improved performance of repl test suite (#3234, @rndnoise)
  • Refactored let pattern desugaring to be less brittle (#3268, @kRITZCREEK)
  • Added makefile with common tasks for contributors (#3266, @bitemyapp)
  • Added ghcid and testing commands to makefile (#3290, @parsonsmatt)
  • Removed old unused MultipleFFIModules error (#3308, @nwolverson)
  • mod and div for Int are no longer inlined as their definition has changed in a way that makes their implementation more complicated - purescript/purescript-prelude#161 (#3309, @garyb)
  • The test suite now checks warnings and errors have position information (#3211, @garyb)
  • The AST was updated to be able to differentiate between let and where clauses (#3317, @joneshf)
  • Support for an optimization pass on CoreFn was added (#3319, @matthewleon)
  • Clarified note in the purs ide docs about the behaviour of --editor-mode (#3350, @chexxor)
  • Updated bundle/install docs for 0.12 (#3357, @hdgarrood)
  • Removed old readme for psc-bundle (a leftover from before the unified purs binary) (#3356, @Cmdv)
purescript - v0.12.0-rc1

Published by garyb over 6 years ago

Breaking changes

  • Added applicative-do notation; ado is now a keyword. An full explanation of the behaviour and usage of ado is available in a comment on the issue. (#2889, @rightfold)
  • Removed wrapper scripts for the old binary names (psc, psci, etc.) (#2993, @hdgarrood)
  • Removed compiler support for deriving purescript-generics. purescript-generics-rep is still supported. (#3007, @paf31)
  • Instances with just one method now require the method to be indented (bug fix, but potentially breaking) (#2947, @quesebifurcan)
  • Overlapping instances are now an error rather than a warning, but can be resolved with the new instance chain groups feature (#2315, @LiamGoodacre)
  • Reworked the CoreFn json representation (#3049, @coot)
  • It is no longer possible to export a type class that has superclasses that are not also exported (bug fix, but potentially breaking) (#3132, @parsonsmatt)
  • Eq and Ord deriving will now rely on Eq1 and Ord1 constraints as necessary where sometimes previously Eq (f _) would be required. Eq1 and Ord1 instances can also be derived. (#3207, @garyb)
  • Some Prim type classes have been renamed/moved, so will require explicit importing (#3176, @parsonsmatt):
    • RowCons is now Prim.Row.Cons
    • Union is now Prim.Row.Union
    • Fail is now Prim.TypeError.Fail
    • Warn is now Prim.TypeError.Warn
  • Users can no longer specify modules under the Prim namespace (#3291, @parsonsmatt)
  • TypeConcat and TypeString have been replaced because they were in kind Symbol but weren't literals. The Prim.TypeErrer.Doc kind and related constructors (Text, Quote, Beside, Above) have been added in their place. The Fail and Warn type classes now accept a Doc instead of a Symbol.
    (#3134, @LiamGoodacre)
  • In simple cases instance overlaps are now checked at declaration time rather than being deferred until an attempt is made to use them. (#3129, @LiamGoodacre)
  • Chaining non-associative or mixed associativity operators of the same precedence is no longer allowed (#3315, @garyb)
  • The --dump-corefn and --source-maps arguments to purs compile have been removed. There is now a --codegen argument that allows the specific codegen targets to be specified - for example, --codegen corefn will not produce JS files, --codgen js,corefn will produce both. If the sourcemaps target is used js will be implied, so there's no difference between --codegen js,sourcemaps and --codegen sourcemaps). If no targets are specified the default is js. (#3196, @garyb, @gabejohnson)
  • Exported types that use foreign kinds now require the foreign kinds to be exported too (bug fix, but potentially breaking) (#3331, @garyb)

Enhancements

  • Added Cons compiler-solved type class for Symbol (#3054, @kcsongor)
  • The Append compiler-solved type class for Symbol can now be run in reverse (#3025, @paf31)
  • Find Usages for values and constructors in purs ide (#3206, @kRITZCREEK)
  • purs ide treats hiding imports the same as open imports when sorting (#3069, @kRITZCREEK)
  • Added inlining for fully saturated usages of runEffFn/mkEffFn (#3026, @nwolverson)
  • Improved explanation of UnusableDeclaration error (#3088, #3304, @i-am-tom)
  • Improved rendering of comments in generated JavaScript by removing additional newlines (#3096, @brandonhamilton)
  • Instance chain support. (#2315, @LiamGoodacre)

    We can now express an explicit ordering on instances that would previously have been overlapping.
    For example we could now write an IsEqual type class to compute if two types are equal or apart:

    class IsEqual (l :: Type) (r :: Type) (o :: Boolean) | l r -> o
    instance isEqualRefl :: IsEqual x x True
    else instance isEqualContra :: IsEqual l r False
    

    Note the else keyword that links the two instances together.
    The isEqualContra will only be up for selection once the compiler knows it couldn't possible select isEqualRefl - i.e that l and r are definitely not equal.

  • Improved orphan instance error to include locations where the instance would be valid (#3106, @i-am-tom)
  • Added an explicit error for better explanation of duplicate type class or instance declarations (#3093, @LiamGoodacre)
  • purs ide now provide documentation comments (#2349, @nwolverson)
  • Clarified meaning of duplicate labels in a Record row (#3143, @paf31)
  • Explicit import suggestions consistently use (..) for constructors now (#3142, @nwolverson)
  • Improved tab completion in purs repl (#3227, @rndnoise)
  • Large compiler perfomance improvement in some cases by skipping source spans in Eq, Ord for binders (#3265, @bitemyapp)
  • Added support for error/warning messages to carry multiple source spans (#3255, @garyb)
  • Improved tab completion in purs repl when parens and brackets are involved (#3236, @rndnoise)
  • Improved completion in purs repl after :kind and :type (#3237, @rndnoise)
  • Added the "magic do" optimisation for the new simplified Effect type (Control.Monad.Eff is still supported) (#3289, @kRITZCREEK, #3301, @garyb)
  • Improvide build startup times when resuming a build with incremental results (#3270, @kRITZCREEK)
  • Added compiler-solved Prim.Row.Nub type class (#3293, @natefaubion)
  • Improved docs for Prim.Row.Cons and Prim.Row.Union (#3292, @vladciobanu)
  • Functor can now be derived when quantifiers are used in constructors (#3232, @i-am-tom)
  • purs repl will now complete types after :: (#3239, @rndnoise)
  • Added compiler-solved Prim.Row.Lacks type class (#3305, @natefaubion)
  • Added current output path to missing output error message from purs ide (#3311, @rgrinberg)
  • Improved parser error messages for .purs-repl (#3248, @rndnoise)
  • require in generated JavaScript now includes full index.js file paths (#2621, @chexxor)
  • Added more compiler-solved type classes and supporting types and kinds to Prim:
    • Prim.Ordering module with kind Ordering, type LT, type EQ, type GT
    • Prim.RowList module with class RowToList, kind RowList, type Nil, type Cons
    • Prim.Symbol module with class Compare, class Append, class Cons
      (#3312, @LiamGoodacre, @kRITZCREEK)
  • Generated code for closed records now explicitly reconstructs the record rather than looping (#1493, @fehrenbach, blog post with more details)

Bug fixes

  • Fixed a bug with names cause by Prim always being imported unqualified (#2197, @LightAndLight)
  • Fixed overlapping instances error message to reflect its new status as an error (#3084, @drets)
  • Added source position to TypeClassDeclaration errors (#3109, @b123400)
  • Fixed entailment issues with skolems and matches in the typechecker (#3121, @LiamGoodacre)
  • Fixed multiple parentheses around a type causing a crash (#3085, @MonoidMusician)
  • Fixed purs ide inserting conflicting imports for types (#3131, @nwolverson)
  • Fixed constraints being inferred differently for lambda expressions compared with equational declarations (#3125, @LiamGoodacre)
  • Updated glob handling to prevent excessive memory usage (#3055, @hdgarrood)
  • Added position information to warnings in type declarations (#3174, @b123400)
  • Fixed documentation generated for Pursuit rendering functional dependency variables as identifier links (#3180, @houli)
  • Naming a function argument __unused no longer breaks codegen (#3187, @matthewleon)
  • Added position information to ShadowedName warning (#3213, @garyb)
  • Added position information to UnusedTypeVar warning (#3214, @garyb)
  • Added position information to MissingClassMember, ExtraneousClassMember, ExpectedWildcard errors (#3216, @garyb)
  • Added position information to ExportConflict errors (#3217, @garyb)
  • Fixed ctags and etags generation when explicit exports are involved (#3204, @matthewleon)
  • Added position information to ScopeShadowing warning (#3219, @garyb)
  • Added position information for various FFI related errors and warnings (#3276, @garyb)
  • Added all available positions to CycleInModule and DuplicateModule errors (#3273, @garyb)
  • Added position information for IntOutOfRange errors (#3277, @garyb, @kRITZCREEK)
  • Warnings are now raised when a module re-exports a qualified module with implicit import (#2726, @garyb)
  • purs repl now shows results for :browse Prim (#2672, @rndnoise)
  • Added position information to ErrorParsingFFIModule (#3307, @nwolverson)
  • Added position information for ScopeConflict cause by exports (#3318, @garyb)
  • Added position information to errors that occur in binding groups and data binding groups (#3275, @garyb)
  • Fixed a scoping issue when resolving operators (#2803, @kRITZCREEK, @LightAndLight)
  • Type synonyms are now desugared earlier when newtype deriving (#3325, @LiamGoodacre)
  • Fixed subgoals of compiler-solved type classes being ignored (#3333, @LiamGoodacre)
  • Added position information to type operator associativity errors (#3337, @garyb)

Other

  • Updated installation information to include details about prebuild binaries (#3167, @MiracleBlue)
  • Test suite now prints output when failing cases are encountered (#3181, @parsonsmatt)
  • Updated test suite to use tasty (#2848, @kRITZCREEK)
  • Improved performance of repl test suite (#3234, @rndnoise)
  • Refactored let pattern desugaring to be less brittle (#3268, @kRITZCREEK)
  • Added makefile with common tasks for contributors (#3266, @bitemyapp)
  • Added ghcid and testing commands to makefile (#3290, @parsonsmatt)
  • Removed old unused MultipleFFIModules error (#3308, @nwolverson)
  • mod and div for Int are no longer inlined as their definition has changed in a way that makes their implementation more complicated - purescript/purescript-prelude#161 (#3309, @garyb)
  • The test suite now checks warnings and errors have position information (#3211, @garyb)
  • The AST was updated to be able to differentiate between let and where clauses (#3317, @joneshf)
  • Support for an optimization pass on CoreFn was added (#3319, @matthewleon)
purescript - v0.11.7

Published by paf31 almost 7 years ago

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 through purs ide.

  • purs ide now groups hiding 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 the type 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 to purs 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 for purs ide (@BjornMelgaard)
  • Upgrade to GHC version 8.2 (@kRITZCREEK)
  • Allow blaze-html-0.9 (@felixonmars)
  • Bump Glob dependency (@mjhoy)
  • Use Hspec in TestDocs (@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)
purescript - v0.11.6

Published by paf31 over 7 years ago

New Features

RowToList support

(@LiamGoodacre)

There is a new type class in typelevel-prelude called RowToList, 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 in package.yaml (@garyb)
  • Only build master and semver tags in Travis (@hdgarrood)
purescript - v0.11.5

Published by paf31 over 7 years ago

Compiler

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 to psc-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 like Data.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 to ide subcommands (@simonyangme)
purescript - v0.11.4

Published by paf31 over 7 years ago

Enhancements

  • purs executable will now display help text by default (@matthewleon)
  • Adding -h/--help to ide 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)
purescript - v0.11.3

Published by paf31 over 7 years ago

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)
purescript - v0.11.2

Published by paf31 over 7 years ago

New Features

Polymorphic Labels

(@paf31)

A new RowCons constraint has been added to Prim. RowCons is a 4-way relation between

  1. Symbols
  2. Types
  3. Input rows
  4. 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)