Mercurial > urweb
comparison src/compiler.sml @ 891:8f2159040bbb
More command-line options
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 18 Jul 2009 11:01:48 -0400 |
parents | b2a175a0f2ef |
children | d1d0b18afd3d |
comparison
equal
deleted
inserted
replaced
890:034eeb099564 | 891:8f2159040bbb |
---|---|
330 in | 330 in |
331 readSources acc | 331 readSources acc |
332 end | 332 end |
333 | 333 |
334 val prefix = ref NONE | 334 val prefix = ref NONE |
335 val database = ref NONE | 335 val database = ref (Settings.getDbstring ()) |
336 val exe = ref NONE | 336 val exe = ref (Settings.getExe ()) |
337 val sql = ref NONE | 337 val sql = ref (Settings.getSql ()) |
338 val debug = ref (Settings.getDebug ()) | 338 val debug = ref (Settings.getDebug ()) |
339 val profile = ref false | 339 val profile = ref false |
340 val timeout = ref NONE | 340 val timeout = ref NONE |
341 val ffi = ref [] | 341 val ffi = ref [] |
342 val link = ref [] | 342 val link = ref [] |
396 ^ desc ^ " values that don't agree"); | 396 ^ desc ^ " values that don't agree"); |
397 x)) | 397 x)) |
398 | 398 |
399 fun merge (old : job, new : job) = { | 399 fun merge (old : job, new : job) = { |
400 prefix = #prefix old, | 400 prefix = #prefix old, |
401 database = #database old, | 401 database = mergeO (fn (old, _) => old) (#database old, #database new), |
402 exe = #exe old, | 402 exe = #exe old, |
403 sql = #sql old, | 403 sql = #sql old, |
404 debug = #debug old orelse #debug new, | 404 debug = #debug old orelse #debug new, |
405 profile = #profile old orelse #profile new, | 405 profile = #profile old orelse #profile new, |
406 timeout = #timeout old, | 406 timeout = #timeout old, |
488 NONE => () | 488 NONE => () |
489 | SOME _ => ErrorMsg.error "Duplicate 'prefix' directive"; | 489 | SOME _ => ErrorMsg.error "Duplicate 'prefix' directive"; |
490 prefix := SOME arg) | 490 prefix := SOME arg) |
491 | "database" => | 491 | "database" => |
492 (case !database of | 492 (case !database of |
493 NONE => () | 493 NONE => database := SOME arg |
494 | SOME _ => ErrorMsg.error "Duplicate 'database' directive"; | 494 | SOME _ => ()) |
495 database := SOME arg) | |
496 | "exe" => | 495 | "exe" => |
497 (case !exe of | 496 (case !exe of |
498 NONE => () | 497 NONE => exe := SOME (relify arg) |
499 | SOME _ => ErrorMsg.error "Duplicate 'exe' directive"; | 498 | SOME _ => ()) |
500 exe := SOME (relify arg)) | |
501 | "sql" => | 499 | "sql" => |
502 (case !sql of | 500 (case !sql of |
503 NONE => () | 501 NONE => sql := SOME (relify arg) |
504 | SOME _ => ErrorMsg.error "Duplicate 'sql' directive"; | 502 | SOME _ => ()) |
505 sql := SOME (relify arg)) | |
506 | "debug" => debug := true | 503 | "debug" => debug := true |
507 | "profile" => profile := true | 504 | "profile" => profile := true |
508 | "timeout" => | 505 | "timeout" => |
509 (case !timeout of | 506 (case !timeout of |
510 NONE => () | 507 NONE => () |