blob: 423c27207bc357957099e1aeffb9eb5dcb762700 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
/* Test a boolean type parameter. Not sure that this is terribly useful,
but it fills a gap in coverage... */
$include <prelude.sail>
union perhaps('b : Bool) = {No : unit, Yes : {'n, 'b. atom('n)}}
val foo : forall 'n. atom('n) -> perhaps('n >= 0)
function foo(n) =
if n >= 0 then Yes(n) else No()
|