Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/compiler/ElabData/basics/primopid.sml
ViewVC logotype

Diff of /sml/trunk/compiler/ElabData/basics/primopid.sml

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

revision 1982, Tue Jul 18 02:39:07 2006 UTC revision 1983, Tue Jul 18 14:15:36 2006 UTC
# Line 37  Line 37 
37        (case List.nth(elems, slot)        (case List.nth(elems, slot)
38          of StrE elems' => elems'          of StrE elems' => elems'
39           | PrimE _ => bug "PrimOpId.selStrPrimId: unexpected PrimE")           | PrimE _ => bug "PrimOpId.selStrPrimId: unexpected PrimE")
40          handle Subscript => bug "PrimOpId.selStrPrimId Subscript"
41          (* This bug happens if we got a primid for a value          (* This bug happens if we got a primid for a value
42             component when we expected a strPrimElem for a             component when we expected a strPrimElem for a
43             structure *)             structure *)
# Line 47  Line 48 
48          of PrimE(id) => id          of PrimE(id) => id
49           | _ =>           | _ =>
50             bug "PrimOpId.selValPrimFromStrPrim: unexpected StrE"             bug "PrimOpId.selValPrimFromStrPrim: unexpected StrE"
51        )        ) handle Subscript => bug "PrimOpId.selValPrimFromStrPrim Subscript"
52             (* This bug occurs if we got a substructure's             (* This bug occurs if we got a substructure's
53                strPrimElem instead of an expected value component's                strPrimElem instead of an expected value component's
54                primId *)                primId *)
55    
56      fun ppPrim NonPrim = print "<NonPrim>"
57        | ppPrim (Prim p) = print ("<PrimE "^p^">")
58    
59      fun ppStrInfo strelems =
60          let fun ppElem [] = ()
61                | ppElem ((PrimE p)::xs) = (ppPrim p; ppElem xs)
62                | ppElem ((StrE s)::xs) = (ppStrInfo s; ppElem xs)
63          in (print "[ "; ppElem strelems; print " ]\n")
64          end
65  (*  (*
66      fun selStrInfo (StrE l, i) =      fun selStrInfo (StrE l, i) =
67          (List.nth (l, i) handle Subscript => bug "Wrong field in List")          (List.nth (l, i) handle Subscript => bug "Wrong field in List")

Legend:
Removed from v.1982  
changed lines
  Added in v.1983

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