annotate src/mono_fooify.sig @ 2255:8428c534913a

Use new refactored urlification in Sqlcache.
author Ziv Scully <ziv@mit.edu>
date Mon, 21 Sep 2015 16:45:59 -0400
parents 44ae2254f8fb
children 6f2ea4ed573a
rev   line source
ziv@2254 1 signature MONO_FOOIFY = sig
ziv@2254 2
ziv@2254 3 (* TODO: don't expose raw references if possible. *)
ziv@2254 4 val nextPvar : int ref
ziv@2254 5 val pvarDefs : ((string * int * (string * int * Mono.typ option) list) list) ref
ziv@2254 6
ziv@2254 7 datatype foo_kind = Attr | Url
ziv@2254 8
ziv@2254 9 structure Fm : sig
ziv@2254 10 type t
ziv@2254 11
ziv@2254 12 type vr = string * int * Mono.typ * Mono.exp * string
ziv@2254 13
ziv@2254 14 val empty : int -> t
ziv@2254 15
ziv@2254 16 val lookup : t -> foo_kind -> int -> (int -> t -> vr * t) -> t * int
ziv@2254 17 val lookupList : t -> foo_kind -> Mono.typ -> (int -> t -> vr * t) -> t * int
ziv@2254 18 val enter : t -> t
ziv@2254 19 val decls : t -> Mono.decl list
ziv@2254 20
ziv@2254 21 val freshName : t -> int * t
ziv@2254 22
ziv@2254 23 (* Set at the end of [Monoize]. *)
ziv@2254 24 val canonical : t ref
ziv@2254 25 end
ziv@2254 26
ziv@2254 27 (* General form used in [Monoize]. *)
ziv@2254 28 val fooifyExp : foo_kind
ziv@2254 29 -> (int -> Mono.typ * string)
ziv@2254 30 -> (int -> string * (string * int * Mono.typ option) list)
ziv@2254 31 -> Fm.t
ziv@2254 32 -> Mono.exp * Mono.typ
ziv@2254 33 -> Mono.exp * Fm.t
ziv@2254 34
ziv@2254 35 (* Easy-to-use special case used in [Sqlcache]. *)
ziv@2254 36 val urlify : MonoEnv.env -> Mono.exp * Mono.typ -> Mono.exp
ziv@2254 37
ziv@2254 38 end