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/branches/SMLNJ/src/smlnj-lib/Reactive/instruction.sml
ViewVC logotype

Annotation of /sml/branches/SMLNJ/src/smlnj-lib/Reactive/instruction.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download)
Original Path: sml/trunk/src/smlnj-lib/Reactive/instruction.sml

1 : monnier 2 (* instruction.sml
2 :     *
3 :     * COPYRIGHT (c) 1997 Bell Labs, Lucent Technologies.
4 :     *
5 :     * An AST representation of reactive scripts.
6 :     *)
7 :    
8 :     structure Instruction =
9 :     struct
10 :    
11 :     datatype 'a config
12 :     = posConfig of 'a
13 :     | negConfig of 'a
14 :     | orConfig of ('a config * 'a config)
15 :     | andConfig of ('a config * 'a config)
16 :    
17 :     type signal = Atom.atom
18 :    
19 :     datatype 'a instr
20 :     = || of ('a instr * 'a instr)
21 :     | & of ('a instr * 'a instr)
22 :     | nothing
23 :     | stop
24 :     | suspend
25 :     | action of 'a -> unit
26 :     | exec of {
27 :     start : 'a -> unit,
28 :     stop : 'a -> unit,
29 :     done : 'a -> bool
30 :     }
31 :     | ifThenElse of (('a -> bool) * 'a instr * 'a instr)
32 :     | repeat of (int * 'a instr)
33 :     | loop of 'a instr
34 :     | close of 'a instr
35 :     | signal of (signal * 'a instr)
36 :     | rebind of (signal * signal * 'a instr)
37 :     | when of (signal config * 'a instr * 'a instr)
38 :     | trapWith of (signal config * 'a instr * 'a instr)
39 :     | emit of signal
40 :     | await of signal config
41 :    
42 :     end;

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