pattern signatures

Simon Peyton Jones simonpj at microsoft.com
Mon Jan 8 12:59:50 UTC 2018


I like the idea of distinguishing “signatures” from “annotations”.

But then what is currently a “pattern signature” with extension -XPatternSignatures, becomes “type annotation in a pattern” or perhaps “pattern type-annotation” which is a bit clumsy.

Possibly “type specification” instead of “type annotation”.  Thus “pattern type-spec” which is snappier.

Simon

From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Spiwack, Arnaud
Sent: 08 January 2018 10:11
Cc: Joachim Breitner <mail at joachim-breitner.de>; ghc-devs at haskell.org
Subject: Re: pattern signatures

In my eyes, signatures are something which goes with a definition.
So (a) is a pattern (synonym) signature, while (b) is merely a type annotation on a pattern.


On Fri, Jan 5, 2018 at 11:23 PM, Iavor Diatchki <iavor.diatchki at gmail.com<mailto:iavor.diatchki at gmail.com>> wrote:
Well, as you say, "pattern signature" makes sense for both, so I would expect to use context to disambiguate.  If I wanted to be explicit about which one I meant, I'd use:

a) "Pattern synonym signature"
b) "Signature on a pattern"

-Iavor




On Fri, Jan 5, 2018 at 1:12 PM Joachim Breitner <mail at joachim-breitner.de<mailto:mail at joachim-breitner.de>> wrote:
Hi,

Am Freitag, den 05.01.2018, 13:42 -0500 schrieb Brandon Allbery:
> Further complicated by the fact that that form used to be called a
> "pattern signature" with accompanying extension, until that was
> folded into ScopedTypeVariables extension.

which I find super confusing, because sometimes I want a signature on a
pattern and it is counter-intuitive to me why I should not longer use
the obviously named PatternSignatures extension but rather the at first
glance unrelated ScopedTypeVariable extension.

But I am derailing the discussion a bit.

Cheers,
Joachim

--
Joachim Breitner
  mail at joachim-breitner.de<mailto:mail at joachim-breitner.de>
  http://www.joachim-breitner.de/<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.joachim-breitner.de%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Ccca9ff6f4b2b4a32e61308d55680514e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636510031494207475&sdata=%2BWGJXq6S7IrWJzsYIZWdk%2BDa%2BSLtW8CfCiPHitgnArc%3D&reserved=0>
_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01%7Csimonpj%40microsoft.com%7Ccca9ff6f4b2b4a32e61308d55680514e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636510031494207475&sdata=L7reldRrJzSuxRhDTFUgNoy8zXHEbW96rqY8TpUeHxI%3D&reserved=0>

_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01%7Csimonpj%40microsoft.com%7Ccca9ff6f4b2b4a32e61308d55680514e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636510031494207475&sdata=L7reldRrJzSuxRhDTFUgNoy8zXHEbW96rqY8TpUeHxI%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180108/f0fdd103/attachment.html>


More information about the ghc-devs mailing list