Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /trunk/src/typechecker/typechecker.sml
ViewVC logotype

Annotation of /trunk/src/typechecker/typechecker.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 69 - (view) (download)

1 : jhr 69 (* typechecker.sml
2 :     *
3 :     * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *)
6 :    
7 :     structure Typechecker : sig
8 :    
9 :     val check : ParseTree.program -> AST.program
10 :    
11 :     end = struct
12 :    
13 :     structure Ty = Types
14 :    
15 :     (* check the well-formedness of a type and translate it to an AST type *)
16 :     fun checkTy ty = (case ty
17 :     of PT.T_Mark of ty mark
18 :     | PT.T_Bool =>
19 :     | PT.T_Int
20 :     | PT.T_Real
21 :     | PT.T_String
22 :     | PT.T_Vec of dim
23 :     | PT.T_Kernel of dim
24 :     | PT.T_Field of {diff : dim, order : dim list, dim : dim}
25 :     | PT.T_Tensor of dim list
26 :     | PT.T_Image of {order : dim list, dim : dim}
27 :     | PT.T_Array of ty * dim list
28 :     (* end case *))
29 :    
30 :     end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0