Re: Wincomplete-uni-patterns and bidirectional patterns

Tom Ellis <[email protected]>
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <Zaae7yDjEifqGYae@cloudinit-builder>
On Tue, Jan 16, 2024 at 04:16:26PM +0100, Olaf Klinke wrote:
> > I remember reading somewhere, but I can't find it now, that GHC's 
> > coverage checker does not look inside pattern synonym definitions at 
> > all, and this is by design: namely to ensure abstraction boundaries. 
> > Looking inside the definition would mean that type checking behaviour
> > (in a way -- if you count coverage checks as "type checking") of user
> > code is influenced by invisible implementation details of the 
> > "constructors" they're using.
> 
> Compare that to 'type' versus 'newtype' on the type level: A type is
> just an alias, a synonym. The type checker has access to all
> information on the right hand side of the equality. With extensions
> like TypeSynonymInstances, A type alias is interchangeable with the
> aliased type. 
> If what you report is true, they should not have called pattern
> synonyms a "synonym". 

Ah, they should be newpatterns!
_______________________________________________
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.