All Versions
14
Latest Version
Avg Release Cycle
44 days
Latest Release
10 days ago

Changelog History
Page 1

  • v0.14.0-rc2

    September 17, 2020

    ๐Ÿš€ Release candidate for use in preparing for the upcoming v0.14.0 release. Release notes coming soon.

  • v0.14.0-rc.1

    September 16, 2020

    ๐Ÿš€ Release candidate for use in preparing for the upcoming v0.14.0 release. Release notes coming soon.

  • v0.13.8

    May 23, 2020

    ๐Ÿ› Bug Fixes

    โšก๏ธ Update incremental build cache information properly on IDE rebuilds (#3789, @kritzcreek)

    ๐Ÿ›  Fixes a bug where triggering a rebuild via the IDE would not update the
    output/cache-db.json file, which in certain situations could lead to
    unnecessary rebuilds, as well as modules not being rebuilt when they should
    have been.

    Don't include compiler-internal declarations in IDE completions (#3850, @kritzcreek)

    IDE completions would previously include pseudo-declarations such as
    RowToList$Dict which only exist internally, due to how type class
    desugaring inside the compiler works. These declarations are now suppressed.

    ๐Ÿ›  Fix corefn JSON version parsing (#3877, @paulyoung)

    ๐Ÿ›  Fixes a bug where the parser for the functional core (or "corefn") JSON
    format would ignore all but the first component of the compiler version
    stored in the JSON. This does not affect the compiler directly, but will be
    ๐Ÿ“œ useful for other tooling which depends on the corefn JSON parser provided by
    the compiler library.

    ๐Ÿ‘Œ Improvements

    โž• Add purs graph subcommand for graphing module dependencies (#3781, @jmackie, @f-f)

    This adds a new graph subcommand which allows tools to consume information
    about which modules depend on which other modules. The format is as follows:

    { "Prelude":
        { "path": "src/Prelude.purs"
        , "depends": ["Data.Ring"
        },
      "Data.Ring":
        { "path": "src/Data/Ring.purs"
        , "depends": []
        },
      ...
    }
    

    Each property in the returned object has exactly two properties; path,
    which is a string containing the file path relative to the directory where
    the command was run, and depends, which is an array of the names of all
    directly imported modules.

    ๐Ÿ‘ purs ide is better at reloading changes (#3799, @kritzcreek)

    The IDE would previously sometimes miss changes that were made outside of the
    ๐Ÿ— editor, like building with new dependencies or recompiling larger parts of
    the project on the console.

    The IDE will now notice when this happened on the next command issued to it
    and refresh its state before processing that command. This might cause the
    first command after an external change to take a long time to execute, but
    should increase reliability in general.

    Switch to a binary encoding for externs files (#3841, @kritzcreek)

    ๐ŸŽ This change should result in significant performance improvements in both IDE
    ๐Ÿ— load times and incremental builds where lots of modules are already built.

    Represent module names as a single Text value internally (#3843, @kritzcreek)

    ๐ŸŽ Boosts compiler performance by representing module names as a single Text
    value, rather than a list of Text values as it was previously.

    ๐Ÿ“š Extract documentation for type classes in purs ide (#3856, @kritzcreek)

    ๐Ÿ“š This changes makes documentation comments on type classes visible to the IDE.

    Other

    • Declare explicit upper bounds on Cabal and haskeline rather than relying on
      stack's pvp-bounds (#3777, @coot)
  • v0.13.7

    May 23, 2020

    ๐Ÿš€ release withdrawn due to CI mishap

  • v0.13.6

    January 17, 2020

    ๐Ÿ› 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

  • v0.13.5

    November 13, 2019

    ๐Ÿ›  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)
  • v0.13.4

    October 20, 2019

    โœจ 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 โ†’ runLBox g (LBox f) = f gread โˆท โˆ€ row a. Record row โ†’ LBox row a โ†’ aread 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)

  • v0.13.3

    August 18, 2019

    โœจ 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 Pursuitdata 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 Pursuitclass Eq a where-- | Now this one (for the `eq` method) will be rendered tooeq :: 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 = adolet foo | bar , baz = 42 | otherwise = 100in 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)
  • v0.13.2

    July 05, 2019

    โœจ 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)
  • v0.13.1

    July 04, 2019

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