summaryrefslogtreecommitdiff
path: root/demo/more/dnat.ur
diff options
context:
space:
mode:
Diffstat (limited to 'demo/more/dnat.ur')
-rw-r--r--demo/more/dnat.ur42
1 files changed, 0 insertions, 42 deletions
diff --git a/demo/more/dnat.ur b/demo/more/dnat.ur
deleted file mode 100644
index 8d8095e7..00000000
--- a/demo/more/dnat.ur
+++ /dev/null
@@ -1,42 +0,0 @@
-datatype t' = O | S of source t'
-type t = source t'
-
-val zero = source O
-
-fun inc n =
- v <- get n;
- case v of
- O =>
- n' <- source O;
- set n (S n')
- | S n => inc n
-
-fun dec n =
- let
- fun dec' last n =
- v <- get n;
- case v of
- O => (case last of
- None => return ()
- | Some n' => set n' O)
- | S n' => dec' (Some n) n'
- in
- dec' None n
- end
-
-fun render [ctx] [inp] [[Body] ~ ctx] (xml : xml ([Body] ++ ctx) inp []) n =
- let
- fun render n =
- n <- signal n;
- return (render' n)
-
- and render' n =
- case n of
- O => <xml/>
- | S n => <xml>
- {xml}
- <dyn signal={render n}/>
- </xml>
- in
- <xml><dyn signal={render n}/></xml>
- end