Add synonyms (:|), (<|) for NonEmpty. Reimplement show with synonym.#22460
Add synonyms (:|), (<|) for NonEmpty. Reimplement show with synonym.#22460yangzai wants to merge 1 commit intodigital-asset:mainfrom
Conversation
|
|
||
| -- | Apply a function over each element in the non-empty list. | ||
| map : (a -> b) -> NonEmpty a -> NonEmpty b | ||
| map f ne = NonEmpty (f ne.hd) (P.map f ne.tl) |
There was a problem hiding this comment.
Record dot preprocessor disabled.
|
Hi! Thanks for the contribution, you're correct that the failure reason is missing pattern synonym support over data-dependencies. I'll be finishing up #22421 ideally at the start of 2026, but put no promises on it. |
No worries, I'm just experimenting with the implementation as well. |
604bf34 to
e4ed181
Compare
|
I realised my initial implementation of pattern synonym support for data-deps doesn't cover infix synonyms, which will likely give you trouble as well. I'll update it to handle this in the new year. |
This is currently broken, probably because of #20481 #22421 .