diff --git a/src/Fantomas.Tests/SignatureTests.fs b/src/Fantomas.Tests/SignatureTests.fs index 5c683b1eab..bc645c0182 100644 --- a/src/Fantomas.Tests/SignatureTests.fs +++ b/src/Fantomas.Tests/SignatureTests.fs @@ -1620,6 +1620,25 @@ type Foo = static member Baz: int """ +[] +let ``mod name in val, 1960`` () = + formatSourceString + true + """ +module X + +val ``mod``: t -> t -> t +""" + config + |> prepend newline + |> should + equal + """ +module X + +val ``mod``: t -> t -> t +""" + [] let ``literals in signatures, 1953`` () = formatSourceString diff --git a/src/Fantomas/SourceParser.fs b/src/Fantomas/SourceParser.fs index 91f24c8403..024e330d2a 100644 --- a/src/Fantomas/SourceParser.fs +++ b/src/Fantomas/SourceParser.fs @@ -35,6 +35,7 @@ let (|Ident|) (s: Ident) = | "not" -> "not" | "params" -> "``params``" | "parallel" -> "``parallel``" + | "mod" -> "``mod``" | _ -> if IsActivePatternName ident then sprintf "(%s)" (DecompileOpName ident)