Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2005 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 READER = | |
9 | sig | |
10 | type ('a, 's) t = 's -> ('a * 's) option | |
11 | ||
12 | val all: ('a, 's) t -> ('a list, 's) t | |
13 | val char: (char, 'a) t * char -> (unit, 'a) t | |
14 | val firstN: ('a, 's) t * Int.t -> ('a list, 's) t | |
15 | val readFromString: | |
16 | ((char, Int.t) t -> ('a, Int.t) t) * string -> 'a option | |
17 | val map: ('a, 's) t * ('a -> 'b) -> ('b, 's) t | |
18 | val mapFail: ('a, 's) t * ('a -> 'b option) -> ('b, 's) t | |
19 | val or: ('a, 's) t list -> ('a, 's) t | |
20 | val seq2: ('a, 's) t * ('b, 's) t -> ('a * 'b, 's) t | |
21 | val seq3: ('a, 's) t * ('b, 's) t * ('c, 's) t -> ('a * 'b * 'c, 's) t | |
22 | val seq4: | |
23 | ('a, 's) t * ('b, 's) t * ('c, 's) t * ('d, 's) t | |
24 | -> ('a * 'b * 'c * 'd, 's) t | |
25 | val seq5: | |
26 | ('a, 's) t * ('b, 's) t * ('c, 's) t * ('d, 's)t * ('e,'s) t | |
27 | -> ('a * 'b * 'c * 'd * 'e, 's) t | |
28 | val stringOfLength: (char, 'a) t * Int.t -> (string, 'a) t | |
29 | end |