[Haskell-cafe] Wincomplete-uni-patterns and bidirectional patterns

Olaf Klinke olf at aatal-apotheke.de
Fri Jan 19 16:49:57 UTC 2024


> > Should we open a feature request at Haddock?
> 
> I think that would be a good idea.  A cursory search suggests there's
> no feature request already

Done:
https://github.com/haskell/haddock/issues/1625

I would also like to humbly suggest that the GHC devs consider my proof
that pattern synonym completeness checks are decidable, thus improving
the situation that caused this thread. I have a proof-of-concept
implementation with a type signature like

covers :: PatternMatch t => [Pattern t] -> Bool

where 

type Pattern t = t -> Bool 

and PatternMatch is a type class much like Generic which derives
instances for all Generic Rep types (except V1) plus function spaces
and fixed points. What is left to do is to convert the GHC-internal
pattern representation into (t -> Bool). Is that feasible? As I
elaborated, that task ist quite mechanistic and could likely be done in
Template Haskell.

Olaf



More information about the Haskell-Cafe mailing list