Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /tests/trunk/bugs/tests.post-110.63/bug154/tconst.sml
ViewVC logotype

Annotation of /tests/trunk/bugs/tests.post-110.63/bug154/tconst.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2463 - (view) (download)

1 : gkuan 2463 (* ------------------------ tconst.sml: ---------------------- *)
2 :     import "globals";
3 :    
4 :     signature TCONST =
5 :     sig
6 :     type t
7 :     val from_string: string -> t
8 :     end
9 :    
10 :     functor TConstFun((*structure Globals:GLOBALS*)): TCONST =
11 :     struct
12 :     exception IllegalTConst of string
13 :     type t = string
14 :     fun member x [] = false
15 :     | member x (y::l) = (x=y) orelse (member x l)
16 :     fun from_string s = if not (member s ["int", "real", "bool"])
17 :     then raise IllegalTConst(s)
18 :     else s
19 :     end
20 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0