Skip to content

Commit 529e206

Browse files
authored
Merge pull request rescript-lang#387 from rescript-lang/not_display_external_garbage
not display external garbage
2 parents 6f59dba + fab2d7d commit 529e206

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

syntax/src/res_outcome_printer.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,10 @@ let printPolyVarIdent txt =
598598
Doc.text " =";
599599
Doc.line;
600600
Doc.group (
601-
Doc.join ~sep:Doc.line (List.map (fun prim -> Doc.text ("\"" ^ prim ^ "\"")) primitives)
601+
Doc.join ~sep:Doc.line (List.map (fun prim ->
602+
let prim = if prim <> "" && prim.[0] = '\132' then "#rescript-external" else prim in
603+
(* not display those garbage '\132' is a magic number for marshal *)
604+
Doc.text ("\"" ^ prim ^ "\"")) primitives)
602605
)
603606
]
604607
)

0 commit comments

Comments
 (0)