Skip to content

Commit 65596c4

Browse files
committed
HB.instance: improve error message when declaring local builder
1 parent c10a7f6 commit 65596c4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

HB/instance.elpi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,10 @@ func declare-instance factoryname, term, term
286286
declare-instance Factory T F Clauses CFL CSL :-
287287
current-mode (builder-from T TheFactory FGR _), !,
288288
if (get-option "local" tt)
289-
(coq.error "HB: declare-instance: cannot make builders local.
290-
If you want temporary instances, make an alias, e.g. with let T' := T") true,
289+
(coq.error "HB:" "declare-instance: cannot make builders local."
290+
{ calc ("If you want temporary instances, make an alias, e.g. with let " ^ { coq.term->string T } ^ "' := " ^ { coq.term->string T } ) }
291+
)
292+
true,
291293
!,
292294
declare-canonical-instances-from-factory-and-local-builders Factory
293295
T F TheFactory FGR Clauses CFL CSL.

0 commit comments

Comments
 (0)