Pattern synonyms for 7.8?

Hi, When I started working on pattern synonyms (#5144) back in August, it seemed the GHC 7.8 freeze was imminent, so I was planning for a first version in 7.10/8.0 (whatever it will be called). However, since not much has happened re: 7.8 since then (at least not much publicly visible), and on the other hand, my implementation of pattern synonyms is ready, I am now starting to wonder if it could be squeezed into 7.8. What are your thoughts on this? Thanks, Gergo

| When I started working on pattern synonyms (#5144) back in August, it | seemed the GHC 7.8 freeze was imminent, so I was planning for a first | version in 7.10/8.0 (whatever it will be called). However, since not | much has happened re: 7.8 since then (at least not much publicly | visible), and on the other hand, my implementation of pattern synonyms | is ready, I am now starting to wonder if it could be squeezed into 7.8. | What are your thoughts on this? I'd be interested in others' thoughts on this. Because the implementation is now pretty solid, it's mostly a non-technical question. Is it better to include a feature in the release whose design might change a bit in the light of experience, or to put it only in HEAD for a while? We could put it in the release with warnings saying "the exact details, esp of syntax, might change, but do try it". I'd be ok with that, and we've done it before. What do other people think? Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Dr. | ERDI Gergo | Sent: 05 January 2014 12:16 | To: GHC Devs | Subject: Pattern synonyms for 7.8? | | Hi, | | When I started working on pattern synonyms (#5144) back in August, it | seemed the GHC 7.8 freeze was imminent, so I was planning for a first | version in 7.10/8.0 (whatever it will be called). However, since not | much has happened re: 7.8 since then (at least not much publicly | visible), and on the other hand, my implementation of pattern synonyms | is ready, I am now starting to wonder if it could be squeezed into 7.8. | What are your thoughts on this? | | Thanks, | Gergo | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs

On 1/6/14, Simon Peyton-Jones
| When I started working on pattern synonyms (#5144) back in August, it | seemed the GHC 7.8 freeze was imminent, so I was planning for a first | version in 7.10/8.0 (whatever it will be called). However, since not | much has happened re: 7.8 since then (at least not much publicly | visible), and on the other hand, my implementation of pattern synonyms | is ready, I am now starting to wonder if it could be squeezed into 7.8. | What are your thoughts on this?
I'd be interested in others' thoughts on this. Because the implementation is now pretty solid, it's mostly a non-technical question. Is it better to include a feature in the release whose design might change a bit in the light of experience, or to put it only in HEAD for a while?
We could put it in the release with warnings saying "the exact details, esp of syntax, might change, but do try it". I'd be ok with that, and we've done it before.
What do other people think?
As long as the code additions dont't carry the danger of bugs in the solid areas, I'd second this motion. I'd love to start playing around with pattern synonyms. Cheers, Gabor
Simon
| -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Dr. | ERDI Gergo | Sent: 05 January 2014 12:16 | To: GHC Devs | Subject: Pattern synonyms for 7.8? | | Hi, | | When I started working on pattern synonyms (#5144) back in August, it | seemed the GHC 7.8 freeze was imminent, so I was planning for a first | version in 7.10/8.0 (whatever it will be called). However, since not | much has happened re: 7.8 since then (at least not much publicly | visible), and on the other hand, my implementation of pattern synonyms | is ready, I am now starting to wonder if it could be squeezed into 7.8. | What are your thoughts on this? | | Thanks, | Gergo | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

| > What do other people think? | | As long as the code additions dont't carry the danger of bugs in the | solid areas, I'd second this motion. I'd love to start playing around | with pattern synonyms. Significant changes *always* carry the risk of bugs in solid areas. But compiling Hackage (which I hope someone will try with the 7.8 RC) should flush most of them out. Simon | | Cheers, | | Gabor | | > | > Simon | > | > | -----Original Message----- | > | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of | Dr. | > | ERDI Gergo | > | Sent: 05 January 2014 12:16 | > | To: GHC Devs | > | Subject: Pattern synonyms for 7.8? | > | | > | Hi, | > | | > | When I started working on pattern synonyms (#5144) back in August, | > | it seemed the GHC 7.8 freeze was imminent, so I was planning for a | > | first version in 7.10/8.0 (whatever it will be called). However, | > | since not much has happened re: 7.8 since then (at least not much | > | publicly visible), and on the other hand, my implementation of | > | pattern synonyms is ready, I am now starting to wonder if it could | be squeezed into 7.8. | > | What are your thoughts on this? | > | | > | Thanks, | > | Gergo | > | _______________________________________________ | > | ghc-devs mailing list | > | ghc-devs@haskell.org | > | http://www.haskell.org/mailman/listinfo/ghc-devs | > _______________________________________________ | > ghc-devs mailing list | > ghc-devs@haskell.org | > http://www.haskell.org/mailman/listinfo/ghc-devs | >

Hi, Am Montag, den 06.01.2014, 12:42 +0000 schrieb Simon Peyton-Jones:
We could put it in the release with warnings saying "the exact details, esp of syntax, might change, but do try it". I'd be ok with that, and we've done it before.
What do other people think?
This feature may be so good that people will use it in, say, released libraries, disregarding the warning. But it seems that any possible syntax change will only affect those who define pattern synonyms, and not those who use them, and hence only cause work for those disregarding the warning, I’m in favor of inclusion. Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org

+1 for inclusion. This is a nicely opt-in feature, and so (barring any regressions) only those intrepid people who want it will be affected. Richard On Jan 6, 2014, at 8:17 AM, Joachim Breitner wrote:
Hi,
Am Montag, den 06.01.2014, 12:42 +0000 schrieb Simon Peyton-Jones:
We could put it in the release with warnings saying "the exact details, esp of syntax, might change, but do try it". I'd be ok with that, and we've done it before.
What do other people think?
This feature may be so good that people will use it in, say, released libraries, disregarding the warning.
But it seems that any possible syntax change will only affect those who define pattern synonyms, and not those who use them, and hence only cause work for those disregarding the warning, I’m in favor of inclusion.
Greetings, Joachim
-- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

as long as we clearly communicate that there may be refinements / breaking
changes subsequently, i'm all for it, unless merging it in slows down 7.8
hitting RC . (its taken long enough for RC to happen... don't want to drag
it out further)
On Mon, Jan 6, 2014 at 3:32 PM, Richard Eisenberg
+1 for inclusion. This is a nicely opt-in feature, and so (barring any regressions) only those intrepid people who want it will be affected.
Richard
On Jan 6, 2014, at 8:17 AM, Joachim Breitner wrote:
Hi,
Am Montag, den 06.01.2014, 12:42 +0000 schrieb Simon Peyton-Jones:
We could put it in the release with warnings saying "the exact details, esp of syntax, might change, but do try it". I'd be ok with that, and we've done it before.
What do other people think?
This feature may be so good that people will use it in, say, released libraries, disregarding the warning.
But it seems that any possible syntax change will only affect those who define pattern synonyms, and not those who use them, and hence only cause work for those disregarding the warning, I’m in favor of inclusion.
Greetings, Joachim
-- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

On Mon, 6 Jan 2014, Carter Schonwald wrote:
as long as we clearly communicate that there may be refinements / breaking changes subsequently, i'm all for it, unless merging it in slows down 7.8 hitting RC . (its taken long enough for RC to happen... don't want to drag it out further)
If that helps, I've updated the version at https://github.com/gergoerdi/ghc (and the two sister repos https://github.com/gergoerdi/ghc-testsuite and https://github.com/gergoerdi/ghc-haddock) to be based on top of master as of today. Bye, Gergo -- .--= ULLA! =-----------------. \ http://gergo.erdi.hu \ `---= gergo@erdi.hu =-------' Elvis is dead and I don't feel so good either.

Hi Erdi,
After talking with Simon today, we indeed think this can make it into 7.8.
I'll go ahead and try to do it today. Thanks for rebasing all your
patches - it'll make it much easier!
On Tue, Jan 7, 2014 at 5:50 AM, Dr. ERDI Gergo
On Mon, 6 Jan 2014, Carter Schonwald wrote:
as long as we clearly communicate that there may be refinements / breaking changes subsequently, i'm all for it, unless merging it in slows down 7.8 hitting RC . (its taken long enough for RC to happen... don't want to drag it out further)
If that helps, I've updated the version at https://github.com/gergoerdi/ghc (and the two sister repos https://github.com/gergoerdi/ghc-testsuite and https://github.com/gergoerdi/ghc-haddock) to be based on top of master as of today.
Bye, Gergo
--
.--= ULLA! =-----------------. \ http://gergo.erdi.hu \ `---= gergo@erdi.hu =-------' Elvis is dead and I don't feel so good either. _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/

Thanks everyone for putting the effort in on this. I'm looking forward to
this extension!
... And I acknowledge all of the "caveat emptor"-s :)
On Tue, Jan 7, 2014 at 10:11 AM, Austin Seipp
Hi Erdi,
After talking with Simon today, we indeed think this can make it into 7.8.
I'll go ahead and try to do it today. Thanks for rebasing all your patches - it'll make it much easier!
On Tue, Jan 7, 2014 at 5:50 AM, Dr. ERDI Gergo
wrote: On Mon, 6 Jan 2014, Carter Schonwald wrote:
as long as we clearly communicate that there may be refinements / breaking changes subsequently, i'm all for it, unless merging it in slows down 7.8 hitting RC . (its taken long enough for RC to happen... don't want to drag it out further)
If that helps, I've updated the version at https://github.com/gergoerdi/ghc (and the two sister repos https://github.com/gergoerdi/ghc-testsuite and https://github.com/gergoerdi/ghc-haddock) to be based on top of master as of today.
Bye, Gergo
--
.--= ULLA! =-----------------. \ http://gergo.erdi.hu \ `---= gergo@erdi.hu =-------' Elvis is dead and I don't feel so good either. _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Regards,
Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

BTW, Gergo, did you write user-manual documentation? I think so, but if not we need it!
S
| -----Original Message-----
| From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Austin
| Seipp
| Sent: 07 January 2014 16:11
| To: Dr. ERDI Gergo
| Cc: Joachim Breitner; ghc-devs@haskell.org
| Subject: Re: Pattern synonyms for 7.8?
|
| Hi Erdi,
|
| After talking with Simon today, we indeed think this can make it into
| 7.8.
|
| I'll go ahead and try to do it today. Thanks for rebasing all your
| patches - it'll make it much easier!
|
|
|
| On Tue, Jan 7, 2014 at 5:50 AM, Dr. ERDI Gergo

Btw if new haddock gets merged in, the pattern synonym support has to get upstreamed right? On Tuesday, January 7, 2014, Simon Peyton Jones wrote:
BTW, Gergo, did you write user-manual documentation? I think so, but if not we need it!
S
| -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org javascript:;] On Behalf Of Austin | Seipp | Sent: 07 January 2014 16:11 | To: Dr. ERDI Gergo | Cc: Joachim Breitner; ghc-devs@haskell.org javascript:; | Subject: Re: Pattern synonyms for 7.8? | | Hi Erdi, | | After talking with Simon today, we indeed think this can make it into | 7.8. | | I'll go ahead and try to do it today. Thanks for rebasing all your | patches - it'll make it much easier! | | | | On Tue, Jan 7, 2014 at 5:50 AM, Dr. ERDI Gergo
javascript:;> wrote: | > On Mon, 6 Jan 2014, Carter Schonwald wrote: | > | >> as long as we clearly communicate that there may be refinements / | >> breaking changes subsequently, i'm all for it, unless merging it in | >> slows down 7.8 hitting RC . (its taken long enough for RC to | >> happen... don't want to drag it out further) | > | > | > If that helps, I've updated the version at | > https://github.com/gergoerdi/ghc (and the two sister repos | > https://github.com/gergoerdi/ghc-testsuite and | > https://github.com/gergoerdi/ghc-haddock) to be based on top of master | > as of today. | > | > Bye, | > Gergo | > | > -- | > | > .--= ULLA! =-----------------. | > \ http://gergo.erdi.hu \ | > `---= gergo@erdi.hu javascript:; =-------' | > Elvis is dead and I don't feel so good either. | > _______________________________________________ | > ghc-devs mailing list | > ghc-devs@haskell.org javascript:; | > http://www.haskell.org/mailman/listinfo/ghc-devs | > | | | | -- | Regards, | | Austin Seipp, Haskell Consultant | Well-Typed LLP, http://www.well-typed.com/ | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org javascript:; | http://www.haskell.org/mailman/listinfo/ghc-devs _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org javascript:; http://www.haskell.org/mailman/listinfo/ghc-devs

On 05/01/14 12:16, Dr. ERDI Gergo wrote:
Hi,
When I started working on pattern synonyms (#5144) back in August, it seemed the GHC 7.8 freeze was imminent, so I was planning for a first version in 7.10/8.0 (whatever it will be called). However, since not much has happened re: 7.8 since then (at least not much publicly visible), and on the other hand, my implementation of pattern synonyms is ready, I am now starting to wonder if it could be squeezed into 7.8. What are your thoughts on this?
Thanks, Gergo _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Hi again, We've ran into some trouble over at #ghc regarding Haddock updates to do with PatternSynonyms. You have updated Haddock accordingly but at the same time, you haven't checked that you haven't broken it. This means that when we were trying to quickly fix a bug today, the Haddock tests came up as failing. There at least two faults that I've spotted: * Single space added in front of every function name. This isn't visible by the user but is visible by the test-suite and would require that we update every test file for no good reason. After a long while, I narrowed it down to the line “leader <+> ppTypeSig summary occnames pp_typ unicode” as it seems that ‘leader’ is empty for a lot of time and the (<+>) function adds a single space. It'd be an easy fix if it was only this but… * Data types using infix notations are now parenthesised Haddock now renders ‘data a :- b’ as ‘data a (:-) b’. This is a problem. I don't know what else is broken but I can't go on trying to fix this because you haven't added any tests for the features you put in! I have no idea what I'm breaking in PatternSynonyms when making changes. For now we have to revert some of the Haddock changes, namely the XHtml back-end stuff you added. The proposed revert is currently at [1] and will probably be put into the 7.8 RC very soon because the documentation for ‘base’ has to be generated. Please have a look and see what you can fix in the XHtml back-end for your feature. This includes making sure that the existing tests pass (you do this by running ‘cabal test’, just running validate for GHC is _not_ enough) and adding new tests for the things you add (you're going to be interested in adding test cases in html-test/src and adding the expected test results in html-test/ref). Thanks [1]: https://github.com/Fuuzetsu/haddock/tree/codeblockfix -- Mateusz K.

Hi,
Sorry, I wasn't aware running validate was not enough. I'll check out the
problems in ~10 hours.
Bye,
Gergo
On Jan 30, 2014 7:41 AM, "Mateusz Kowalczyk"
On 05/01/14 12:16, Dr. ERDI Gergo wrote:
Hi,
When I started working on pattern synonyms (#5144) back in August, it seemed the GHC 7.8 freeze was imminent, so I was planning for a first version in 7.10/8.0 (whatever it will be called). However, since not much has happened re: 7.8 since then (at least not much publicly visible), and on the other hand, my implementation of pattern synonyms is ready, I am now starting to wonder if it could be squeezed into 7.8. What are your thoughts on this?
Thanks, Gergo _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Hi again,
We've ran into some trouble over at #ghc regarding Haddock updates to do with PatternSynonyms. You have updated Haddock accordingly but at the same time, you haven't checked that you haven't broken it. This means that when we were trying to quickly fix a bug today, the Haddock tests came up as failing. There at least two faults that I've spotted:
* Single space added in front of every function name.
This isn't visible by the user but is visible by the test-suite and would require that we update every test file for no good reason. After a long while, I narrowed it down to the line "leader <+> ppTypeSig summary occnames pp_typ unicode" as it seems that 'leader' is empty for a lot of time and the (<+>) function adds a single space. It'd be an easy fix if it was only this but...
* Data types using infix notations are now parenthesised
Haddock now renders 'data a :- b' as 'data a (:-) b'. This is a problem.
I don't know what else is broken but I can't go on trying to fix this because you haven't added any tests for the features you put in! I have no idea what I'm breaking in PatternSynonyms when making changes. For now we have to revert some of the Haddock changes, namely the XHtml back-end stuff you added. The proposed revert is currently at [1] and will probably be put into the 7.8 RC very soon because the documentation for 'base' has to be generated.
Please have a look and see what you can fix in the XHtml back-end for your feature. This includes making sure that the existing tests pass (you do this by running 'cabal test', just running validate for GHC is _not_ enough) and adding new tests for the things you add (you're going to be interested in adding test cases in html-test/src and adding the expected test results in html-test/ref).
Thanks
[1]: https://github.com/Fuuzetsu/haddock/tree/codeblockfix
-- Mateusz K.
participants (11)
-
Austin Seipp
-
Carter Schonwald
-
Dr. ERDI Gergo
-
Dr. ÉRDI Gergő
-
Gabor Greif
-
Joachim Breitner
-
Mateusz Kowalczyk
-
Nicolas Frisby
-
Richard Eisenberg
-
Simon Peyton Jones
-
Simon Peyton-Jones