diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fib.ur | 10 | ||||
-rw-r--r-- | tests/subfunctor.ur | 6 | ||||
-rw-r--r-- | tests/subfunctor.urs | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/fib.ur b/tests/fib.ur new file mode 100644 index 00000000..9d7fd340 --- /dev/null +++ b/tests/fib.ur @@ -0,0 +1,10 @@ +fun fib n = + if n = 0 then + 0 + else if n = 1 then + 1 + else + fib (n - 1) + fib (n - 2) + +fun main n : transaction page = + return <xml>{[fib n]}</xml> diff --git a/tests/subfunctor.ur b/tests/subfunctor.ur new file mode 100644 index 00000000..3c2aa83f --- /dev/null +++ b/tests/subfunctor.ur @@ -0,0 +1,6 @@ +functor F(M : sig con fs :: {Type} end) = struct + open M + + functor G(M : sig val x : $(map sql_injectable_prim fs) end) = struct + end +end diff --git a/tests/subfunctor.urs b/tests/subfunctor.urs new file mode 100644 index 00000000..db393d21 --- /dev/null +++ b/tests/subfunctor.urs @@ -0,0 +1,3 @@ +functor F(M : sig con fs :: {Type} end) : sig + functor G(M : sig val x : $(map sql_injectable_prim M.fs) end) : sig end +end |