summaryrefslogtreecommitdiff
path: root/tests/examplefiles/example.sml
diff options
context:
space:
mode:
authorRobert J. Simmons <robsimmons@gmail.com>2011-08-26 13:02:24 -0400
committerRobert J. Simmons <robsimmons@gmail.com>2011-08-26 13:02:24 -0400
commit4ff39644f0902b35281259d282d088c9c6bc6835 (patch)
treed408cd66d417daaa93927cf5db0a585dda81add0 /tests/examplefiles/example.sml
parent36b234f03c3e1176e811936526f16f267334d165 (diff)
downloadpygments-4ff39644f0902b35281259d282d088c9c6bc6835.tar.gz
Ridiculous support for functions
Diffstat (limited to 'tests/examplefiles/example.sml')
-rw-r--r--tests/examplefiles/example.sml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/examplefiles/example.sml b/tests/examplefiles/example.sml
index a0a808ee..820834c1 100644
--- a/tests/examplefiles/example.sml
+++ b/tests/examplefiles/example.sml
@@ -55,6 +55,15 @@ and h x = raise Foo (~x)
val x = 4
and y = 5 (* Currently wrong, but weird enough that maybe I don't care *)
+fun q 0 = 4
+ | q 1 = (case 1 of 1 => 2 | 3 => 4 | x => y)
+ | q y = case y of 1 => 2 | 3 => 4 | x => y
+
+val x = ref true
+fun q 0 = 4
+ | q 1 = if false then case 1 of 1 => 2 | 3 => 4 | x => y else 19
+ | q 2 = (while !x handle Match => !x | Fail _ => !x do () ; 2)
+ | q x = (raise Match) handle Domain => 9 | Match => 3
val _ = 123
val _ = 0001