/[svn]/typing/typed.ml
ViewVC logotype

Contents of /typing/typed.ml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (hide annotations)
Tue Jul 10 16:56:57 2007 UTC (5 years, 10 months ago) by abate
File size: 764 byte(s)
[r2002-10-10 15:02:36 by cvscast] Empty log message

Original author: cvscast
Date: 2002-10-10 15:02:36+00:00
1 abate 4 (* Typed abstract syntax *)
2    
3     open Location
4    
5     type tpat = Patterns.node
6     type ttyp = Types.node
7    
8     type texpr = { loc : Location.loc; mutable typ : Types.descr; descr : texpr' }
9     and texpr' =
10    
11     (* CDuce is a Lambda-calculus ... *)
12     | Var of string
13     | Apply of texpr * texpr
14     | Abstraction of abstr
15    
16     (* Data constructors *)
17     | Cst of Types.const
18     | Pair of texpr * texpr
19     | RecordLitt of (Types.label * texpr) list
20    
21     (* Data destructors *)
22     | Op of op * texpr
23     | Match of texpr * branches
24     | Map of texpr * branches
25    
26     and abstr = {
27     fun_name : string option;
28     fun_iface : (tpat * tpat) list;
29     fun_body : branches
30     }
31    
32     and branches = branch list
33     and branch = { used : bool; mutable typ : Types.descr; body : texpr }
34    
35     and op = string
36    

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5