# HG changeset patch # User Adam Chlipala # Date 1261666968 18000 # Node ID 99aebdf30257eca8102fa534c87e0c488d672c02 # Parent ae885ad70d83fcfe6d10c02ed70cad7a706eea4c -tc flag diff -r ae885ad70d83 -r 99aebdf30257 doc/manual.tex --- a/doc/manual.tex Thu Dec 24 09:56:09 2009 -0500 +++ b/doc/manual.tex Thu Dec 24 10:02:48 2009 -0500 @@ -168,6 +168,11 @@ urweb -timing P \end{verbatim} +To stop the compilation process after type-checking, run +\begin{verbatim} +urweb -tc P +\end{verbatim} + Some other command-line parameters are accepted: \begin{itemize} \item \texttt{-db }: Set database connection information, using the format expected by Postgres's \texttt{PQconnectdb()}, which is \texttt{name1=value1 ... nameN=valueN}. The same format is also parsed and used to discover connection parameters for MySQL and SQLite. The only significant settings for MySQL are \texttt{host}, \texttt{hostaddr}, \texttt{port}, \texttt{dbname}, \texttt{user}, and \texttt{password}. The only significant setting for SQLite is \texttt{dbname}, which is interpreted as the filesystem path to the database. Additionally, when using SQLite, a database string may be just a file path. diff -r ae885ad70d83 -r 99aebdf30257 src/main.mlton.sml --- a/src/main.mlton.sml Thu Dec 24 09:56:09 2009 -0500 +++ b/src/main.mlton.sml Thu Dec 24 10:02:48 2009 -0500 @@ -26,6 +26,7 @@ *) val timing = ref false +val tc = ref false val sources = ref ([] : string list) val demo = ref (NONE : (string * bool) option) @@ -53,6 +54,9 @@ | "-timing" :: rest => (timing := true; doArgs rest) + | "-tc" :: rest => + (tc := true; + doArgs rest) | "-output" :: s :: rest => (Settings.setExe (SOME s); doArgs rest) @@ -78,7 +82,13 @@ SOME (prefix, guided) => Demo.make {prefix = prefix, dirname = job, guided = guided} | NONE => - if !timing then + if !tc then + (Compiler.check Compiler.toElaborate job; + if ErrorMsg.anyErrors () then + OS.Process.exit OS.Process.failure + else + ()) + else if !timing then Compiler.time Compiler.toCjrize job else Compiler.compiler job