summaryrefslogtreecommitdiff
path: root/examples/dialogue/ResProlog.gf
blob: 5ecb1f3c0c71833729275ef1166e866c0d3a798a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
resource ResProlog = open Prelude in {

  oper
    bracket : Str -> Str = \s -> "[" ++ s ++ "]" ;

    app1 : Str -> Str -> Str = \f,x -> f ++ paren x ;

    apps : Str -> SS -> SS = \f,x -> ss (app1 f x.s) ;

    request : Str -> Str = app1 "request" ;
    answer  : Str -> Str = app1 "answer" ;

    req_ans : Str -> Str -> Str -> Str = \f,t,k ->
      bracket (request f ++ "," ++ answer (app1 t k)) ;

}

-- [request(add_event), answer(event_to_store(meeting))]