From 06334cca38dfb430071426e79c98c685b7d53a8c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Fri, 2 Jan 2009 13:03:22 -0500 Subject: Injected an option --- tests/jsinj.ur | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/jsinj.ur') diff --git a/tests/jsinj.ur b/tests/jsinj.ur index d9e09fb5..632a2839 100644 --- a/tests/jsinj.ur +++ b/tests/jsinj.ur @@ -8,6 +8,7 @@ cookie float : float cookie string : string cookie bool : bool cookie pair : int * float +cookie option : option int fun main () : transaction page = n <- getCookie int; @@ -30,6 +31,10 @@ fun main () : transaction page = p <- return (getOpt p (1, 2.3)); sp <- source (4, 5.6); + o <- getCookie option; + o <- return (getOpt o (Some 1)); + op <- source None; + return {[n]}}/> CHANGE
@@ -45,4 +50,9 @@ fun main () : transaction page = {[p.1]}, {[p.2]}}/> CHANGE
+ + return None + | Some x => return {[x]}}/> + CHANGE
-- cgit v1.2.3