GHC: Ticket #14422: {-# complete #-} should be able to be at least partially type directed
http://ghc.haskell.org/trac/ghc/ticket/14422
<p>
The fact that <code>{-# complete #-}</code> pragma that was added in<a class="closed ticket" href="http://ghc.haskell.org/trac/ghc/ticket/8779" title="#8779: feature request: Exhaustiveness checks for pattern synonyms (closed: fixed)">#8779</a> is tied to the set of patterns only and not the types involved can make it rather awkward or impossible to use in practice.
</p>
<p>
Say I have a bunch of types that happen to share a common <code>(:<)</code> and <code>Empty</code> pattern, for views. I'd like to be able to say that for one particular type <code>{-# complete (:<), Empty #-}</code> holds, but since both aren't defined in the same module and neither one mentions my type, I'm stuck in the same <code>-Wno-incomplete-patterns</code> mess I was in before.
</p>
<p>
I cant move the pragma to the individual view patterns because in general they aren't known to be a complete pattern set.
</p>
en-usGHChttp://ghc.haskell.org/trac/ghc/chrome/site/ghc_logo.png
http://ghc.haskell.org/trac/ghc/ticket/14422
Trac 1.2.2simonpjMon, 06 Nov 2017 11:37:28 GMTkeywords set
http://ghc.haskell.org/trac/ghc/ticket/14422#comment:1
http://ghc.haskell.org/trac/ghc/ticket/14422#comment:1
<ul>
<li><strong>keywords</strong>
<em>PatternSynonyms</em> added
</li>
</ul>
TicketIceland_jackMon, 06 Nov 2017 14:30:22 GMTcc set
http://ghc.haskell.org/trac/ghc/ticket/14422#comment:2
http://ghc.haskell.org/trac/ghc/ticket/14422#comment:2
<ul>
<li><strong>cc</strong>
<em>Iceland_jack</em> added
</li>
</ul>
Ticket