Mercurial > urweb
comparison src/monoize.sml @ 1783:5bc4fbf9c0fe
New event records for key and mouse handlers
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 21 Jul 2012 10:02:53 -0400 |
parents | 818d4097e2ed |
children | d794149b3713 |
comparison
equal
deleted
inserted
replaced
1782:61c7eb1d3867 | 1783:5bc4fbf9c0fe |
---|---|
3309 | (L'.TFun (dom, _), _) => | 3309 | (L'.TFun (dom, _), _) => |
3310 let | 3310 let |
3311 val e = | 3311 val e = |
3312 case #1 dom of | 3312 case #1 dom of |
3313 L'.TRecord [] => (L'.EApp (e, (L'.ERecord [], loc)), loc) | 3313 L'.TRecord [] => (L'.EApp (e, (L'.ERecord [], loc)), loc) |
3314 | _ => (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "kc", []), loc)), | 3314 | _ => |
3315 loc), (L'.ERecord [], loc)), loc) | 3315 if String.isPrefix "Onkey" x then |
3316 (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "keyEvent", []), loc)), | |
3317 loc), (L'.ERecord [], loc)), loc) | |
3318 else | |
3319 (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "mouseEvent", []), loc)), | |
3320 loc), (L'.ERecord [], loc)), loc) | |
3321 | |
3316 val s' = " " ^ lowercaseFirst x ^ "='uw_event=event;exec(" | 3322 val s' = " " ^ lowercaseFirst x ^ "='uw_event=event;exec(" |
3317 in | 3323 in |
3318 ((L'.EStrcat (s, | 3324 ((L'.EStrcat (s, |
3319 (L'.EStrcat ( | 3325 (L'.EStrcat ( |
3320 (L'.EPrim (Prim.String s'), loc), | 3326 (L'.EPrim (Prim.String s'), loc), |