Skip to content

Postfix type operator support

Motivation

Just as there's support for postfix operators on the value level, it would be nice to have postfix operators on the type level:

data Some f where
  Some :: f a -> Some f

type (?) = Some

thing :: f ? -> f ?
thing (Some f) = Some f

Currently, GHC says "Operator applied to too few arguments: ?".

Proposal

Instead, support postfix operators on the type level, by parsing f ? as (?) f.

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