Mercurial > gui
comparison forms.ur @ 9:1e04008eaef7
Add version of warning with a format wrapper.
author | Karn Kallio <kkallio@eka> |
---|---|
date | Tue, 21 Jun 2011 17:32:36 -0430 |
parents | 4d8165e8f89a |
children | 5905b56e0cd9 |
comparison
equal
deleted
inserted
replaced
8:90be8b8917d5 | 9:1e04008eaef7 |
---|---|
4 fun warning [a] (s : signal (readiness a)) = | 4 fun warning [a] (s : signal (readiness a)) = |
5 <xml><dyn signal={v <- s; | 5 <xml><dyn signal={v <- s; |
6 return (case v of | 6 return (case v of |
7 Invalid s => <xml><b>{[s]}</b></xml> | 7 Invalid s => <xml><b>{[s]}</b></xml> |
8 | _ => <xml/>)}/></xml> | 8 | _ => <xml/>)}/></xml> |
9 | |
10 fun warningFmt [a ::: Type] [ctx ::: {Unit}] [ctx ~ body] | |
11 (wrap : string -> xml (body ++ ctx) [] []) | |
12 (s : signal (readiness a)) = | |
13 <xml><dyn signal={v <- s; | |
14 return (case v of | |
15 Invalid s => wrap s | |
16 | _ => <xml/>)}/></xml> |