comparison src/compiler.sml @ 1057:eaba663fd6aa

Represent FFI function names as strings, to deal with cross-file recursion
author Adam Chlipala <adamc@hcoop.net>
date Sat, 05 Dec 2009 14:01:34 -0500
parents 36efaf119b85
children e8a35d710ab9
comparison
equal deleted inserted replaced
1056:c42bfbd75ca9 1057:eaba663fd6aa
419 sources = #sources new @ #sources old, 419 sources = #sources new @ #sources old,
420 protocol = mergeO #2 (#protocol old, #protocol new), 420 protocol = mergeO #2 (#protocol old, #protocol new),
421 dbms = mergeO #2 (#dbms old, #dbms new) 421 dbms = mergeO #2 (#dbms old, #dbms new)
422 } 422 }
423 in 423 in
424 foldr (fn (fname, job) => merge (job, pu fname)) job (!libs) 424 foldr (fn (job', job) => merge (job, job')) job (!libs)
425 end 425 end
426 426
427 fun parsePkind s = 427 fun parsePkind s =
428 case s of 428 case s of
429 "all" => Settings.Any 429 "all" => Settings.Any
549 val (kind, pattern) = parsePattern pattern 549 val (kind, pattern) = parsePattern pattern
550 in 550 in
551 fkind := {action = Settings.Deny, kind = kind, pattern = pattern} :: !fkind 551 fkind := {action = Settings.Deny, kind = kind, pattern = pattern} :: !fkind
552 end 552 end
553 | _ => ErrorMsg.error "Bad 'deny' syntax") 553 | _ => ErrorMsg.error "Bad 'deny' syntax")
554 | "library" => libs := relify arg :: !libs 554 | "library" => libs := pu (relify arg) :: !libs
555 | "path" => 555 | "path" =>
556 (case String.fields (fn ch => ch = #"=") arg of 556 (case String.fields (fn ch => ch = #"=") arg of
557 [n, v] => pathmap := M.insert (!pathmap, n, v) 557 [n, v] => pathmap := M.insert (!pathmap, n, v)
558 | _ => ErrorMsg.error "path argument not of the form name=value'") 558 | _ => ErrorMsg.error "path argument not of the form name=value'")
559 | _ => ErrorMsg.error ("Unrecognized command '" ^ cmd ^ "'"); 559 | _ => ErrorMsg.error ("Unrecognized command '" ^ cmd ^ "'");