Hi community,
as syntax is contentious a topic as ever, David (the main proposal author) and I would like to invite you to give your input on Amend #522 by knothed · Pull Request #585 · ghc-proposals/ghc-proposals · GitHub, where we propose to change the syntax of the accepted proposal #522 introducing Or patterns. In particular, we’d like to know
- Whether you like the syntax
((one of 1,2,3), 4)
in the original proposal better than the amended one mirroringcase of
:(one of {1;2;3},4)
- Whether you like that it is subject to layout, similar to
case of
, e.g.,
Which looks kind of funny here, but perhaps has foreseen use cases.f (one of 1 2 3) = 4
- Whether you think it’s good or bad to allow
f (one of {})
(with layout justf (one of)
, even), and whether the semantics should be a strict match (mirroringcase x of {}
) or lazy (likecase x of _ -> ...
) - If you have experience with writing tools for GHC Haskell, whether mirroring
case of
syntax poses new problems for you, especially caused by it being subject to layout rules
(Note that we understand that you might not like either syntax. That is fine, but the linked proposal thread is not the place to have that discussion. In all honesty, the syntactic appearance is not why we like Or patterns, rather the opposite.)
Thank you!