ziv@2254: signature MONO_FOOIFY = sig ziv@2254: ziv@2254: (* TODO: don't expose raw references if possible. *) ziv@2254: val nextPvar : int ref ziv@2254: val pvarDefs : ((string * int * (string * int * Mono.typ option) list) list) ref ziv@2254: ziv@2254: datatype foo_kind = Attr | Url ziv@2254: ziv@2254: structure Fm : sig ziv@2254: type t ziv@2254: ziv@2254: type vr = string * int * Mono.typ * Mono.exp * string ziv@2254: ziv@2254: val empty : int -> t ziv@2254: ziv@2254: val lookup : t -> foo_kind -> int -> (int -> t -> vr * t) -> t * int ziv@2254: val lookupList : t -> foo_kind -> Mono.typ -> (int -> t -> vr * t) -> t * int ziv@2254: val enter : t -> t ziv@2261: (* This list should be reversed before adding to list of file declarations. *) ziv@2254: val decls : t -> Mono.decl list ziv@2254: ziv@2254: val freshName : t -> int * t ziv@2254: end ziv@2254: ziv@2254: (* General form used in [Monoize]. *) ziv@2254: val fooifyExp : foo_kind ziv@2254: -> (int -> Mono.typ * string) ziv@2254: -> (int -> string * (string * int * Mono.typ option) list) ziv@2254: -> Fm.t ziv@2254: -> Mono.exp * Mono.typ ziv@2254: -> Mono.exp * Fm.t ziv@2254: ziv@2256: (* Easy-to-use interface in [Sqlcache]. Uses [Fm.canonical]. *) ziv@2256: val canonicalFm : Fm.t ref (* Set at the end of [Monoize]. *) ziv@2256: val urlify : MonoEnv.env -> Mono.exp * Mono.typ -> Mono.exp option ziv@2261: (* This list should be reversed before adding to list of file declarations. *) ziv@2256: val getNewFmDecls : unit -> Mono.decl list ziv@2254: ziv@2254: end