diff options
Diffstat (limited to 'discocaml/draw_tree.ml')
-rw-r--r-- | discocaml/draw_tree.ml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/discocaml/draw_tree.ml b/discocaml/draw_tree.ml index 685ef52..005633f 100644 --- a/discocaml/draw_tree.ml +++ b/discocaml/draw_tree.ml @@ -12,11 +12,19 @@ let add_node (fmt : Format.formatter) (i : expr index) (expr : expr) : unit = Format.fprintf fmt " expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"::\"];\n" i.index - | If (_, _, _) -> Format.fprintf fmt " expr%d [label=\"if\"];\n" i.index + | If (_, _, _) -> + Format.fprintf fmt + " expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"if\"];\n" + i.index | Int n -> Format.fprintf fmt " expr%d [label=\"%d\"];\n" i.index n - | Lam _ -> Format.fprintf fmt " expr%d [label=\"λ\"];\n" i.index + | Lam _ -> + Format.fprintf fmt + " expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"λ\"];\n" + i.index | Let (recursive, _, _, _) -> - Format.fprintf fmt " expr%d [label=\"%s\"];\n" i.index + Format.fprintf fmt + " expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"%s\"];\n" + i.index (if recursive then "letrec" else "let") | Nil -> Format.fprintf fmt |