Opened 2 weeks ago

Last modified 2 weeks ago

#14422 new feature request

{-# complete #-} should be able to be at least partially type directed

Reported by: ekmett Owned by:
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 8.2.1
Keywords: PatternSynonyms Cc: Iceland_jack
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: 8779 Differential Rev(s):
Wiki Page:

Description

The fact that {-# complete #-} pragma that was added in#8779 is tied to the set of patterns only and not the types involved can make it rather awkward or impossible to use in practice.

Say I have a bunch of types that happen to share a common (:<) and Empty pattern, for views. I'd like to be able to say that for one particular type {-# complete (:<), Empty #-} holds, but since both aren't defined in the same module and neither one mentions my type, I'm stuck in the same -Wno-incomplete-patterns mess I was in before.

I cant move the pragma to the individual view patterns because in general they aren't known to be a complete pattern set.

Change History (2)

comment:1 Changed 2 weeks ago by simonpj

Keywords: PatternSynonyms added

comment:2 Changed 2 weeks ago by Iceland_jack

Cc: Iceland_jack added
Note: See TracTickets for help on using tickets.