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/src/cm/stable/bininfo.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/stable/bininfo.sml

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

revision 305, Mon May 31 15:00:06 1999 UTC revision 306, Tue Jun 1 08:25:21 1999 UTC
# Line 14  Line 14 
14      type complainer = GenericVC.ErrorMsg.complainer      type complainer = GenericVC.ErrorMsg.complainer
15      type region = GenericVC.SourceMap.region      type region = GenericVC.SourceMap.region
16    
17      val new : { group: AbsPath.t * region,      val new : { group: AbsPath.t,
18                    error: complainer,
19                  spec: string,                  spec: string,
20                  offset: int,                  offset: int,
21                  share: bool option } -> info                  share: bool option } -> info
# Line 24  Line 25 
25      val offset : info -> int      val offset : info -> int
26      val group : info -> AbsPath.t      val group : info -> AbsPath.t
27      val share : info -> bool option      val share : info -> bool option
28      val error : GeneralParams.info -> info -> complainer      val error : info -> complainer
29  end  end
30    
31  structure BinInfo :> BININFO = struct  structure BinInfo :> BININFO = struct
# Line 33  Line 34 
34      type region = GenericVC.SourceMap.region      type region = GenericVC.SourceMap.region
35    
36      datatype info =      datatype info =
37          INFO of { group: AbsPath.t * region,          INFO of { group: AbsPath.t,
38                    spec: string,                    spec: string,
39                    offset: int,                    offset: int,
40                    share: bool option }                    share: bool option,
41                      error: complainer }
42    
43      type ord_key = info      type ord_key = info
44    
# Line 44  Line 46 
46    
47      fun compare (INFO i, INFO i') =      fun compare (INFO i, INFO i') =
48          case Int.compare (#offset i, #offset i') of          case Int.compare (#offset i, #offset i') of
49              EQUAL => AbsPath.compare (#1 (#group i), #1 (#group i'))              EQUAL => AbsPath.compare (#group i, #group i')
50            | unequal => unequal            | unequal => unequal
51    
52      fun describe (INFO { group = (group, _), spec, offset, ... }) =      fun describe (INFO { group, spec, offset, ... }) =
53          concat [AbsPath.name group, "@", Int.toString offset, "(", spec, ")"]          concat [AbsPath.name group, "@", Int.toString offset, "(", spec, ")"]
54    
55      fun group (INFO { group = (g, r), ... }) = g      fun group (INFO { group = g, ... }) = g
56      fun offset (INFO { offset = os, ... }) = os      fun offset (INFO { offset = os, ... }) = os
57      fun share (INFO { share = s, ... }) = s      fun share (INFO { share = s, ... }) = s
58    
59      fun error (gp: GeneralParams.info) (INFO { group, ... }) =      fun error (INFO { error = e, ... }) = e
         GroupReg.error (#groupreg gp) group  
60  end  end

Legend:
Removed from v.305  
changed lines
  Added in v.306

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