fsharp-formatting-conventions
fsharp-formatting-conventions copied to clipboard
Many lambda parameters
What would happen in the following code snippet?
module MyModule =
let foo: Foo -> Foo =
BigLongTypee.doStuff<aaaaaaaaaaaaa, bbbbbb, BigLongTypee> (fun aaa bbbbbb (CCC ccc) ddddddddddd (EEEE eee) (FFF fff) ggggg ->
failwith "Not important"
)
Sorry, I completely missed this!
With a sufficiently short line length, I think the following:
let foo : Foo -> Foo =
BigLongTypee.doStuff<
aaaaaaaaaaaaa,
bbbbbb,
BigLongTypee
>
(fun aaa
bbbbbb
(CCC ccc)
ddddddddddd
(EEEE eee)
(FFF fff)
ggggg
->
failwith "Not important"
)
The very last thing to break over lines is the generic type parameters, ideally; they only break if they absolutely must.
I haven't discussed this with the team yet, though, so this is not totally certain. It never really comes up.