-- file SMTypeCons.mesa
-- last modified by Satterthwaite, August 11, 1983 1:46 pm

DIRECTORY
  Rope: TYPE USING [ROPE],
  SMTree: TYPE Tree USING [Link],
  SMTreeOps: TYPE --TreeOps-- USING [TM],
  TimeStamp: TYPE USING [Stamp];
  
SMTypeCons: CEDAR DEFINITIONS~{
  OPEN Tree~~SMTree, TreeOps~~SMTreeOps;
  
  TM: TYPE~TreeOps.TM;

  MkString: PROC[tm: TM, text: Rope.ROPE] RETURNS[Tree.Link];

 -- construction
 
  MkStringType: PROC[tm: TM] RETURNS [Tree.Link];
  MkControlType: PROC[tm: TM] RETURNS [Tree.Link];
  MkInterfaceType: PROC[tm: TM, id: ATOM←NIL] RETURNS[Tree.Link];
  MkStampType: PROC[tm: TM, stamp: TimeStamp.Stamp] RETURNS[Tree.Link];
  MkPair: PROC[tm: TM, type1, type2: Tree.Link] RETURNS[Tree.Link];
  MkCross: PROC[tm: TM, typeList: LIST OF Tree.Link] RETURNS[Tree.Link];
  MkCrossReverse: PROC[tm: TM, typeList: LIST OF Tree.Link] RETURNS[Tree.Link];
  MkCross2: PROC[tm: TM, decl, type: Tree.Link] RETURNS[Tree.Link];
  MkDeclElem: PROC[tm: TM, id: ATOM, type: Tree.Link] RETURNS[Tree.Link];
  MkDecl: PROC[tm: TM, elemList: LIST OF Tree.Link] RETURNS[Tree.Link];
  MkDeclReverse: PROC[tm: TM, elemList: LIST OF Tree.Link] RETURNS[Tree.Link];
  MkArrow: PROC[tm: TM, domain, range: Tree.Link] RETURNS[Tree.Link];
  
 -- decomposition
 
  Domain: PROC[tm: TM, arrow: Tree.Link] RETURNS[Tree.Link];
  Range: PROC[tm: TM, arrow: Tree.Link] RETURNS[Tree.Link];
   
 -- conversion
 
   GroupToDecl: PROC[tm: TM, group: Tree.Link, pattern: LIST OF ATOM←NIL]
     RETURNS[Tree.Link];

 -- utilities

  PushLink: PROC[tm: TM, link: Tree.Link];
  PopLink: PROC[tm: TM] RETURNS[Tree.Link];
  
  }.