comparison src/compiler.sml @ 2046:ced78ef1c82f

New .urp directive: file
author Adam Chlipala <adam@chlipala.net>
date Thu, 31 Jul 2014 09:56:41 -0400
parents 403f0cc65b9c
children a9159911c3ba
comparison
equal deleted inserted replaced
2045:534577e429e1 2046:ced78ef1c82f
459 institutionalizeJob job; 459 institutionalizeJob job;
460 {Job = job, Libs = []} 460 {Job = job, Libs = []}
461 end 461 end
462 else 462 else
463 let 463 let
464 val thisPath = OS.Path.dir fname
465
464 val pathmap = ref (!pathmap) 466 val pathmap = ref (!pathmap)
465 val bigLibs = ref [] 467 val bigLibs = ref []
466 468
467 fun pu filename = 469 fun pu filename =
468 let 470 let
874 | "timeFormat" => Settings.setTimeFormat arg 876 | "timeFormat" => Settings.setTimeFormat arg
875 | "noMangleSql" => Settings.setMangleSql false 877 | "noMangleSql" => Settings.setMangleSql false
876 | "html5" => Settings.setIsHtml5 true 878 | "html5" => Settings.setIsHtml5 true
877 | "lessSafeFfi" => Settings.setLessSafeFfi true 879 | "lessSafeFfi" => Settings.setLessSafeFfi true
878 880
881 | "file" =>
882 (case String.fields Char.isSpace arg of
883 [uri, fname] => (Settings.setFilePath thisPath;
884 Settings.addFile {Uri = uri,
885 LoadFromFilename = fname})
886 | _ => ErrorMsg.error "Bad 'file' arguments")
887
879 | _ => ErrorMsg.error ("Unrecognized command '" ^ cmd ^ "'"); 888 | _ => ErrorMsg.error ("Unrecognized command '" ^ cmd ^ "'");
880 read () 889 read ()
881 end 890 end
882 891
883 val job = if hasBlankLine then 892 val job = if hasBlankLine then