summaryrefslogtreecommitdiff
path: root/tests/env.ur
blob: 637ea6b860ea2d014fd286d1aad35e7d22782a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
fun handler r =
  vo <- getenv (blessEnvVar r.Nam);
  return <xml><body>
  {case vo of
       None => <xml>Not set</xml>
     | Some v => <xml>Set to: {[v]}</xml>}
</body></xml>

fun main () : transaction page =
  term <- getenv (blessEnvVar "TERM");
  return <xml><body>
    TERM = {case term of
                None => <xml>Nada</xml>
              | Some v => txt v}
                 
    <form>
      What would you like to know?
      <textbox{#Nam}/>
      <submit action={handler}/>
    </form>
  </body></xml>