home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Moscow ML 1.31 / source code / mosml / src / compiler / Lambda.sml < prev    next >
Encoding:
Text File  |  1996-07-03  |  793 b   |  35 lines  |  [TEXT/R*ch]

  1. (* The intermediate language: extended lambda-calculus in de
  2.     Bruijn's notation *)
  3.  
  4. local
  5.   open Const Prim;
  6. in
  7.  
  8. datatype Lambda =
  9.     Lvar of int
  10.   | Lconst of StructConstant
  11.   | Lapply of Lambda * Lambda list
  12.   | Lfn of Lambda
  13.   | Llet of Lambda list * Lambda
  14.   | Lletrec of Lambda list * Lambda
  15.   | Lprim of primitive * Lambda list
  16.   | Lcase of Lambda * (SCon * Lambda) list
  17.   | Lswitch of int * Lambda * (BlockTag * Lambda) list
  18.   | Lstaticfail
  19.   | Lstatichandle of Lambda * Lambda
  20.   | Lhandle of Lambda * Lambda
  21.   | Lif of Lambda * Lambda * Lambda
  22.   | Lseq of Lambda * Lambda
  23.   | Lwhile of Lambda * Lambda
  24.   | Landalso of Lambda * Lambda
  25.   | Lorelse of Lambda * Lambda
  26.   | Lunspec
  27.   | Lshared of Lambda * int ref
  28. ;
  29.  
  30. fun shared_lambda lam =
  31.   Lshared(lam, ref Instruct.Nolabel)
  32. ;
  33.  
  34. end;
  35.