Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * | |
4 | * MLton is released under a BSD-style license. | |
5 | * See the file MLton-LICENSE for details. | |
6 | *) | |
7 | ||
8 | signature PARSE_SEXP_STRUCTS = | |
9 | sig | |
10 | structure Sexp: SEXP | |
11 | end | |
12 | ||
13 | signature PARSE_SEXP = | |
14 | sig | |
15 | include PARSE_SEXP_STRUCTS | |
16 | ||
17 | type 'a t | |
18 | ||
19 | exception Parse | |
20 | val parse: 'a t * Sexp.t -> 'a | |
21 | ||
22 | val anything: Sexp.t t | |
23 | val atom: (string -> 'a) -> 'a t | |
24 | val string: string -> unit t | |
25 | val anyString: string t | |
26 | val cons: 'a t * 'b t -> ('a * 'b) t | |
27 | val list: 'a t -> 'a list t | |
28 | val tuple2: 'a t * 'b t -> ('a * 'b) t | |
29 | val tuple3: 'a t * 'b t * 'c t -> ('a * 'b * 'c) t | |
30 | val tuple4: 'a t * 'b t * 'c t * 'd t -> ('a * 'b * 'c * 'd) t | |
31 | val tuple5: 'a t * 'b t * 'c t * 'd t * 'e t -> ('a * 'b * 'c * 'd * 'e) t | |
32 | val wrap: 'a t * ('a -> 'b) -> 'b t | |
33 | val or: 'a t list -> 'a t | |
34 | val fold: 'a t * 'b * ('a * 'b -> 'b) -> 'b t | |
35 | end |