COMPLETE pragmas

Joachim Breitner mail at joachim-breitner.de
Tue Sep 1 20:08:22 UTC 2020


Am Dienstag, den 01.09.2020, 10:11 +0200 schrieb Sebastian Graf:
> > 2.) Another scenario that I'd really love to see supported with
> > COMPLETE pragmas is a way to use | notation with them like you can
> > with MINIMAL pragmas.
> 
> (2) is a neat idea, but requires a GHC proposal I'm not currently
> willing to get into. I can also see a design discussion around
> allowing arbitrary "formulas" (e.g., not only what is effectively
> CNF).
>
> A big bonus of your design is that it's really easy to integrate into
> the current implementation, which is what I'd gladly do in case such
> a proposal would get accepted.

in the original ticket where a COMPLETE pragma was suggested (
https://gitlab.haskell.org/ghc/ghc/-/issues/8779) the ability to
specify arbitrary boolean formulas was already present:

“So here is what I think might work well, inspired by the new MINIMAL
pragma: … The syntax is essentially the same as for MINIMAL, i.e. a
boolean formula, with constructors and pattern synonyms as atoms. In
this case”

So one _could_ say that this doesn’t need a proposal, because it would
just be the implementation finishing the original task ;-)


Cheers,
Joachim

-- 
Joachim Breitner
  mail at joachim-breitner.de
  http://www.joachim-breitner.de/




More information about the ghc-devs mailing list