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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/mid-to-low/check-ein.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/mid-to-low/check-ein.sml

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

revision 2837, Wed Nov 19 23:42:17 2014 UTC revision 2838, Tue Nov 25 03:40:24 2014 UTC
# Line 31  Line 31 
31    
32      fun mkSumMapp([],mapp)=mapp      fun mkSumMapp([],mapp)=mapp
33      | mkSumMapp(e1::ns,mapp)=(case e1      | mkSumMapp(e1::ns,mapp)=(case e1
34          of (E.V n,_,_)=>let          of (E.V n,_,_)=>(case (lookup n mapp)
35                    of NONE=> let
36              val dict=insert(n, 0) mapp              val dict=insert(n, 0) mapp
37              in mkSumMapp(ns,dict) end              in mkSumMapp(ns,dict) end
38                    | _ => raise Fail("More than one summation for Index<"^Int.toString(n)^">")
39                    (*end case*))
40          | _ =>raise Fail"non-variable index in summation")          | _ =>raise Fail"non-variable index in summation")
41    
42    

Legend:
Removed from v.2837  
changed lines
  Added in v.2838

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