Mercurial > urweb
changeset 1929:f792a6544093
Add show instance for 'id' type
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Mon, 07 Oct 2013 14:08:10 +0400 |
parents | f1c211936557 |
children | 5a7ae5acdcea |
files | lib/ur/basis.urs src/monoize.sml |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ur/basis.urs Mon Dec 09 17:25:53 2013 -0500 +++ b/lib/ur/basis.urs Mon Oct 07 14:08:10 2013 +0400 @@ -775,6 +775,7 @@ type id val fresh : transaction id val giveFocus : id -> transaction unit +val show_id : show id val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ [Dyn]] => unit -> tag [Signal = signal (xml ([Dyn] ++ ctx) use bind)] ([Dyn] ++ ctx) [] use bind
--- a/src/monoize.sml Mon Dec 09 17:25:53 2013 -0500 +++ b/src/monoize.sml Mon Oct 07 14:08:10 2013 +0400 @@ -1267,6 +1267,12 @@ in ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc), fm) end + | L.EFfi ("Basis", "show_id") => + let + val s = (L'.TFfi ("Basis", "string"), loc) + in + ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc), fm) + end | L.EFfi ("Basis", "show_char") => ((L'.EFfi ("Basis", "charToString"), loc), fm) | L.EFfi ("Basis", "show_bool") =>