You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
moduleFoo =letprivateBlah()=letapplied,errors =
things
|> Seq.choose (fun r ->
Map.tryFind r otherStuff
|> Option.map (fun s ->letresult,output = execute s
if result.LaunchSuccess && result.ExitCode =0then Ok r elseif result.ExitCode =1thenletstdout,stderr = output |> List.map (function| StdErr e -> Error e | StdOut l -> Ok l)|> Result.partition
ifnot stderr.IsEmpty then
failwithf "Got stderr bad bad bad"match stdout with|[]->
failwithf "Got no stdout :("| xs when xs |> List.exists (fun i -> i.Contains "magic string goes here!")->
Error (Ok r)|_-> Error (Error r)else
failwith ""))
failwith ""
Output
moduleFoo =letprivateBlah()=letapplied,errors =
things
|> Seq.choose (fun r ->
Map.tryFind r otherStuff
|> Option.map (fun s ->letresult,output = execute s
if result.LaunchSuccess && result.ExitCode =0then
Ok r
elseif result.ExitCode =1thenletstdout,stderr =
output
|> List.map
(function| StdErr e -> Error e
| StdOut l -> Ok l)|> Result.partition
ifnot stderr.IsEmpty then
failwithf "Got stderr bad bad bad"match stdout with|[]-> failwithf "Got no stdout :("| xs when
xs
|> List.exists (fun i -> i.Contains "magic string goes here!")->
Error (Ok r)|_-> Error (Error r)else
failwith ""))
failwith ""
Reformatted output
moduleFoo =letprivateBlah()=letapplied,errors =
things
|> Seq.choose (fun r ->
Map.tryFind r otherStuff
|> Option.map (fun s ->letresult,output = execute s
if result.LaunchSuccess && result.ExitCode =0then
Ok r
elseif result.ExitCode =1thenletstdout,stderr =
output
|> List.map
(function| StdErr e -> Error e
| StdOut l -> Ok l)|> Result.partition
ifnot stderr.IsEmpty then
failwithf "Got stderr bad bad bad"match stdout with|[]-> failwithf "Got no stdout :("| xs when
xs
|> List.exists (fun i -> i.Contains "magic string goes here!")->
Error (Ok r)|_-> Error (Error r)else
failwith ""))
failwith ""
Notice that we've split an else if over another line. (But the reformatted version does correctly unindent the body of the else, so that's something!)
Just so we are on the same page, based on the input I would expect fsharp_keep_indent_in_branch not to be in play here right?
As the long else if is well not the else branch so it shouldn't match the shape right?
Too big for GitHub's query string, sorry.
Input
Output
Reformatted output
Notice that we've split an
else if
over another line. (But the reformatted version does correctly unindent the body of theelse
, so that's something!)Settings
The text was updated successfully, but these errors were encountered: