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

SCM Repository

[smlnj] View of /sml/trunk/src/smlnj-lib/Reactive/instruction.sml
ViewVC logotype

View of /sml/trunk/src/smlnj-lib/Reactive/instruction.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (download) (annotate)
Sat Oct 4 23:33:09 1997 UTC (23 years, 8 months ago) by monnier
File size: 1020 byte(s)
Initial revision
(* instruction.sml
 *
 * COPYRIGHT (c) 1997 Bell Labs, Lucent Technologies.
 *
 * An AST representation of reactive scripts.
 *)

structure Instruction =
  struct

    datatype 'a config
      = posConfig of 'a
      | negConfig of 'a
      | orConfig of ('a config * 'a config)
      | andConfig of ('a config * 'a config)

    type signal = Atom.atom

    datatype 'a instr
      = || of ('a instr * 'a instr)
      | & of ('a instr * 'a instr)
      | nothing
      | stop
      | suspend
      | action of 'a -> unit
      | exec of {
	    start : 'a -> unit,
	    stop : 'a -> unit,
	    done : 'a -> bool
	  }
      | ifThenElse of (('a -> bool) * 'a instr * 'a instr)
      | repeat of (int * 'a instr)
      | loop of 'a instr
      | close of 'a instr
      | signal of (signal * 'a instr)
      | rebind of (signal * signal * 'a instr)
      | when of (signal config * 'a instr * 'a instr)
      | trapWith of (signal config * 'a instr * 'a instr)
      | emit of signal
      | await of signal config

  end;

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