Re: Wincomplete-uni-patterns and bidirectional patterns

Olaf Klinke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <[email protected]>
> My point is that which patterns are expected to be complete is an API
> design choice, subject to API stability decisions, and not just a
> matter
> of deductive reasoning.

Now I understand: Even though completeness is (provably) provable, the
COMPLETE pragma can signal the library user which sets of patterns the
library author intended to cover the (opaque) type, much like the
MINIMAL pragma for type classes. Otherwise the library user could only
know this by compiling a code snippet with -Wincomplete-uni-patterns.

To further draw the parallel between MINIMAL and COMPLETE, is COMPLETE
picked up by Haddock? Seems not: The Data.Sequence.Internal module
contains 
{-# COMPLETE (:<|), Empty #-}
{-# COMPLETE (:|>), Empty #-}
yet the "bundled patterns" section in 
https://hackage.haskell.org/package/containers-0.7/docs/Data-Sequence.html#t:Seq
does not show it. If COMPLETE is indeed never picked up by Haddock, I'd
say this pragma is currently fairly useless for conveying contracts.
Should we open a feature request at Haddock?

Olaf

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.