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

SCM Repository

[diderot] Diff of /trunk/src/compiler/IL/check-il-fn.sml
ViewVC logotype

Diff of /trunk/src/compiler/IL/check-il-fn.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 412, Sat Oct 16 15:19:19 2010 UTC revision 413, Sat Oct 16 15:39:31 2010 UTC
# Line 31  Line 31 
31    
32    ) : sig    ) : sig
33    
34      (* check the program for type errors, etc.  The first argument will be used to
35       * identify the phase that the check follows and the return result will be true
36       * if any errors were detected.
37       *)
38        fun check : string * IL.program -> bool
39    
40    end = struct    end = struct
41    
42      structure IL = IL      structure IL = IL
# Line 140  Line 146 
146                  ]                  ]
147            end            end
148    
149        fun check (phase, IL.Program{globals, globalInit, actors}) = let
150              val errBuf = ref []
151              val errFn = errFn errBuf
152              fun final () = (case !errBuf
153                     of [] => false
154                      | errs => (
155                          Log.msg(concat["********** IL Errors detected after ", phase, " **********\n"]);
156                          List.app (fn msg => Log.msg(msg ^ "\n")) (List.rev errs);
157                          true)
158                    (* end case *))
159              in
160    (* FIXME: check the program *)
161                final()
162              end
163    
164    end    end

Legend:
Removed from v.412  
changed lines
  Added in v.413

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