diff --git a/CHANGELOG.d/feature_replace-unused-declarations.md b/CHANGELOG.d/feature_replace-unused-declarations.md deleted file mode 100644 index 4bc3b1127..000000000 --- a/CHANGELOG.d/feature_replace-unused-declarations.md +++ /dev/null @@ -1,71 +0,0 @@ -* Replace `UnusableDeclaration` with updated `NoInstanceFound` - - 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 - ``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 67eae177e..d8052d14c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/npm-package/package.json b/npm-package/package.json index 9ab199712..b24866695 100644 --- a/npm-package/package.json +++ b/npm-package/package.json @@ -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": { @@ -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" } } diff --git a/purescript.cabal b/purescript.cabal index bd1595ade..a608c61ca 100644 --- a/purescript.cabal +++ b/purescript.cabal @@ -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