[GHC] #14422: {-# complete #-} should be able to be at least partially type directed
GHC
ghc-devs at haskell.org
Sun Nov 5 01:19:23 UTC 2017
#14422: {-# complete #-} should be able to be at least partially type directed
-------------------------------------+-------------------------------------
Reporter: ekmett | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
(Type checker) |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets: 8779
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14422>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list