File: Test179.ML

package info (click to toggle)
polyml 5.8.1-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 57,736 kB
  • sloc: cpp: 44,918; ansic: 26,921; asm: 13,495; sh: 4,670; makefile: 610; exp: 525; python: 253; awk: 91
file content (36 lines) | stat: -rw-r--r-- 723 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(* A few of these are specially handled in the code-generator. *)

fun check true = () | check false = raise Fail "Incorrect";

PolyML.Compiler.maxInlineSize := 1;
fun f x = if x then 1 else 0;
check(f true = 1);
check(f false = 0);

fun f x = if x then 2 else 0;
check(f true = 2);
check(f false = 0);

fun f x = if x then 3 else 0;
check(f true = 3);
check(f false = 0);

fun f x = if x then 4 else 0;
check(f true = 4);
check(f false = 0);

fun f x = if x then 5 else 0;
check(f true = 5);
check(f false = 0);

fun f x = if x then 6 else 0;
check(f true = 6);
check(f false = 0);

fun f x = if x then 7 else 0;
check(f true = 7);
check(f false = 0);

fun f x = if x then 8 else 0;
check(f true = 8);
check(f false = 0);