Download Latest Version linux-arm64.tar.gz (11.9 MB)
Email in envelope

Get an email when there's a new version of PureScript

Home / v0.15.13
Name Modified Size InfoDownloads / Week
Parent folder
macos.sha 2023-11-20 62 Bytes
macos.tar.gz 2023-11-20 5.5 MB
win64.sha 2023-11-20 69 Bytes
win64.tar.gz 2023-11-20 13.3 MB
linux64.sha 2023-11-20 64 Bytes
linux64.tar.gz 2023-11-20 10.5 MB
macos-arm64.sha 2023-11-20 68 Bytes
macos-arm64.tar.gz 2023-11-20 17.8 MB
linux-arm64.sha 2023-11-20 68 Bytes
linux-arm64.tar.gz 2023-11-20 11.9 MB
README.md 2023-11-20 2.0 kB
v0.15.13 source code.tar.gz 2023-11-20 877.8 kB
v0.15.13 source code.zip 2023-11-20 1.6 MB
Totals: 13 Items   61.3 MB 0

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

Source: README.md, updated 2023-11-20