# HG changeset patch # User Adam Chlipala # Date 1223150043 14400 # Node ID a94a79820d493c4eb00ed8b49de5eb04eb9d3743 # Parent b85e6ba5661867222b6f41ebf6f40f63cf78bc9e Small clean-ups in crud; Compiler.check diff -r b85e6ba56618 -r a94a79820d49 src/compiler.sig --- a/src/compiler.sig Sat Oct 04 15:50:28 2008 -0400 +++ b/src/compiler.sig Sat Oct 04 15:54:03 2008 -0400 @@ -45,6 +45,7 @@ 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 -r b85e6ba56618 -r a94a79820d49 src/compiler.sml --- a/src/compiler.sml Sat Oct 04 15:50:28 2008 -0400 +++ b/src/compiler.sml Sat Oct 04 15:54:03 2008 -0400 @@ -93,6 +93,9 @@ 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 -r b85e6ba56618 -r a94a79820d49 tests/crud.ur --- a/tests/crud.ur Sat Oct 04 15:50:28 2008 -0400 +++ b/tests/crud.ur Sat Oct 04 15:54:03 2008 -0400 @@ -80,7 +80,7 @@

I was born sure!

-fun main () : transaction page = +fun main () = rows <- queryX (SELECT * FROM tab AS T) (fn (fs : {T : $([Id = int] ++ mapT2T fstTT M.cols)}) => diff -r b85e6ba56618 -r a94a79820d49 tests/crud.urs --- a/tests/crud.urs Sat Oct 04 15:50:28 2008 -0400 +++ b/tests/crud.urs Sat Oct 04 15:54:03 2008 -0400 @@ -6,7 +6,7 @@ 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)}