Ryan Scott
Ryan Scott
This is most likely a consequence of two historical coincidences: 1. This code was first written before pattern synonyms were a thing. At the time, any use of view patterns...
Ah, great point! For some reason, I had it in my mind that the thing to the left of the `->` had to be a bare function name, but we...
It occurs to me that this approach could also resolve another restriction that `th-desugar` imposes on pattern synonyms. Currently, you [can't desugar a pattern synonym](https://github.com/goldfirere/th-desugar/blob/92c07bd88b74efae0d1b6b7bb5d52049723a009a/Language/Haskell/TH/Desugar/Core.hs#L752) where the right-hand side contains...
> It's a shame that th-desugar doesn't use lambdacase to replace `DCaseE` and `DLamE`; lambdacase seems like the more "distilled" construct. I guess the ship has sailed on this though.....
#211 implemented partial support for invisible type patterns. You can now desugar invisible type patterns in function clauses, but not in lambda expressions or `\cases` expressions. I've retitled this issue...
See [`Note [Fixity declarations for defunctionalization symbols]`](https://github.com/goldfirere/singletons/blob/2a604585d637d52256c31e1d4eee0c4d7150b7ef/singletons-th/src/Data/Singletons/TH/Promote/Defun.hs#L807-L826).
A minor correction to my original proposal: we can't get rid of [`Wrinkle 1: When not to promote/single fixity declarations`](https://github.com/goldfirere/singletons/blob/2a604585d637d52256c31e1d4eee0c4d7150b7ef/singletons-th/src/Data/Singletons/TH/Single/Fixity.hs#L103-L116) of `Note [singletons-th and fixity declarations]` just yet. I wrote...
If I understand this issue correctly, the difference comes down to how as-patterns are desugared in the `PatM` instances for `PatWithExp` and `PatWithCases`. In the instance for `PatWithExp`, we have:...
Well spotted. But perhaps the issue is that we are trying to desugar patterns in `do` notation the same way that we are trying to desugar `let` bindings. For `let`...
One thing that may not be evident from the wall of text in https://github.com/goldfirere/singletons/issues/378#issue-399023570 is that fixing this issue can be divided into three relatively self-contained chunks: 1. Change singling...