diff --git a/compiler/src/formatting/fmt.re b/compiler/src/formatting/fmt.re index e5c2293fd..0d2fe4789 100644 --- a/compiler/src/formatting/fmt.re +++ b/compiler/src/formatting/fmt.re @@ -875,7 +875,13 @@ let print_ident_string = (fmt, ident) => }; let print_identifier = (fmt, ident) => { - fmt.print_ident_string(fmt, Identifier.string_of_ident(ident)); + switch (ident) { + | Identifier.IdentName({txt: ident}) => fmt.print_ident_string(fmt, ident) + | IdentExternal(mod_, {txt: ident}) => + fmt.print_identifier(fmt, mod_) + ++ string(".") + ++ fmt.print_ident_string(fmt, ident) + }; }; let print_punnable_expression = (fmt, ({txt: ident, loc: ident_loc}, expr)) => { diff --git a/compiler/test/grainfmt/application.expected.gr b/compiler/test/grainfmt/application.expected.gr index 13ff2e6a0..a80686875 100644 --- a/compiler/test/grainfmt/application.expected.gr +++ b/compiler/test/grainfmt/application.expected.gr @@ -83,3 +83,5 @@ let preExistingObjectsWithRefCountMismatch2 = Map.make(): Number ) > + +Int32.(-)(1l, 2l) diff --git a/compiler/test/grainfmt/application.input.gr b/compiler/test/grainfmt/application.input.gr index 2124f8d5f..84935187c 100644 --- a/compiler/test/grainfmt/application.input.gr +++ b/compiler/test/grainfmt/application.input.gr @@ -50,3 +50,5 @@ let preEmatch = Map.make(): (Map.Map) let preExistingObjectsch2 = Map.make(): (Map.Map) let preExistingObjectsWithRefCountMismatch2 = Map.make(): (Map.Map) + +Int32.(-)(1l, 2l)