diff options
-rw-r--r-- | lib/ur/basis.urs | 2 | ||||
-rw-r--r-- | src/monoize.sml | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 3b67946f..878f2793 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -274,6 +274,8 @@ con serialized :: Type -> Type val serialize : t ::: Type -> t -> serialized t val deserialize : t ::: Type -> serialized t -> t val sql_serialized : t ::: Type -> sql_injectable_prim (serialized t) +val unsafeSerializedToString : t ::: Type -> serialized t -> string +val unsafeSerializedFromString : t ::: Type -> string -> serialized t con primary_key :: {Type} -> {{Unit}} -> Type val no_primary_key : fs ::: {Type} -> primary_key fs [] diff --git a/src/monoize.sml b/src/monoize.sml index 11c6ea31..dfa88be3 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3953,6 +3953,20 @@ fun monoExp (env, st, fm) (all as (e, loc)) = loc)), loc), fm) end + | L.ECApp ((L.EFfi ("Basis", "unsafeSerializedToString"), _), _) => + let + val t = (L'.TFfi ("Basis", "string"), loc) + in + ((L'.EAbs ("v", t, t, (L'.ERel 0, loc)), loc), + fm) + end + | L.ECApp ((L.EFfi ("Basis", "unsafeSerializedFromString"), _), _) => + let + val t = (L'.TFfi ("Basis", "string"), loc) + in + ((L'.EAbs ("v", t, t, (L'.ERel 0, loc)), loc), + fm) + end | L.EFfiApp ("Basis", "url", [(e, _)]) => let |