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/compiler/Semant/statenv/bindings.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/Semant/statenv/bindings.sml

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

revision 586, Thu Mar 30 05:08:07 2000 UTC revision 587, Thu Mar 30 09:01:52 2000 UTC
# Line 41  Line 41 
41    | FIXbind of Fixity.fixity    | FIXbind of Fixity.fixity
42    
43  (* used for statenv sorting in env/statenv.sml *)  (* used for statenv sorting in env/statenv.sml *)
44  fun binderGt(bind1: S.symbol * binding,  fun binderGt ((s1, rb1), (s2, rb2)) = let
45               bind2: S.symbol * binding) =      (* hopefully the following gets optimized into an identity function
46      case (bind1,bind2)       * on tags... *)
47       of ((n1,FIXbind _),(n2,FIXbind _)) => S.symbolGt(n1,n2)      fun bnum (VALbind _) = 0
48        | ((_,FIXbind _),_) => true        | bnum (CONbind _) = 1
49        | (_,(_,FIXbind _)) => false        | bnum (TYCbind _) = 2
50        | ((n1,VALbind _),(n2,VALbind _)) => S.symbolGt(n1,n2)        | bnum (SIGbind _) = 3
51        | ((_,VALbind _),_) => true        | bnum (STRbind _) = 4
52        | (_,(_,VALbind _)) => false        | bnum (FSGbind _) = 5
53        | ((n1,CONbind _),(n2,CONbind _)) => S.symbolGt(n1,n2)        | bnum (FCTbind _) = 6
54        | ((_,CONbind _),_) => true        | bnum (FIXbind _) = 7
55        | (_,(_,CONbind _)) => false  in
56        | ((n1,TYCbind _),(n2,TYCbind _)) => S.symbolGt(n1,n2)      case Int.compare (bnum rb1, bnum rb2) of
57        | ((_,TYCbind _),_) => true          EQUAL => S.symbolGt (s1, s2)
58        | (_,(_,TYCbind _)) => false        | GREATER => true
59        | ((n1,STRbind _),(n2,STRbind _)) => S.symbolGt(n1,n2)        | LESS => false
60        | ((_,STRbind _),_) => true  end
       | (_,(_,STRbind _)) => false  
       | ((n1,FCTbind _),(n2,FCTbind _)) => S.symbolGt(n1,n2)  
       | ((_,FCTbind _),_) => true  
       | (_,(_,FCTbind _)) => false  
       | ((n1,SIGbind _),(n2,SIGbind _)) => S.symbolGt(n1,n2)  
       | ((_,SIGbind _),_) => true  
       | (_,(_,SIGbind _)) => false  
       | ((n1,FSGbind _), (n2,FSGbind _)) => S.symbolGt(n1,n2)  
61    
62  end (* local *)  end (* local *)
63  end (* structure Bindings *)  end (* structure Bindings *)
   

Legend:
Removed from v.586  
changed lines
  Added in v.587

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