Skip to content

Commit

Permalink
Prep 0.15.13 (#4520)
Browse files Browse the repository at this point in the history
* Update versions

* Regenerate changelog
  • Loading branch information
JordanMartinez authored Nov 20, 2023
1 parent 6b49918 commit a6feba0
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 74 deletions.
71 changes: 0 additions & 71 deletions CHANGELOG.d/feature_replace-unused-declarations.md

This file was deleted.

76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,82 @@

Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.15.13

New features:

* Replace `UnusableDeclaration` with updated `NoInstanceFound` (#4513 by @JordanMartinez)

Previously, the following type class would be invalid
because there was no way for the compiler to infer
which type class instance to select because
the type variable in the class head `a` was
not mentioned in `bar`'s type signature:

```purs
class Foo a where
bar :: Int
```

The recently-added visible type applications (VTAs)
can now be used to guide the compiler in such cases:

```purs
class Foo a where bar :: Int
instance Foo String where bar = 0
someInt = bar @String -- use the `String` instance
```

Without VTAs, the compiler
will still produce an `InstanceNotFound` error, but this error
has been updated to note which type variables in the class head
can only be disambiguated via visible type applications.
Given the following code

```purs
class Single tyVarDoesNotAppearInBody where
useSingle :: Int
single :: Int
single = useSingle
```

The error reported for `useSingle` will be:

```
No type class instance was found for
Main.Single t0
The instance head contains unknown type variables.
Note: The following type class members found in the expression require visible type applications
to be unambiguous (e.g. tyClassMember @Int).
Main.useSingle
tyNotAppearInBody
```

For a multiparameter typeclass with functional dependencies...

```purs
class MultiFdBidi a b | a -> b, b -> a where
useMultiFdBidi :: Int
multiFdBidi :: Int
multiFdBidi = useMultiFdBidi
```

...the "Note" part is updated to read
```
Note: The following type class members found in the expression require visible type applications
to be unambiguous (e.g. tyClassMember @Int).
Main.useMultiFdBidi
One of the following sets of type variables:
a
b
```

## 0.15.12

New features:
Expand Down
4 changes: 2 additions & 2 deletions npm-package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "purescript",
"version": "0.15.12",
"version": "0.15.13",
"license": "ISC",
"description": "PureScript wrapper that makes it available as a local dependency",
"author": {
Expand Down Expand Up @@ -43,7 +43,7 @@
],
"scripts": {
"prepublishOnly": "node -e \"require('fs').copyFileSync('purs.bin.placeholder', 'purs.bin');\"",
"postinstall": "install-purescript --purs-ver=0.15.12",
"postinstall": "install-purescript --purs-ver=0.15.13",
"test": "echo 'Error: no test specified' && exit 1"
}
}
2 changes: 1 addition & 1 deletion purescript.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cabal-version: 2.4

name: purescript
-- Note: don't add prerelease identifiers here! Add them in app/Version.hs and npm-package/package.json instead.
version: 0.15.12
version: 0.15.13
synopsis: PureScript Programming Language Compiler
description: A small strongly, statically typed programming language with expressive types, inspired by Haskell and compiling to JavaScript.
category: Language
Expand Down

0 comments on commit a6feba0

Please sign in to comment.