aa
com.cliffc.aa.HM.HM1.Let Class Reference
Inheritance diagram for com.cliffc.aa.HM.HM1.Let:
[legend]
Collaboration diagram for com.cliffc.aa.HM.HM1.Let:
[legend]

Public Member Functions

String toString ()
 

Package Functions

 Let (String arg0, Syntax def, Syntax body)
 
HMType hm (HashMap< String, HMType > env, HashSet< HMVar > nongen)
 

Package Attributes

final String _arg0
 
final Syntax _body
 
final Syntax _def
 

Detailed Description

Definition at line 119 of file HM1.java.

Constructor & Destructor Documentation

◆ Let()

com.cliffc.aa.HM.HM1.Let.Let ( String  arg0,
Syntax  def,
Syntax  body 
)
package

Definition at line 122 of file HM1.java.

122 { _arg0=arg0; _def=def; _body=body; }

References com.cliffc.aa.HM.HM1.Let._arg0, com.cliffc.aa.HM.HM1.Let._body, and com.cliffc.aa.HM.HM1.Let._def.

Member Function Documentation

◆ hm()

HMType com.cliffc.aa.HM.HM1.Let.hm ( HashMap< String, HMType env,
HashSet< HMVar nongen 
)
package

Reimplemented from com.cliffc.aa.HM.HM1.Syntax.

Definition at line 124 of file HM1.java.

124  {
125  HMVar tndef = new HMVar();
126  // Push _arg0->tnew into env & nongen, popping them off after doing body
127  env.put(_arg0,tndef);
128  nongen.add(tndef);
129  HMType tdef = _def.hm(env,nongen);
130  nongen.remove(tndef);
131  tndef.union(tdef);
132  HMType trez = _body.hm(env,nongen);
133  env.remove(_arg0);
134  return trez;
135  }

References com.cliffc.aa.HM.HM1.Let._arg0, com.cliffc.aa.HM.HM1.Let._body, com.cliffc.aa.HM.HM1.Let._def, com.cliffc.aa.HM.HM1.Syntax.hm(), and com.cliffc.aa.HM.HM1.HMVar.union().

Here is the call graph for this function:

◆ toString()

String com.cliffc.aa.HM.HM1.Let.toString ( )

Definition at line 123 of file HM1.java.

123 { return "let "+_arg0+" = "+_def+" in "+_body+" }"; }

References com.cliffc.aa.HM.HM1.Let._arg0, com.cliffc.aa.HM.HM1.Let._body, and com.cliffc.aa.HM.HM1.Let._def.

Member Data Documentation

◆ _arg0

final String com.cliffc.aa.HM.HM1.Let._arg0
package

◆ _body

final Syntax com.cliffc.aa.HM.HM1.Let._body
package

◆ _def

final Syntax com.cliffc.aa.HM.HM1.Let._def
package

The documentation for this class was generated from the following file:
com.cliffc.aa.HM.HM1.Syntax.hm
abstract HMType hm(HashMap< String, HMType > env, HashSet< HMVar > nongen)
com.cliffc.aa.HM.HM1.Let._arg0
final String _arg0
Definition: HM1.java:120
com.cliffc.aa.HM.HM1.Let._body
final Syntax _body
Definition: HM1.java:121
com.cliffc.aa.HM.HM1.Let._def
final Syntax _def
Definition: HM1.java:121
com.cliffc.aa.HM.HM1.HMType.union
abstract HMType union(HMType t)