[ghc-steering-committee] Proposal #400: COMPLETE set signatures; rec: accept

Vladislav Zavialov (int-index) vlad.z.4096 at gmail.com
Thu Sep 16 16:07:20 UTC 2021


Dear Committee,

Proposal #400 "COMPLETE set signatures” by Sebastian Graf has been submitted for our consideration.

Read it here: https://github.com/sgraf812/ghc-proposals/blob/constrained-complete-sigs/proposals/0000-complete-set-signatures.rst
Discussion here: https://github.com/ghc-proposals/ghc-proposals/pull/400

The proposal presents an alternative treatment for type annotations on COMPLETE pragmas. Today one could write

   {-# COMPLETE P, Q :: Either #-}

where P and Q are some pattern synonyms. But this isn’t even well-kinded.

Instead, the author proposes that we ask our users to write

  {-# COMPLETE P, Q :: Either l r #-}

By requiring a proper type on the RHS, we also gain the ability to talk about more advanced use cases (described in the proposal).

I recommend acceptance. In fact, I learned about the way these annotations are treated today only from reading the proposal, and it came as a surprise to me. Using proper, well-kinded types there, seems like the right thing to do even if we ignore the new use cases it enables.

Let me know what you think.

- Vlad


More information about the ghc-steering-committee mailing list