diff options
| author | Thomas Bauereiss | 2018-05-11 12:04:10 +0100 |
|---|---|---|
| committer | Thomas Bauereiss | 2018-05-11 12:04:10 +0100 |
| commit | ff18bac6654a73cedf32a45ee406fe3e74ae3efd (patch) | |
| tree | ed940ea575c93d741c84cd24cd3e029d0a590b81 /doc/examples | |
| parent | 823fe1d82e753add2d54ba010689a81af027ba6d (diff) | |
| parent | db3b6d21c18f4ac516c2554db6890274d2b8292c (diff) | |
Merge branch 'sail2' into cheri-mono
In order to use up-to-date sequential CHERI model for test suite
Diffstat (limited to 'doc/examples')
| -rw-r--r-- | doc/examples/overload.sail | 10 | ||||
| -rw-r--r-- | doc/examples/zeros.sail | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/examples/overload.sail b/doc/examples/overload.sail new file mode 100644 index 00000000..b6213cdd --- /dev/null +++ b/doc/examples/overload.sail @@ -0,0 +1,10 @@ +val print_int : int -> unit + +val print_string : string -> unit + +overload print = {print_int, print_string} + +function main() : unit -> unit = { + print("Hello, World!"); + print(4) +}
\ No newline at end of file diff --git a/doc/examples/zeros.sail b/doc/examples/zeros.sail new file mode 100644 index 00000000..7781c9ff --- /dev/null +++ b/doc/examples/zeros.sail @@ -0,0 +1,5 @@ +val zero_extend_1 : forall 'm 'n, 'm <= 'n. bits('m) -> bits('n) + +val zero_extend_2 : forall 'm 'n, 'm <= 'n. (bits('m), int('n)) -> bits('n) + +overload zero_extend = {zero_extend_1, zero_extend_2}
\ No newline at end of file |
