comparison src/settings.sml @ 1164:8679ba87cf3c

sigfile directive
author Adam Chlipala <adamc@hcoop.net>
date Thu, 11 Feb 2010 09:10:01 -0500
parents 74f2eb3b0606
children 7a2a7a8f9cab
comparison
equal deleted inserted replaced
1163:6c507826fae9 1164:8679ba87cf3c
273 type protocol = { 273 type protocol = {
274 name : string, 274 name : string,
275 compile : string, 275 compile : string,
276 linkStatic : string, 276 linkStatic : string,
277 linkDynamic : string, 277 linkDynamic : string,
278 persistent : bool 278 persistent : bool,
279 code : unit -> Print.PD.pp_desc
279 } 280 }
280 val protocols = ref ([] : protocol list) 281 val protocols = ref ([] : protocol list)
281 fun addProtocol p = protocols := p :: !protocols 282 fun addProtocol p = protocols := p :: !protocols
282 fun getProtocol s = List.find (fn p => #name p = s) (!protocols) 283 fun getProtocol s = List.find (fn p => #name p = s) (!protocols)
283 284
286 287
287 val curProto = ref {name = "", 288 val curProto = ref {name = "",
288 compile = "", 289 compile = "",
289 linkStatic = "", 290 linkStatic = "",
290 linkDynamic = "", 291 linkDynamic = "",
291 persistent = false} 292 persistent = false,
293 code = fn () => Print.box []}
292 fun setProtocol name = 294 fun setProtocol name =
293 case getProtocol name of 295 case getProtocol name of
294 NONE => raise Fail ("Unknown protocol " ^ name) 296 NONE => raise Fail ("Unknown protocol " ^ name)
295 | SOME p => curProto := p 297 | SOME p => curProto := p
296 fun currentProtocol () = !curProto 298 fun currentProtocol () = !curProto
439 441
440 val deadlines = ref false 442 val deadlines = ref false
441 fun setDeadlines b = deadlines := b 443 fun setDeadlines b = deadlines := b
442 fun getDeadlines () = !deadlines 444 fun getDeadlines () = !deadlines
443 445
446 val sigFile = ref (NONE : string option)
447 fun setSigFile v = sigFile := v
448 fun getSigFile () = !sigFile
449
444 end 450 end