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

Public Member Functions

String toString ()
 

Package Functions

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

Package Attributes

final String _arg0
 
final Syntax _body
 

Detailed Description

Definition at line 80 of file HM1.java.

Constructor & Destructor Documentation

◆ Lambda()

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

Definition at line 83 of file HM1.java.

83 { _arg0=arg0; _body=body; }

References com.cliffc.aa.HM.HM1.Lambda._arg0, and com.cliffc.aa.HM.HM1.Lambda._body.

Member Function Documentation

◆ hm()

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

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

Definition at line 85 of file HM1.java.

85  {
86  HMVar tnew = new HMVar();
87  // Push _arg0->tnew into env & nongen, popping them off after doing body
88  env.put(_arg0,tnew);
89  nongen.add(tnew);
90  HMType trez = _body.hm(env,nongen);
91  nongen.remove(tnew);
92  env.remove(_arg0);
93  return Oper.fun(tnew,trez);
94  }

References com.cliffc.aa.HM.HM1.Lambda._arg0, com.cliffc.aa.HM.HM1.Lambda._body, com.cliffc.aa.HM.HM1.Oper.fun(), and com.cliffc.aa.HM.HM1.Syntax.hm().

Here is the call graph for this function:

◆ toString()

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

Definition at line 84 of file HM1.java.

84 { return "{ "+_arg0+" -> "+_body+" }"; }

References com.cliffc.aa.HM.HM1.Lambda._arg0, and com.cliffc.aa.HM.HM1.Lambda._body.

Member Data Documentation

◆ _arg0

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

◆ _body

final Syntax com.cliffc.aa.HM.HM1.Lambda._body
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.Lambda._arg0
final String _arg0
Definition: HM1.java:81
com.cliffc.aa.HM.HM1.Lambda._body
final Syntax _body
Definition: HM1.java:82