Skip to content
  • Simon Marlow's avatar
    Add layout to MultiWayIf (#7783) · aab65608
    Simon Marlow authored
    This makes it possible to write
    
    x = if | False -> if | False -> 1
                         | False -> 2
           | True -> 3
    
    Layout normally inserts semicolons between declarations at the same
    indentation level, so I added optional semicolons to the syntax for
    guards in MultiWayIf syntax.  This is a bit of a hack, but the
    alternative (a special kind of layout that doesn't insert semicolons)
    seemed worse, or at least equally bad.
    aab65608