Skip to content

Commit

Permalink
Add uninstantiation_error/1 implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoura committed Sep 11, 2021
1 parent 9cbb91e commit 3734e70
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/index_status.html
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ <h2>7.12.2 Error classification</h2>
<li>resource_error. <i>[not implemented]</i></li>
<li>syntax_error.</li>
<li>system_error. <i>[not implemented]</i></li>
<li>uninstantiation_error. <i>[not implemented]</i></li>
<li>uninstantiation_error.</li>
</ol>
</div>
<div class="indexed" id="term-unification">
Expand Down
2 changes: 1 addition & 1 deletion src/docs/content.index_status.template
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ The ProscriptLS aspiration includes implementing most of ISO Prolog and some add
<li>resource_error. <i>[not implemented]</i></li>
<li>syntax_error.</li>
<li>system_error. <i>[not implemented]</i></li>
<li>uninstantiation_error. <i>[not implemented]</i></li>
<li>uninstantiation_error.</li>
</ol>
</div>
<div class="indexed" id="term-unification">
Expand Down
10 changes: 9 additions & 1 deletion src/engine/foreign.js
Original file line number Diff line number Diff line change
Expand Up @@ -3655,6 +3655,15 @@ function instantiation_error(v)
return predicate_throw(ref);
}

function uninstantiation_error(got)
{
var ftor = lookup_functor('uninstantiation_error', 1);
var ref = state.H ^ (TAG_STR << WORD_BITS);
memory[state.H++] = ftor;
memory[state.H++] = lookup_atom(got);
return predicate_throw(ref);
}

function domain_error(domain, got)
{
var ftor = lookup_functor('domain_error', 2);
Expand All @@ -3663,7 +3672,6 @@ function domain_error(domain, got)
memory[state.H++] = lookup_atom(domain);
memory[state.H++] = got;
return predicate_throw(ref);

}

function format_error(message)
Expand Down

0 comments on commit 3734e70

Please sign in to comment.