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 296, Thu May 27 05:31:04 1999 UTC revision 297, Thu May 27 08:29:19 1999 UTC
# Line 16  Line 16 
16      val describe : info -> string      val describe : info -> string
17      val offset : info -> int      val offset : info -> int
18      val group : info -> AbsPath.t      val group : info -> AbsPath.t
     val stablePath : info -> AbsPath.t  
19      val share : info -> bool option      val share : info -> bool option
20      val error : info -> complainer      val error : GeneralParams.params -> info -> complainer
21  end  end
22    
23  structure BinInfo :> BININFO = struct  structure BinInfo :> BININFO = struct
24    
25      type complainer = GenericVC.ErrorMsg.complainer      type complainer = GenericVC.ErrorMsg.complainer
26        type region = GenericVC.SourceMap.region
27    
28      datatype info =      datatype info =
29          INFO of { group: AbsPath.t,          INFO of { group: AbsPath.t * region,
                   stablePath: AbsPath.t,  
30                    spec: string,                    spec: string,
31                    offset: int,                    offset: int,
32                    share: bool option,                    share: bool option }
                   error: complainer }  
33    
34      fun compare (INFO i, INFO i') =      fun compare (INFO i, INFO i') =
35          case Int.compare (#offset i, #offset i') of          case Int.compare (#offset i, #offset i') of
36              EQUAL => AbsPath.compare (#group i, #group i')              EQUAL => AbsPath.compare (#1 (#group i), #1 (#group i'))
37            | unequal => unequal            | unequal => unequal
38    
39      fun describe (INFO { group, spec, offset, ... }) =      fun describe (INFO { group = (group, _), spec, offset, ... }) =
40          concat [AbsPath.name group, "@", Int.toString offset, "(", spec, ")"]          concat [AbsPath.name group, "@", Int.toString offset, "(", spec, ")"]
41    
42      fun group (INFO { group = g, ... }) = g      fun group (INFO { group = (g, r), ... }) = g
43      fun offset (INFO { offset = os, ... }) = os      fun offset (INFO { offset = os, ... }) = os
     fun stablePath (INFO { stablePath = p, ... }) = p  
44      fun share (INFO { share = s, ... }) = s      fun share (INFO { share = s, ... }) = s
45      fun error (INFO { error = e, ... }) = e  
46        fun error (gp: GeneralParams.params) (INFO { group, ... }) =
47            GroupReg.error (#groupreg gp) group
48  end  end

Legend:
Removed from v.296  
changed lines
  Added in v.297

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