diff --git a/src/passes/4-typer-new/typer.ml b/src/passes/4-typer-new/typer.ml index ea607c505..e6848c232 100644 --- a/src/passes/4-typer-new/typer.ml +++ b/src/passes/4-typer-new/typer.ml @@ -23,11 +23,11 @@ module Errors = struct error ~data title message () let unbound_variable (e:environment) (n:I.expression_variable) (loc:Location.t) () = - let name = Format.asprintf "%a" Stage_common.PP.name n in - let title = (thunk ("unbound variable "^name)) in + let name () = Format.asprintf "%a" Stage_common.PP.name n in + let title = (thunk ("unbound variable "^(name ()))) in let message () = "" in let data = [ - ("variable" , fun () -> name) ; + ("variable" , name) ; ("environment" , fun () -> Format.asprintf "%a" Environment.PP.full_environment e) ; ("location" , fun () -> Format.asprintf "%a" Location.pp loc) ] in diff --git a/src/passes/4-typer-old/typer.ml b/src/passes/4-typer-old/typer.ml index ff0ef2fe9..20b54514b 100644 --- a/src/passes/4-typer-old/typer.ml +++ b/src/passes/4-typer-old/typer.ml @@ -30,11 +30,11 @@ module Errors = struct error ~data title message () let unbound_variable (e:environment) (n:I.expression_variable) (loc:Location.t) () = - let name = Format.asprintf "%a" Stage_common.PP.name n in - let title = (thunk ("unbound variable "^name)) in + let name () = Format.asprintf "%a" Stage_common.PP.name n in + let title = (thunk ("unbound variable "^(name ()))) in let message () = "" in let data = [ - ("variable" , fun () -> name) ; + ("variable" , name) ; ("environment" , fun () -> Format.asprintf "%a" Environment.PP.full_environment e) ; ("location" , fun () -> Format.asprintf "%a" Location.pp loc) ] in