summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler.sig1
-rw-r--r--src/compiler.sml3
-rw-r--r--tests/crud.ur2
-rw-r--r--tests/crud.urs2
4 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler.sig b/src/compiler.sig
index 1388537f..833c647f 100644
--- a/src/compiler.sig
+++ b/src/compiler.sig
@@ -45,6 +45,7 @@ signature COMPILER = sig
val transform : ('src, 'dst) phase -> string -> ('src, 'dst) transform
val o : ('b, 'c) transform * ('a, 'b) transform -> ('a, 'c) transform
+ val check : ('src, 'dst) transform -> 'src -> unit
val run : ('src, 'dst) transform -> 'src -> 'dst option
val runPrint : ('src, 'dst) transform -> 'src -> unit
val time : ('src, 'dst) transform -> 'src -> unit
diff --git a/src/compiler.sml b/src/compiler.sml
index 569980f4..3d2ce354 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -93,6 +93,9 @@ fun op o (tr2 : ('b, 'c) transform, tr1 : ('a, 'b) transform) = {
end
}
+fun check (tr : ('src, 'dst) transform) x = (ErrorMsg.resetErrors ();
+ ignore (#func tr x))
+
fun run (tr : ('src, 'dst) transform) x = (ErrorMsg.resetErrors ();
#func tr x)
diff --git a/tests/crud.ur b/tests/crud.ur
index 7944cf6c..6479da19 100644
--- a/tests/crud.ur
+++ b/tests/crud.ur
@@ -80,7 +80,7 @@ fun confirm (id : int) = return <html><body>
<p><a link={delete id}>I was born sure!</a></p>
</body></html>
-fun main () : transaction page =
+fun main () =
rows <- queryX (SELECT * FROM tab AS T)
(fn (fs : {T : $([Id = int] ++ mapT2T fstTT M.cols)}) => <body>
<tr>
diff --git a/tests/crud.urs b/tests/crud.urs
index 3056392c..8ef81b87 100644
--- a/tests/crud.urs
+++ b/tests/crud.urs
@@ -6,7 +6,7 @@ con colMeta = fn t_formT :: (Type * Type) => {
Parse : t_formT.2 -> t_formT.1,
Inject : sql_injectable t_formT.1
}
-con colsMeta = fn cols :: {(Type * Type)} => $(Top.mapT2T colMeta cols)
+con colsMeta = fn cols :: {(Type * Type)} => $(mapT2T colMeta cols)
functor Make(M : sig
con cols :: {(Type * Type)}