Skip to content

Commit

Permalink
Merge pull request #731 from CakeML/source_assert
Browse files Browse the repository at this point in the history
Add an executable assert statement to basis
  • Loading branch information
myreen authored Mar 6, 2020
2 parents cc300b0 + 2876854 commit c42539b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions basis/RuntimeProgScript.sml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ val abort = process_topdecs `fun abort u = case u of () => exit 1`

val _ = append_prog abort

val _ = process_topdecs `
fun assert cond msg =
if cond
then ()
else (debugMsg msg;
abort());`
|> append_prog;

val _ = ml_prog_update (close_module NONE);

val _ = export_theory();

0 comments on commit c42539b

Please sign in to comment.