From 72414e8531db237906a847fe1a7adaed4b000978 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 30 Apr 2009 14:48:23 -0400 Subject: --- lib/ur/basis.urs | 1 + src/monoize.sml | 1 + tests/subforms.ur | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index b59ab26a..e5175a08 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -584,6 +584,7 @@ con formTag = fn (ty :: Type) (inner :: {Unit}) (attrs :: {Type}) => -> [[Form] ~ ctx] => nm :: Name -> unit -> tag attrs ([Form] ++ ctx) inner [] [nm = ty] +val hidden : formTag string [] [Value = string] val textbox : formTag string [] [Value = string, Size = int, Source = source string] val password : formTag string [] [Value = string, Size = int] val textarea : formTag string [] [Rows = int, Cols = int] diff --git a/src/monoize.sml b/src/monoize.sml index e754452d..c54ab8ba 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -2533,6 +2533,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) = | "submit" => normal ("input type=\"submit\"", NONE, NONE) | "button" => normal ("input type=\"submit\"", NONE, NONE) + | "hidden" => input "hidden" | "textbox" => (case targs of diff --git a/tests/subforms.ur b/tests/subforms.ur index cf5d0ba4..f6876bd8 100644 --- a/tests/subforms.ur +++ b/tests/subforms.ur @@ -1,7 +1,7 @@ fun handler' ls = case ls of Nil => - | Cons (r, ls) =>
  • {[r.A]}, {[r.B]}, {[r.Sub]}
  • {handler' ls}
    + | Cons (r, ls) =>
  • {[r.Nam]}, {[r.A]}, {[r.B]}, {[r.Sub]}
  • {handler' ls}
    fun handler r = return {[r.A]}
    @@ -14,12 +14,14 @@ fun main () = return
    +


    +


    -- cgit v1.2.3