diff options
| author | Kathy Gray | 2014-03-03 00:04:32 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-03-03 00:04:32 +0000 |
| commit | 8c2995d69d7d6dbe5f4dbe15457b243b802179a0 (patch) | |
| tree | 5f8a37bfadd85f03b2ea87a8c3c72e3360db078c /src/test/test1.sail | |
| parent | d62ca20800439a4b1a31e028b3e4451330928bdb (diff) | |
Fixing assorted bugs. Adding ability to put a type on the identifier being assigned to in assignments.
Diffstat (limited to 'src/test/test1.sail')
| -rw-r--r-- | src/test/test1.sail | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test1.sail b/src/test/test1.sail index 3d69018d..0050a257 100644 --- a/src/test/test1.sail +++ b/src/test/test1.sail @@ -14,6 +14,9 @@ val forall Nat 'a, Nat 'b. bit['a:'b] sliced let bit v = bitzero let ( bit [ 32 ] ) v1 = 0b101 +val forall Type 'a. 'a -> 'a effect pure identity +function forall Type 'a. 'a identity i = i + function unit ignore(x) = () (* scattered function definition and union definition *) @@ -32,7 +35,7 @@ function clause f ( C (a) ) = C(a) end ast end f -function unit a (bit) b = if b then () else () +function unit a (bit) b = if identity(b) then (identity()) else () function bit sw s = switch s { case 0 -> bitzero } |
