Issue created from fantomas-online
Code
type some_delegate = delegate of Func<int, int> * Guid * string * Func<Func<int, int>, int> -> Func<Func<int, int>, string, string>
Result
type some_delegate = delegate of Func<int, int> * Guid * string * Func<Func<int, int>, int> ->
Func<Func<int, int>, string, string>
Problem description
In the example here I used some nonsense delegate just to illustrate the issue. It happens whenever the delegate definition is too wide. The result is non-compilable.
As a workaround I just place these definitions (I have a bunch of them) in a separate file and ignore it. I know delegates aren't really used that much in F# anyway.
Btw, tbh, I don't really know what a "best practice" format is for delegates, but I think the easiest fix would be to simply not format them at all. Alternatively, something like this works:
type some_delegate = delegate of
Func<int, int> * Guid * string * Func<Func<int, int>, int> ->
Func<Func<int, int>, string, string>
Another way would be this:
type some_delegate =
delegate of
Func<int, int> * Guid * string * Func<Func<int, int>, int> ->
Func<Func<int, int>, string, string>
Extra information
Options
Fantomas master branch at 2022-08-31T07:53:05Z - 0981dfe
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
Issue created from fantomas-online
Code
Result
Problem description
In the example here I used some nonsense
delegatejust to illustrate the issue. It happens whenever the delegate definition is too wide. The result is non-compilable.As a workaround I just place these definitions (I have a bunch of them) in a separate file and ignore it. I know delegates aren't really used that much in F# anyway.
Btw, tbh, I don't really know what a "best practice" format is for delegates, but I think the easiest fix would be to simply not format them at all. Alternatively, something like this works:
Another way would be this:
Extra information
warningserrors.Options
Fantomas master branch at 2022-08-31T07:53:05Z - 0981dfe
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?