diff options
author | Ziv Scully <ziv@mit.edu> | 2015-09-21 16:07:35 -0400 |
---|---|---|
committer | Ziv Scully <ziv@mit.edu> | 2015-09-21 16:07:35 -0400 |
commit | 59c69b0cebc215599acc25906bd0366af03abf0c (patch) | |
tree | 96d1137305c8cdc032fb3248891cd31f1a0a8284 /src/mono_fooify.sig | |
parent | 287683a7a940849ab734acd4ba7fad3c60b7b5f7 (diff) |
Factor out urlification.
Diffstat (limited to 'src/mono_fooify.sig')
-rw-r--r-- | src/mono_fooify.sig | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/mono_fooify.sig b/src/mono_fooify.sig new file mode 100644 index 00000000..9eb8038b --- /dev/null +++ b/src/mono_fooify.sig @@ -0,0 +1,38 @@ +signature MONO_FOOIFY = sig + +(* TODO: don't expose raw references if possible. *) +val nextPvar : int ref +val pvarDefs : ((string * int * (string * int * Mono.typ option) list) list) ref + +datatype foo_kind = Attr | Url + +structure Fm : sig + type t + + type vr = string * int * Mono.typ * Mono.exp * string + + val empty : int -> t + + val lookup : t -> foo_kind -> int -> (int -> t -> vr * t) -> t * int + val lookupList : t -> foo_kind -> Mono.typ -> (int -> t -> vr * t) -> t * int + val enter : t -> t + val decls : t -> Mono.decl list + + val freshName : t -> int * t + + (* Set at the end of [Monoize]. *) + val canonical : t ref +end + +(* General form used in [Monoize]. *) +val fooifyExp : foo_kind + -> (int -> Mono.typ * string) + -> (int -> string * (string * int * Mono.typ option) list) + -> Fm.t + -> Mono.exp * Mono.typ + -> Mono.exp * Fm.t + +(* Easy-to-use special case used in [Sqlcache]. *) +val urlify : MonoEnv.env -> Mono.exp * Mono.typ -> Mono.exp + +end |