A strongly-typed language that compiles to JavaScript
OTHER License
Bot releases are hidden (Show)
Published by natefaubion almost 5 years ago
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.
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.
This is a small bugfix release to address some issues which were introduced in 0.13.4.
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").
Published by hdgarrood almost 5 years ago
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)
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.
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)
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
...
)
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.
Published by hdgarrood over 5 years ago
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.
Published by hdgarrood over 5 years ago
Notice: This release has been unpublished due to an error in the package tarball.
Published by natefaubion over 5 years ago
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).
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.
\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.\
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.a@Foo b
must be a@(Foo b)
).a :: Type -> Type b :: Type
must now be (a :: Type -> Type) (b :: Type)
).::
has lowest precedence, rather than sitting between operators and function application).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
)."""hello "world"""" == "hello \"world\""
).forall
contexts (#3576 @colinwahl).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.TransitiveExportError
for a class (#3612 @colinwahl).docs
is now a codegen target for purs compile
where documentation is persisted as a docs.json
file in the output
directory.NoMonadFailDesugaring
extension (#3610 @adnelson).This small release fixes three issues which were introduced in 0.12.4.
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
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)
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)
Published by hdgarrood over 5 years ago
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)
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)
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)
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)
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)
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)purs bundle
(#3581, @rhendric)purs bundle
(#3533, @mhcurylo)purs bundle
(#3579, @rhendric)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)
purs docs
(#3414, @hdgarrood)Published by garyb almost 6 years ago
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.
Boolean
kind to Prim.Boolean
(#3389, @justinwoo)row:column
printing for source positions in error messages (#3473, @justinwoo):print
directive for customizable repl printing (#3478, @hdgarrood)do
(#3373, @pkamenarsky)*
and !
(#3458, @LiamGoodacre)Partial
can foil TCO optimizations (#3218, @matthewleon)Type
and Kind
(#3484, @natefaubion)Type
/Kind
(#3496, @natefaubion)Type
(#3498, @natefaubion)Published by garyb almost 6 years ago
Prim.TypeError.QuoteLabel
for pretty printing labels in custom type errors (#3436, @dariooddenino)purs ide
accepts codegen targets for the rebuild command (#3449, @kRITZCREEK)CannotFindDerivingType
(#3425, @kRITZCREEK)ObjectNestedUpdate
was surviving desugaring (#3388, @natefaubion)bind
or discard
(#3418, @natefaubion):browse
environment after :reload
(#3001, @rndnoise)microlens-platform
instead of lens
(#3400, @joneshf)Data.ByteString.Lazy.toStrict
(#3433, @coot)Published by garyb over 6 years ago
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)purescript-generics
. purescript-generics-rep
is still supported. (#3007, @paf31)CoreFn
json representation. This change enables use of the Zephyr tree shaking tool for PureScript. (#3049, #3342, @coot)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)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
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
.--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)purs ide
due to lack of use and editor tooling implementing the features instead (#3355, @kRITZCREEK)Cons
compiler-solved type class for Symbol
(#3054, @kcsongor)Append
compiler-solved type class for Symbol
can now be run in reverse (#3025, @paf31)purs ide
(#3206, @kRITZCREEK)purs ide
treats hiding
imports the same as open imports when sorting (#3069, @kRITZCREEK)runEffFn/mkEffFn
(#3026, @nwolverson)UnusableDeclaration
error (#3088, #3304, @i-am-tom)We can now express an explicit ordering on instances that would previously have been overlapping.
For example we could now write anIsEqual
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.
TheisEqualContra
will only be up for selection once the compiler knows it couldn't possible selectisEqualRefl
- i.e thatl
andr
are definitely not equal.
purs ide
now provide documentation comments (#2349, @nwolverson)Record
row (#3143, @paf31)(..)
for constructors now (#3142, @nwolverson)purs repl
(#3227, @rndnoise)Eq
, Ord
for binders (#3265, @bitemyapp)purs repl
when parens and brackets are involved (#3236, @rndnoise)purs repl
after :kind
and :type
(#3237, @rndnoise)Effect
type (Control.Monad.Eff
is still supported) (#3289, @kRITZCREEK, #3301, @garyb)Prim.Row.Nub
type class (#3293, @natefaubion)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)Prim.Row.Lacks
type class (#3305, @natefaubion)purs ide
(#3311, @rgrinberg).purs-repl
(#3248, @rndnoise)require
in generated JavaScript now includes full index.js
file paths (#2621, @chexxor)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
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)Prim
always being imported unqualified (#2197, @LightAndLight)TypeClassDeclaration
errors (#3109, @b123400)purs ide
inserting conflicting imports for types (#3131, @nwolverson)__unused
no longer breaks codegen (#3187, @matthewleon)ShadowedName
warning (#3213, @garyb)UnusedTypeVar
warning (#3214, @garyb)MissingClassMember
, ExtraneousClassMember
, ExpectedWildcard
errors (#3216, @garyb)ExportConflict
errors (#3217, @garyb)ctags
and etags
generation when explicit exports are involved (#3204, @matthewleon)ScopeShadowing
warning (#3219, @garyb)CycleInModule
and DuplicateModule
errors (#3273, @garyb)IntOutOfRange
errors (#3277, @garyb, @kRITZCREEK)purs repl
now shows results for :browse Prim
(#2672, @rndnoise)ErrorParsingFFIModule
(#3307, @nwolverson)ScopeConflict
cause by exports (#3318, @garyb)purs docs
command (#3343, @hdgarrood)purs docs
issue with re-exporting from Prim
submodules (#3347, @hdgarrood)purs ide
imports for Prim
submodules (#3352, @kRITZCREEK)purs bundle
failing to bundle in the 0.12-rc1 (#3359, @garyb):browse
for Prim
submodules in purs repl
(#3364, @kRITZCREEK)repl
test suite (#3234, @rndnoise)let
pattern desugaring to be less brittle (#3268, @kRITZCREEK)ghcid
and testing commands to makefile (#3290, @parsonsmatt)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)let
and where
clauses (#3317, @joneshf)CoreFn
was added (#3319, @matthewleon)purs ide
docs about the behaviour of --editor-mode
(#3350, @chexxor)psc-bundle
(a leftover from before the unified purs
binary) (#3356, @Cmdv)Published by garyb over 6 years ago
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)purescript-generics
. purescript-generics-rep
is still supported. (#3007, @paf31)CoreFn
json representation (#3049, @coot)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)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
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
.--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)Cons
compiler-solved type class for Symbol
(#3054, @kcsongor)Append
compiler-solved type class for Symbol
can now be run in reverse (#3025, @paf31)purs ide
(#3206, @kRITZCREEK)purs ide
treats hiding
imports the same as open imports when sorting (#3069, @kRITZCREEK)runEffFn/mkEffFn
(#3026, @nwolverson)UnusableDeclaration
error (#3088, #3304, @i-am-tom)We can now express an explicit ordering on instances that would previously have been overlapping.
For example we could now write anIsEqual
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.
TheisEqualContra
will only be up for selection once the compiler knows it couldn't possible selectisEqualRefl
- i.e thatl
andr
are definitely not equal.
purs ide
now provide documentation comments (#2349, @nwolverson)Record
row (#3143, @paf31)(..)
for constructors now (#3142, @nwolverson)purs repl
(#3227, @rndnoise)Eq
, Ord
for binders (#3265, @bitemyapp)purs repl
when parens and brackets are involved (#3236, @rndnoise)purs repl
after :kind
and :type
(#3237, @rndnoise)Effect
type (Control.Monad.Eff
is still supported) (#3289, @kRITZCREEK, #3301, @garyb)Prim.Row.Nub
type class (#3293, @natefaubion)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)Prim.Row.Lacks
type class (#3305, @natefaubion)purs ide
(#3311, @rgrinberg).purs-repl
(#3248, @rndnoise)require
in generated JavaScript now includes full index.js
file paths (#2621, @chexxor)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
Prim
always being imported unqualified (#2197, @LightAndLight)TypeClassDeclaration
errors (#3109, @b123400)purs ide
inserting conflicting imports for types (#3131, @nwolverson)__unused
no longer breaks codegen (#3187, @matthewleon)ShadowedName
warning (#3213, @garyb)UnusedTypeVar
warning (#3214, @garyb)MissingClassMember
, ExtraneousClassMember
, ExpectedWildcard
errors (#3216, @garyb)ExportConflict
errors (#3217, @garyb)ctags
and etags
generation when explicit exports are involved (#3204, @matthewleon)ScopeShadowing
warning (#3219, @garyb)CycleInModule
and DuplicateModule
errors (#3273, @garyb)IntOutOfRange
errors (#3277, @garyb, @kRITZCREEK)purs repl
now shows results for :browse Prim
(#2672, @rndnoise)ErrorParsingFFIModule
(#3307, @nwolverson)ScopeConflict
cause by exports (#3318, @garyb)repl
test suite (#3234, @rndnoise)let
pattern desugaring to be less brittle (#3268, @kRITZCREEK)ghcid
and testing commands to makefile (#3290, @parsonsmatt)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)let
and where
clauses (#3317, @joneshf)CoreFn
was added (#3319, @matthewleon)Published by paf31 almost 7 years ago
Unsafe.Coerce.unsafeCoerce
(@coot)purs ide
inserts conflicting imports for types (#3131, @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
purs repl
:complete
directive to purs repl
to support completion in more editors (@actionshrimp)purs ide
. (@kRITZCREEK)PROTOCOL.md
docs for purs ide
(@BjornMelgaard)blaze-html-0.9
(@felixonmars)Glob
dependency (@mjhoy)Hspec
in TestDocs
(@hdgarrood)master
and versioned tags in AppVeyor (@hdgarrood)Published by paf31 over 7 years ago
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.
:reload
(@hdgarrood)purescript.cabal
and add to .gitignore
(@garyb)aeson
in package.yaml
(@garyb)Published by paf31 over 7 years ago
(@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 <> ")"
purs repl
with --port
(@dgendill)forall
within constraints (#2874, @sectore)\r\n
into \n
after reading files (@kRITZCREEK)purs
command line help message issues (@Cmdv)let
properly when generating docs (@paf31)RowCons
type class in documentation (@tslawler)TypesDoNotUnify
involving duplicate labels (#2820, @thoradam)package.yaml
(@sol)purs
(@noraesae)build
command to run tests (@sectore)directory
(@kRITZCREEK)core-tests
to psc-package
(#2830, @matthewleon)CONTRIBUTING.md
for "new contributor" label (@thoradam)purs ide
A new filter, which restricts query results to the value, type and/or kind namespaces, which allows improvements to the completion and import commands.
This empowers editor plugins to add imports for qualified identifiers, for example in the Emacs plugin.
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.
This can yield significant speedups in the initial load times. For example a full load of slamdata/slamdata
improves from 11 to 6 seconds
-h
/--help
to ide
subcommands (@simonyangme)Published by paf31 over 7 years ago
purs
executable will now display help text by default (@matthewleon)-h
/--help
to ide
subcommands (@simonyangme)purs ide
list import command (@kRITZCREEK)purs ide
now reads files in text mode for adding imports (@kRITZCREEK)aeson
lower bound to 1.0 (@hdgarrood)purs
command line help message fixes (@Cmdv)psc-package
(#2830, @matthewleon)CONTRIBUTING.md
notes (@thoradam)Published by paf31 over 7 years ago
directory >=1.2.3.0
for XDG support (@bergmark)hpack
to generate the .cabal
file (@kRITZCREEK)psci_history
(@legrostdg)Published by paf31 over 7 years ago
(@paf31)
A new RowCons
constraint has been added to Prim
. RowCons
is a 4-way relation between
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.
psci_history
file (@legrostdg)purs ide
(@kRITZCREEK)hpack
to generate the .cabal
file (@kRITZCREEK)