Commit | Line | Data |
---|---|---|
182a2654 AC |
1 | (* lib-base.sml |
2 | * | |
3 | * COPYRIGHT (c) 1993 by AT&T Bell Laboratories. See COPYRIGHT file for details. | |
4 | *) | |
5 | ||
6 | structure LibBase : LIB_BASE = | |
7 | struct | |
8 | ||
9 | (* raised to report unimplemented features *) | |
10 | exception Unimplemented of string | |
11 | ||
12 | (* raised to report internal errors *) | |
13 | exception Impossible of string | |
14 | ||
15 | (* raised by searching operations *) | |
16 | exception NotFound | |
17 | ||
18 | (* raise the exception Fail with a standard format message. *) | |
19 | fun failure {module, func, msg} = | |
20 | raise (Fail(concat[module, ".", func, ": ", msg])) | |
21 | ||
22 | val version = { | |
23 | date = "June 1, 1996", | |
24 | system = "SML/NJ Library", | |
25 | version_id = [1, 0] | |
26 | } | |
27 | ||
28 | fun f ([], l) = l | |
29 | | f ([x : int], l) = (Int.toString x)::l | |
30 | | f (x::r, l) = (Int.toString x) :: "." :: f(r, l) | |
31 | ||
32 | val banner = concat ( | |
33 | #system version :: ", Version " :: | |
34 | f (#version_id version, [", ", #date version])) | |
35 | ||
36 | end (* LibBase *) | |
37 |