Implementing pattern synonym constructor signatures

Matthew Pickering matthewtpickering at gmail.com
Mon Jan 15 20:27:13 UTC 2018


What is a constructor signature? Where is this specified?

On Mon, Jan 15, 2018 at 7:10 PM, David Feuer <david at well-typed.com> wrote:
> Over the past week I've started digging into the code that implements
> pattern synonyms with an eye toward implementing the pattern synonym
> construction function signature proposal. I think I understand a decent
> amount of what's going on most places. However, I don't understand enough
> about type checking to have any idea about what needs to change where or
> how. There are several things that need to be addressed:
>
> 0. Parsing. I wasn't actually able to find the code that parses pattern
> synonyms. Can someone point me in the right direction?
>
> 1. When there is a constructor signature, it needs to be used for the
> construction function instead of the pattern signature. Can someone give
> point me in the right direction about how to do this?
>
> 2. When there is a constructor signature but no pattern signature, what
> should we do? I think "give up" sounds okay for now.
>
> 3. A pattern synonym without a constructor signature needs to be treated as
> it is today, so the machinery for matching things up needs to remain
> available.
>
> David Feuer
> Well-Typed, LLP
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>


More information about the ghc-devs mailing list