Help needed: Restrictions of proc-notation with RebindableSyntax

Simon Peyton Jones simonpj at microsoft.com
Fri Dec 2 16:58:06 UTC 2016


Since you suggested a rewrite of GHC's handling of proc-syntax, are there any opinions on integrating generalized arrows (Joseph 2014) in the process? I think they would greatly improve arrows! I don't know if I have the time to attempt this, but if I find the time I would give it a try. Why wasn't this integrated while it was still actively developed?

The arrow stuff was added to GHC years before this thesis (which I had not seen before – thanks).   I don’t have an opinions about

·         the desirability

·         the difficulty
of integrating generalised arrows.

You’re in the driving seat!  By all means give it a go.

Simon

From: Jan Bracker [mailto:jan.bracker at googlemail.com]
Sent: 02 December 2016 15:58
To: Simon Peyton Jones <simonpj at microsoft.com>
Cc: Richard Eisenberg <rae at cs.brynmawr.edu>; ghc-devs at haskell.org; Ross Paterson (ross at soi.city.ac.uk) <ross at soi.city.ac.uk>; Henrik Nilsson <Henrik.Nilsson at nottingham.ac.uk>
Subject: Re: Help needed: Restrictions of proc-notation with RebindableSyntax

Simon, Richard,

thank you for your answer! I don't have time to look into the GHC sources right now, but I will set aside some time after the holidays and take a close look at what the exact restrictions on proc-notation are and document them.

Since you suggested a rewrite of GHC's handling of proc-syntax, are there any opinions on integrating generalized arrows (Joseph 2014) in the process? I think they would greatly improve arrows! I don't know if I have the time to attempt this, but if I find the time I would give it a try. Why wasn't this integrated while it was still actively developed?

Best,
Jan

[Joseph 2014] https://www2.eecs.berkeley.edu/Pubs/TechRpts/2014/EECS-2014-130.pdf<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww2.eecs.berkeley.edu%2FPubs%2FTechRpts%2F2014%2FEECS-2014-130.pdf&data=02%7C01%7Csimonpj%40microsoft.com%7C0cef689885ed40a9696d08d41acbfd5f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C636162910819713326&sdata=jCrF3a%2BSoTISvzA8KzGlG8AjG5iDro5SHLQr9oO%2Bv5E%3D&reserved=0>



2016-11-29 12:41 GMT+00:00 Simon Peyton Jones <simonpj at microsoft.com<mailto:simonpj at microsoft.com>>:
Jan,

Type checking and desugaring for arrow syntax has received Absolutely No Love for several years.  I do not understand how it works very well, and I would not be at all surprised if it is broken in corner cases.

It really needs someone to look at it carefully, document it better, and perhaps refactor it – esp by using a different data type rather than piggy-backing on HsExpr.

In the light of that understanding, I think rebindable syntax will be easier.

I don’t know if you are up for that, but it’s a rather un-tended part of GHC.

Thanks

Simon

From: ghc-devs [mailto:ghc-devs-bounces at haskell.org<mailto:ghc-devs-bounces at haskell.org>] On Behalf Of Richard Eisenberg
Sent: 28 November 2016 22:30
To: Jan Bracker <jan.bracker at googlemail.com<mailto:jan.bracker at googlemail.com>>
Cc: ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
Subject: Help needed: Restrictions of proc-notation with RebindableSyntax

Jan’s question is a good one, but I don’t know enough about procs to be able to answer. I do know that the answer can be found by looking for uses of `tcSyntaxOp` in the TcArrows module.... but I just can’t translate it all to source Haskell, having roughly 0 understanding of this end of the language.

Can anyone else help Jan here?

Richard

On Nov 23, 2016, at 4:34 AM, Jan Bracker via ghc-devs <ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>> wrote:

Hello,

I want to use the proc-notation together with RebindableSyntax. So far what I am trying to do is working fine, but I would like to know what the exact restrictions on the supplied functions are. I am introducing additional indices and constraints on the operations. The documentation [1] says the details are in flux and that I should ask directly.

Best,
Jan

[1] https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#rebindable-syntax-and-the-implicit-prelude-import<https://na01.safelinks.protection.outlook.com/?url=https:%2F%2Fdownloads.haskell.org%2F~ghc%2Flatest%2Fdocs%2Fhtml%2Fusers_guide%2Fglasgow_exts.html%23rebindable-syntax-and-the-implicit-prelude-import&data=02%7C01%7Csimonpj%40microsoft.com%7C80e472cedf78463bd18408d417de1af5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636159690104764444&sdata=ygqePSmgcPKnPmKDBfZplkyjG9BIDBO1L1MWHNpqw88%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%7C0cef689885ed40a9696d08d41acbfd5f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636162910819713326&sdata=Mj7yhWsfRtRjn9KxJjjQ6sxNC2b8EPC%2BptKUXh3uVYQ%3D&reserved=0>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20161202/3249c1e5/attachment-0001.html>


More information about the ghc-devs mailing list