/*=======================================================================================*/ /* This Sail RISC-V architecture model, comprising all files and */ /* directories except where otherwise noted is subject the BSD */ /* two-clause license in the LICENSE file. */ /* */ /* SPDX-License-Identifier: BSD-2-Clause */ /*=======================================================================================*/ /* model-internal exceptions */ union exception = { Error_not_implemented : string, Error_internal_error : unit } val not_implemented : forall ('a : Type). string -> 'a function not_implemented message = throw(Error_not_implemented(message)) val internal_error : forall ('a : Type). (string, int, string) -> 'a function internal_error(file, line, s) = { assert (false, file ^ ":" ^ dec_str(line) ^ ": " ^ s); throw Error_internal_error() }