Issue created from fantomas-online
Code
exception MyError = System.Exception
Result
Problem description
An exception abbreviation loses its right-hand side: exception MyError = System.Exception formats to exception MyError, which declares a new exception instead of an abbreviation. The result is valid F#, so nothing flags the change.
The same happens in a signature file. It fails on 7.0.5, 8.0.5 and main.
ASTTransformer seems to skip the abbreviated name that SynExceptionDefnRepr carries.
Found while writing tests for exception declarations.
Extra information
Options
Fantomas main branch at 2026-10-01T08:59:20Z - 6e286d1
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file?
PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.
Issue created from fantomas-online
Code
Result
exception MyErrorProblem description
An exception abbreviation loses its right-hand side:
exception MyError = System.Exceptionformats toexception MyError, which declares a new exception instead of an abbreviation. The result is valid F#, so nothing flags the change.The same happens in a signature file. It fails on 7.0.5, 8.0.5 and main.
ASTTransformerseems to skip the abbreviated name thatSynExceptionDefnReprcarries.Found while writing tests for exception declarations.
Extra information
Options
Fantomas main branch at 2026-10-01T08:59:20Z - 6e286d1
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file?
PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.