Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/compiler/TopLevel/bootstrap/shareglue.sml
ViewVC logotype

Annotation of /sml/trunk/src/compiler/TopLevel/bootstrap/shareglue.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 16 - (view) (download)

1 : monnier 16 (* Copyright 1997 by AT&T Bell Laboratories *)
2 :     (* shareglue.sml *)
3 :    
4 :     (*
5 :     * This is the functor that builds up the interactive compiler;
6 :     * it starts by loading the primEnv, and all stuff in the boot
7 :     * directory. It is triggered by applying this functor to the
8 :     * the XXVisComp structure specific to architecture XX.
9 :     *)
10 :     functor IntShare (structure VC : VISCOMP) : sig end =
11 :     struct
12 :     structure BootEnv = BootEnvF(VC)
13 :    
14 :     (* environment initializations *)
15 :     val _ = (#set VC.EnvRef.pervasive (SCEnv.SC (BootEnv.makePervEnv())))
16 :    
17 :     (* establish default signal handlers *)
18 :     local
19 :     fun handleINT _ = !Unsafe.topLevelCont
20 :     fun handleTERM _ = OS.Process.exit OS.Process.failure
21 :     fun ifSignal (sigName, handler) =
22 :     (case Signals.fromString sigName
23 :     of SOME s =>
24 :     (Signals.overrideHandler (s, Signals.HANDLER handler); ())
25 :     | _ => ())
26 :     in val _ = (
27 :     Signals.overrideHandler (Signals.sigINT, Signals.HANDLER handleINT);
28 :     Signals.overrideHandler (Signals.sigTERM, Signals.HANDLER handleTERM);
29 :     ifSignal ("QUIT", handleTERM))
30 :     end
31 :    
32 :     (* launch interactive loop *)
33 :     val _ = (
34 :     Control.Print.say "Go for it\n";
35 :     VC.Interact.interact())
36 :    
37 :     end (* functor IntShare *)
38 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0