What match does the indentation rule play here?
This is a combination of indentation matchand a special case for operators.
First, underneath match, the body of each case can begin as far as possible from the vertical line. For example, this works:
match 5 with
| x ->
"some value"
Secondly, there is a special offset rule for operators that appear at the beginning of a new line: such operators can be located to the left of the previous line to the width of the operator plus one, For example, they all work the same way:
let x =
"abc"
|> printf "%s"
let y =
"abc"
|> printf "%s"
let z =
"abc"
|> printf "%s"
, match printfn, .
"value is non-negative" , , printfn .
match 5 with
| k when k < 0 ->
"value is negative"
| k ->
"value is non-negative"
|> printfn "%s"
5 , .
