fix write_canonical of $VAR(_).

This commit is contained in:
Vítor Santos Costa
2012-03-15 22:19:48 +00:00
parent f2782cc274
commit 0c1eb1d642
13 changed files with 28 additions and 4 deletions

View File

@@ -490,9 +490,15 @@ pl_write_canonical2(term_t stream, term_t term)
options.functor = FUNCTOR_isovar1;
options.on_attvar = AV_SKIP;
options.singletons = TRUE;
#if __YAP_PROLOG__
LOCAL_FunctorVar = FunctorHiddenVar;
#endif
numberVars(term, &options, 0 PASS_LD);
rc = do_write2(stream, term,
PL_WRT_QUOTED|PL_WRT_IGNOREOPS|PL_WRT_NUMBERVARS);
#if __YAP_PROLOG__
LOCAL_FunctorVar = FunctorVar;
#endif
PL_discard_foreign_frame(fid);
return rc;