A strongly-typed language that compiles to JavaScript
OTHER License
Bot releases are visible (Hide)
Published by paf31 about 9 years ago
purescript-transformers
invalid, so users of this release should upgrade to the latest transformers
.RedefinedModule
errors now include position info #1024 (@garyb)Type(..)
when Type
is a synonym or has no constructors. #1391 (@garyb)-ffi
to specify JavaScript FFI files is now optional, files with a .js
extension will be detected as FFI files automatically when encountered. #1268 (@mjgpy3)Void
#1380 (@nicodelpiano)"The impossible happened in desugarDo"
should no longer occur #386 (@paf31)@zudov, @phadej and @erdeszt made more updates and improvements to the CI build.
Published by paf31 about 9 years ago
@gbaz has implemented generic deriving. This allows instances for the Generic
class in the purescript-generics
package to be derived by the compiler.
A Generic
instance can be derived as follows:
data Example = Foo String | Bar Int | Baz Boolean
derive instance genericExample :: Generic Example
purescript-generics
provides examples of usage, such as gShow
, gEq
and gCompare
, for printing, equality tests and comparison respectively.
See #1138.
@garyb has implemented a test for orphan instances which will now cause the build to fail with an error. See #1247
psc: <<loop>>
has been fixed. This was due to a bug in the error pretty printer. (@paf31)psc-publish
(@paf31)Published by paf31 about 9 years ago
Functionally equivalent to v0.7.2. This release fixes a version incompatibility with Stackage.
Published by garyb about 9 years ago
.psci
file after the current working directory #883 (@mjgpy3)psci
#1276 (@paf31)(<<<)
instead of (.)
#1284 (@mjgpy3)psc-bundle
was improved #1307 (@hdgarrood)psc-publish
code is now part of the library module #1304 (@hdgarrood)psc-publish
now has --version
and --help
options #1300 (@garyb)psc-publish
now has a --dry-run
option for checking whether the module can be published #1308 (@hdgarrood)psc-publish
now requires a clean working tree #1306 (@hdgarrood)psc-publish
can now find bower
on Windows machines #1317 (@hdgarrood)psc-publish
now uses OS-specific path delimiters to fix another bug on Windows #1326 (@hdgarrood)Published by paf31 over 9 years ago
Minor fixes after 0.7.0:
psc-publish
to support the new Pursuit website.Enhancements
@nicodelpiano has added exhaustivity checking as a new warning type. Incomplete pattern matches will now generate warnings like this:
Warning in module Data.Either.Unsafe:
Warning in value declaration fromRight:
Warning at src/Data/Either/Unsafe.purs line 14, column 1 - line 15, column 1:
Pattern could not be determined to cover all cases.
The definition has the following uncovered cases:
(Data.Either.Left _)
See https://github.com/purescript/purescript/wiki/Error-Code-NotExhaustivePattern for more information, or to contribute content related to this error.
Published by paf31 over 9 years ago
This release ("MELTDOWN") aims to handle as many planned breaking changes as possible, to ease the upgrade path before 1.0. It is necessary to upgrade almost all PureScript code to compile with this release.
The latest versions of the core libraries have all been updated to compile with this release. Older versions of the core libraries will not work with this release, and the latest versions of libraries will not build with older compiler releases.
Detailed instructions for those who need to migrate their code can be found on the wiki.
As usual, many thanks go to all of the contributors who helped with this release!
psc
executable has been replaced with psc-make
, which has been renamed to psc
(in an effort to standardize on CommonJS module output). Features which were previously only available in old psc
(dead code elimination, bundling code for the browser) are now handled by the new executable psc-bundle
, which works with the output of the new psc
(for faster, incremental builds).Int
and Number
literals. To disambiguate the two, integer Number
values must now be written with a decimal place (3.0
rather than 3
).Prelude
module is no longer imported automatically, and must be imported the same way as any other module.Debug.Trace
has been renamed to Control.Monad.Eff.Console
, and trace
has been renamed to log
.[]
syntax for array types has been removed. It is still possible to use []
array literals however.
[]
should now be written as Array
, and [a]
as Array a
.(<$>) = map
) should make the transition easier in the future..js
file, and passed to the compiler with the -ffi
flag.exports.foo = ...
, similar to a CommonJS module// module X.Y.Z
where X.Y.Z
is the name of the module the JS values are for.purescript module M1 (module M2) where import M2
psc-docs
can now generate multiple output files, allowing documentation to be collected into functional groups.psc-publish
has been added, which generates module documentation in a JSON format required by Pursuit 2 (coming soon)psci
, and generally tidying up and refactoring that code.--require-path
option allows the syntax of module imports in generated CommonJS modules to be customized (@garyb).Eff
monad. (@paf31)<<<
and $
)psc
, psc-docs
and psc-bundle
now support file globs as command-line arguments, fixing a bug related to the command length on Windows machines (@paf31)psc
and psc-bundle
binaries are supportedpulp docs
now generates individual Markdown files for each source modulegulp-purescript
has been updated:
psc
and psc-bundle
binaries are supportedpurescript-lists
- Strict and lazy linked list data structurespurescript-assert
- Low level assertion library for testspurescript-parallel
- An applicative functor for parallel composition of asynchronous computations.purescript-arrows
- Arrow type classes and standard instances.purescript-tailrec
- A type class for stack-safe monadic tail recursion.purescript-contrib
organization have been tightened, to try to ensure that libraries stay maintained.Published by paf31 over 9 years ago
This release should be used with the latest versions of the core libraries, which are also tagged as -rc.1
.
Int
and Number
literals. To disambiguate the two, integer Number
values must now be written with a decimal place (3.0
rather than 3
).Prelude
module is no longer imported automatically, and must be imported the same way as any other module.[]
syntax for array types has been removed. It is still possible to use []
array literals however.
[]
should now be written as Array
, and [a]
as Array a
.(<$>) = map
) should make the transition easier in the future..js
file, and passed to the compiler with the -ffi
flag.exports.foo = ...
, similar to a CommonJS module// module X.Y.Z
where X.Y.Z
is the name of the module the JS values are for.Full release notes coming soon
Published by paf31 over 9 years ago
This release contains two patches:
Published by paf31 over 9 years ago
refEq
and refIneq
are no longer exported from the Prelude
.psci
was fixed. (@paf31)psci
now supports long-form directives (@mrhania)psci
was improved. (@hdgarrood)boxes
library. Errors now link to the wiki. (@paf31)psc-docs
can now generate tags files for Vim and Emacs (@jacereda)psci
now supports a --node-opts
flag for passing options to the Node executable. (@MichaelXavier)Semigroup
instance for Ordering
(@pseudonom)purescript-tailrec
- A type class for monadic tail recursionpurescript-monad-eff
- A type class for monads supporting native effectspurescript-integers
- Integer numeric typepurescript-invariant
- Invariant functorspurescript-parallel
- An applicative functor for parallel composition of asynchronous computationsPublished by paf31 over 9 years ago
Num
type class has been refined to allow more interesting instances. The Semiring
, ModuloSemiring
, Ring
and DivisionRing
classes have been introduced. Most code should continue to compile, since Number
was one of only a handful of instances, but library developers will need to break up their Num
instances.psc-docs
output.ErrorT
have been replaced with ExceptT
and the transformers
and mtl
dependencies bumped accordingly.Published by paf31 over 9 years ago
Published by paf31 over 9 years ago
(#347, @paf31)
This feature allows type variables which are bound by a forall
keyword to be used inside type annotations in the body of the function. For example, suppose we want to define a map
function on a List
type:
data List a = Nil | Cons a (List a)
map :: forall a b. (a -> b) -> List a -> List b
map f = go
where
go Nil = Nil
go (Cons x xs) = Cons (f x) (map f xs)
To give a type to go
, we could previously use type wildcards:
go :: List _ -> List _
Now, we can refer to the types a
and b
inside the type of go
, giving a more precise type:
go :: List a -> List b
(@paf31, @apsk)
This feature allows rows to appear on the left of a =>
in a type signature. For example, given a MonadEff
class:
class MonadEff eff m where
liftEff :: forall a. Eff eff a -> m a
we can now write the following function which works in any Monad
supporting Trace
actions:
logging :: forall m a eff. (Monad m, MonadEff (trace :: Trace | eff) m) => String -> m a -> m a
logging s action = do
liftEff $ trace $ "Starting: " <> s
a <- action
liftEff $ trace $ "Done: " <> s
return a
let
bindings in psci
(#782, @paf31)
Any declaration can now be used inside a let
binding in psci
. For example, we can define data types or foreign imports:
> let data Foo = Foo | Bar | Baz
> let foreign import foo :: Foo -> String
The general form of a let
statement in psci
now contains one or more declarations of any type, and these declarations simply get added to the current module.
As a bonus, polymorphic functions bound using let
now work at multiple type instantiations in psci
:
> let f x = x
> if f true then f "true" else f "False"
"true"
psc-docs
(#802, @paf31)
Markdown can now be used for documentation purposes by using pipe characters to align content. For example:
-- | Create a copy of the array without its first element.
-- |
-- | Running time: `O(n)`, where `n` is the length of the array.
-- |
-- | This function is partial. Specifically, `tail []` is undefined.
tail :: forall a. [a] -> [a]
psc-docs
will insert this markdown content verbatim into your generated documentation.
psci
, to avoid situations where compiled code becomes out-of-date (@paf31)@
is a valid operator name again (#815, @paf31)Published by paf31 over 9 years ago
_.prop
(@garyb)The record part of a record updater can now be made into a wildcard, e.g. _ { foo = 1 }
(@garyb)
Extended infix expressions are now supported, (@paf31) e.g.
[1, 2, 3] `zipWith (+)` [4, 5, 6]
Published by paf31 over 9 years ago
Lightweight record constructors are now supported (@garyb):
person :: Maybe String -> Maybe Number -> Maybe Address -> Maybe Person
person = { name: _, age: _, location: _ } <$> name <*> age <*> location
Field accessor sections are now supported (@garyb):
getPersonName :: Maybe String
getPersonName = (.name) <$> getPersonInfo
Syntactic sugar has been introduced for object update functions:
updateName :: Person -> String -> Person
updateName person = person { name = _ }
Operator sections are now supported (@garyb)
psc-make
(@paulyoung)Published by paf31 over 9 years ago
Various small bug fixes.
Published by paf31 over 9 years ago
utf8-string
.Published by paf31 almost 10 years ago
Eff
block not being executed. (#759, @paf31):
instead of =
, to match record construction (#760, @leighman)psc-docs
now contains any inline comments which precede the corresponding declaration, and generated code preserves the same comments. (@paf31)pureST
function to run ST
computations in a pure context. (@KMahoney)Published by paf31 almost 10 years ago
Command line options with multiplicity 1 now require an equals symbol, e.g.
psc --main=Main --browser-namespace=PS
The Grunt and Gulp plugins already support this format.
optparse-applicative
instead of cmdtheline
(@anthoq88)STArray
out of Prelude. (@paf31)Published by paf31 almost 10 years ago