summaryrefslogtreecommitdiff
path: root/src/mono_fooify.sig
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2015-12-23 16:01:51 -0500
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2015-12-23 16:01:51 -0500
commit3d3886672433f0775f772d8d2ee47c5f5e0bc745 (patch)
tree072d171c17d92a6696024256c4b2f5aaa760df35 /src/mono_fooify.sig
parentbf037ce78c2c76a34ecca0fb8bafa5d5be38968a (diff)
parent4be7962adf740a35222bfd99608c04329a802a04 (diff)
Merge branch 'upstream' into dfsg_clean20151220+dfsg
Diffstat (limited to 'src/mono_fooify.sig')
-rw-r--r--src/mono_fooify.sig39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/mono_fooify.sig b/src/mono_fooify.sig
new file mode 100644
index 00000000..0cc72342
--- /dev/null
+++ b/src/mono_fooify.sig
@@ -0,0 +1,39 @@
+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
+ (* This list should be reversed before adding to list of file declarations. *)
+ val decls : t -> Mono.decl list
+
+ val freshName : t -> int * t
+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 interface in [Sqlcache]. Uses [Fm.canonical]. *)
+val canonicalFm : Fm.t ref (* Set at the end of [Monoize]. *)
+val urlify : MonoEnv.env -> Mono.exp * Mono.typ -> Mono.exp option
+(* This list should be reversed before adding to list of file declarations. *)
+val getNewFmDecls : unit -> Mono.decl list
+
+end