Changelog History
Page 8
-
v0.6.9.3 Changes
March 18, 2015๐ฅ Breaking Changes
refEq
andrefIneq
are no longer exported from thePrelude
.
๐ Bug Fixes
- Instances can now be defined before the corresponding class declaration (@paf31)
- ๐ A bug related to imports in
psci
was fixed. (@paf31) - ๐ A typechecker bug related to type class dictionaries was fixed. (@garyb)
- ๐ A bug related to operator precedence in codegen was fixed. (@garyb)
โจ Enhancements
- ๐
psci
now supports long-form directives (@mrhania) - Syntax for imports and other declaration types in
psci
was improved. (@hdgarrood) - Markdown comments can now be included at the module level (@joneshf)
- ๐จ Error messages are now represented internally as an algebraic data type, and pretty printing has been improved by using the
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) - Code gen now preserves names of more function arguments in case statements (@andyarvanitis)
- There is now a
Semigroup
instance forOrdering
(@pseudonom)
๐ Documentation
- ๐ The Prelude now has Markdown documentation (various contributors - thank you!)
- ๐ The Pursuit website has been updated with new versions of libraries, including Markdown documentation (@hdgarrood)
Libraries
- The following libraries are now core libraries:
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 computations
Other
- There is an experimental C++11 backend for PureScript called pure11.
-
v0.6.8 Changes
February 21, 2015๐ฅ Breaking Changes
- The
Num
type class has been refined to allow more interesting instances. TheSemiring
,ModuloSemiring
,Ring
andDivisionRing
classes have been introduced. Most code should continue to compile, sinceNumber
was one of only a handful of instances, but library developers will need to break up theirNum
instances.
โจ Enhancements
- ๐ @garyb has improved the readability of
psc-docs
output.
Notes
- ๐ All uses of the deprecated
ErrorT
have been replaced withExceptT
and thetransformers
andmtl
dependencies bumped accordingly.
- The
-
v0.6.7 Changes
February 12, 2015โจ Enhancements
Scoped Type Variables
(#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 amap
function on aList
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
andb
inside the type ofgo
, giving a more precise type:go :: List a -> List b
Rows In Instance Contexts
(@paf31, @apsk)
This feature allows rows to appear on the left of a
=>
in a type signature. For example, given aMonadEff
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
supportingTrace
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
๐ Improved
let
bindings inpsci
(#782, @paf31)
Any declaration can now be used inside a
let
binding inpsci
. 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 inpsci
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 inpsci
:> let f x = x > if f true then f "true" else f "False" "true"
๐ Markdown Support in
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.๐ Bug Fixes
- Modules are rebuilt before a command is executed in
psci
, to avoid situations where compiled code becomes out-of-date (@paf31) @
is a valid operator name again (#815, @paf31)- Reserved module names are now properly escaped (@garyb)
- Modules are rebuilt before a command is executed in
-
v0.6.7.1 Changes
February 14, 2015๐ Bug Fixes
- A fix for a bug in the type class instance resolution code (#870, @paf31)
-
v0.6.6 Changes
February 09, 2015๐ฅ Breaking Changes
- The syntax of record getters was changed to
_.prop
(@garyb)
โจ Enhancements
- โก๏ธ 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]
๐ Bug Fixes
- ๐ Newline issues were fixed in executables (@michaelficarra)
- The syntax of record getters was changed to
-
v0.6.5 Changes
February 08, 2015โจ Enhancements
- ๐ 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)
๐ Bug Fixes
- ๐ Some command line options were fixed in
psc-make
(@paulyoung) - ๐ Some module import errors were fixed (@garyb)
- ๐ A typechecker bug related to row synonyms was fixed (#795, @paf31)
-
v0.6.4 Changes
January 23, 2015- ๐ Fix some precedence issues in the code generator.
- Tighten the bounds on
utf8-string
. - ๐ Fixed a bug in the typechecker.
-
v0.6.4.1 Changes
February 03, 2015๐ Various small bug fixes.
-
v0.6.3 Changes
January 08, 2015๐ฅ Breaking Changes
๐ Bug Fixes
- Case statement at end of
Eff
block not being executed. (#759, @paf31) - ๐ A bug related to dead code elimination was fixed. (@garyb)
- Wildcards can now appear in row endings. (@RossMeikleham)
โจ Enhancements
- There is a new "core functional representation", which will enable certain optimizations, and new features such as rewrite rules. (#710, @garyb)
- Record pattern matches now allow field names to be separated from binders using
:
instead of=
, to match record construction (#760, @leighman) - Some improvements needed for the Pursuit tool (@hdgarrood)
- ๐ The lexer was separated from the parser, and now supports explicit comments in the AST. Documentation generated by
psc-docs
now contains any inline comments which precede the corresponding declaration, and generated code preserves the same comments. (@paf31) - ๐ PureScript now builds on GHC 7.6.* again. (@dylex)
- Proper names can now contain underscores. (@dylex)
- ๐ Several auto-completion improvements and fixes in PSCI. (@vkorablin)
Libraries
- The Prelude now contains a
pureST
function to runST
computations in a pure context. (@KMahoney)
Tools
- The Pursuit tool now runs on the community server, and integrates with Bower. Libraries can be added by submitting a pull request. (@hdgarrood)
- Case statement at end of
-
v0.6.2 Changes
November 28, 2014๐ฅ Breaking Changes
- ๐ป 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.
โจ Enhancements
- ๐ Use
optparse-applicative
instead ofcmdtheline
(@anthoq88)
Libraries
- ๐ Move
STArray
out of Prelude. (@paf31)