Skip to content

Function Result Type Signatures

Motivation

Tracking issue for accepted proposal.

We propose to allow function result type signatures, shown as :: r in the following example:

f (x :: a) (y :: b) :: r = rhs

Note that this is an annotation on the LHS, not on the RHS:

f (x :: a) (y :: b) = rhs :: r   -- not the same!

Proposal

As described in https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0228-function-result-sigs.rst

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information