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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2463 - (download) (annotate)
Sat Apr 28 21:19:47 2007 UTC (12 years ago) by gkuan
File size: 482 byte(s)
missing bug tests subdirectories
(* ------------------------  tconst.sml: ---------------------- *)
import "globals";

signature TCONST =
sig
  type t
  val from_string: string -> t
end

functor TConstFun((*structure Globals:GLOBALS*)): TCONST =
struct
    exception IllegalTConst of string
    type t = string
    fun member x [] = false
      | member x (y::l) = (x=y) orelse (member x l)
    fun from_string s = if not (member s ["int", "real", "bool"])
		       then raise IllegalTConst(s)
		       else s
end


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