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/paths/fileid.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/paths/fileid.sml

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

revision 735, Tue Nov 21 12:15:55 2000 UTC revision 937, Thu Sep 20 21:20:28 2001 UTC
# Line 15  Line 15 
15      val compare : id * id -> order      val compare : id * id -> order
16    
17      val fileId : string -> id      val fileId : string -> id
18    
19        val canonical : string -> string
20  end  end
21    
22  structure FileId :> FILEID = struct  structure FileId :> FILEID = struct
# Line 52  Line 54 
54      in      in
55          PRESENT (F.fileId f) handle _ => ABSENT (expandPath f)          PRESENT (F.fileId f) handle _ => ABSENT (expandPath f)
56      end      end
57    
58        fun canonical "" = ""
59          | canonical f =
60            if (F.access (f, []) handle _ => false) then
61                let val f' = P.mkCanonical f
62                in
63                    if F.compare (F.fileId f, F.fileId f') = EQUAL then f'
64                    else f
65                end
66            else
67                let val { dir, file } = P.splitDirFile f
68                in
69                    P.joinDirFile { dir = canonical dir, file = file }
70                end
71  end  end

Legend:
Removed from v.735  
changed lines
  Added in v.937

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