<div dir="ltr"><div style="color:rgb(214,222,235);background-color:rgb(1,22,39);font-family:Hasklig,"Fira Code",Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre"><div>Proposal: Amend or patterns (#522) to use p1 ; p2 (#609)</div><div>Author: Sebastian Graf, David Knothe</div><div>Rendered proposal: <a href="https://github.com/ghc-proposals/ghc-proposals/blob/eb4b67c29282520b2c5c6a49c3047dbecb15dde1/proposals/0522-or-patterns.rst">https://github.com/ghc-proposals/ghc-proposals/blob/eb4b67c29282520b2c5c6a49c3047dbecb15dde1/proposals/0522-or-patterns.rst</a></div><div>Discussion: <a href="https://github.com/ghc-proposals/ghc-proposals/pull/609">https://github.com/ghc-proposals/ghc-proposals/pull/609</a></div><div>Recommendation: Acceptance</div><br><div><span style="color:rgb(130,177,255)">## Summary</span></div><br><div>This proposal refines the syntax of an already accpted proposal (#522) for writing or patterns.</div><br><div>The syntax of the old proposal,</div><br><div>```haskell</div><div>    <span style="color:rgb(130,170,255);font-style:italic">stringOfT</span> <span style="color:rgb(127,219,202)">::</span> <span style="color:rgb(199,146,234)">T</span> <span style="color:rgb(127,219,202)">-></span> <span style="color:rgb(199,146,234)">Maybe</span> <span style="color:rgb(199,146,234)">String</span></div><div>    stringOfT (<span style="color:rgb(130,170,255)">T1</span> s)              <span style="color:rgb(127,219,202)">=</span> <span style="color:rgb(130,170,255)">Just</span> s</div><div>    stringOfT (one <span style="color:rgb(199,146,234);font-style:italic">of</span> <span style="color:rgb(130,170,255)">T2</span>{}, <span style="color:rgb(130,170,255)">T3</span>{}) <span style="color:rgb(127,219,202)">=</span> <span style="color:rgb(130,170,255)">Nothing</span></div><div>```</div><br><div>is replaced with</div><br><div>```haskell</div><div>    <span style="color:rgb(130,170,255);font-style:italic">stringOfT</span> <span style="color:rgb(127,219,202)">::</span> <span style="color:rgb(199,146,234)">T</span> <span style="color:rgb(127,219,202)">-></span> <span style="color:rgb(199,146,234)">Maybe</span> <span style="color:rgb(199,146,234)">String</span></div><div>    stringOfT (<span style="color:rgb(130,170,255)">T1</span> s)       <span style="color:rgb(127,219,202)">=</span> <span style="color:rgb(130,170,255)">Just</span> s</div><div>    stringOfT (<span style="color:rgb(130,170,255)">T2</span>{}; <span style="color:rgb(130,170,255)">T3</span>{}) <span style="color:rgb(127,219,202)">=</span> <span style="color:rgb(130,170,255)">Nothing</span></div><div>```</div><br><div>or indeed</div><br><div>```haskell</div><div>    <span style="color:rgb(130,170,255);font-style:italic">stringOfT</span> <span style="color:rgb(127,219,202)">::</span> <span style="color:rgb(199,146,234)">T</span> <span style="color:rgb(127,219,202)">-></span> <span style="color:rgb(199,146,234)">Maybe</span> <span style="color:rgb(199,146,234)">String</span></div><div>    stringOfT x <span style="color:rgb(127,219,202)">=</span> <span style="color:rgb(199,146,234);font-style:italic">case</span> x <span style="color:rgb(199,146,234);font-style:italic">of</span></div><div>      <span style="color:rgb(130,170,255)">T1</span> s <span style="color:rgb(127,219,202)">-></span> <span style="color:rgb(130,170,255)">Just</span> s</div><div>      <span style="color:rgb(130,170,255)">T2</span>{}</div><div>      <span style="color:rgb(130,170,255)">T3</span>{} <span style="color:rgb(127,219,202)">-></span> <span style="color:rgb(130,170,255)">Nothing</span></div><div>```</div><br><div>(Beacuse the '(' ... ')' are optional here, we can remove them and naturally exploit layout.)</div><br><div>The authors have conducted polls to see what folks preferred, landing on this proposal. The</div><div>adjustments to the Haskell grammar are really quite minimal requiring one extra production.</div><br><div><span style="color:rgb(130,177,255)">## Recommendation</span></div><br><div>The proposal is nondiruptive and as a whole addresses an important practical topic. I recommend</div><div>that we accept it</div><br></div></div>