Help needed: Restrictions of proc-notation with RebindableSyntax

Richard Eisenberg rae at cs.brynmawr.edu
Mon Dec 19 03:08:27 UTC 2016


> On Dec 17, 2016, at 9:19 AM, Ross Paterson <R.Paterson at city.ac.uk> wrote:
> 
> On Tue, Nov 29, 2016 at 12:41:53PM +0000, Simon Peyton Jones wrote:
>> 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.
> 
> HsCmd was split from HsExpr in 2012.  It still re-uses MatchGroup, Stmt,
> etc, though.
> 
> The desugaring is made more complicated by doing a lot of analysis that
> might be better done in the renamer.

And -- unrelated to the original post in this thread -- these complications in desugarer (specifically, the use of fixM) are making my incoming levity-polymorphism update much harder (see https://phabricator.haskell.org/D2852). Even if you don't have time to make the edits yourself, if you could give a 10,000 ft view as to how to remove fixM from the desugarer, I'd be very grateful. I've not looked deeply at this, mostly because it's hard for me to make anything but very local changes to code I don't understand.

Thanks!
Richard


More information about the ghc-devs mailing list