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/ml-nlffi-lib/c.sig
ViewVC logotype

Diff of /sml/trunk/src/ml-nlffi-lib/c.sig

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

revision 837, Fri Jun 1 17:27:54 2001 UTC revision 840, Fri Jun 15 19:05:19 2001 UTC
# Line 15  Line 15 
15       * Witness types are often the same as the (abstract) type of the value       * Witness types are often the same as the (abstract) type of the value
16       * stored in the object.  However, this is merely a coincidence.  For       * stored in the object.  However, this is merely a coincidence.  For
17       * example, a constant object holding a pointer to a read-write integer       * example, a constant object holding a pointer to a read-write integer
18       * would have type ((sint, unit, rw) ptr, unit, ro) obj and the value       * would have type ((sint, rw) ptr, ro) obj and the value itself has
19       * itself has type (sint, unit, rw) ptr.       * type (sint, rw) ptr.
20       * However, in the case of the "light" version of this object (see below),       * However, in the case of the "light" version of this object (see below),
21       *  the object type is ((sint, unit, rw) ptr, unit, ro) obj' while fetching       * the object type is ((sint, rw) ptr, ro) obj' while fetching
22       * from this object gives a value of type (sint, unit, rw) ptr'.       * from this object gives a value of type (sint, rw) ptr'.
23       * (In other words, we use the "heavy" versions of value types as witness       * (In other words, we use the "heavy" versions of value types as witness
24       * types -- even in the "light" case.) *)       * types -- even in the "light" case.) *)
25      type ('t, 'c) obj      type ('t, 'c) obj
# Line 29  Line 29 
29      type ('t, 'c) obj'      type ('t, 'c) obj'
30    
31      (* constness property, to be substituted for 'c *)      (* constness property, to be substituted for 'c *)
32      type ro      type ro and rw
     type rw  
33    
34      (* things to be substituted for 't *)      (* things to be substituted for 't *)
35      type ('t, 'c) ptr                   (* pointer to ('t, 'c) obj *)      type ('t, 'c) ptr                   (* pointer to ('t, 'c) obj *)
# Line 52  Line 51 
51                                           * defined in the Tag module *)                                           * defined in the Tag module *)
52    
53      (* primtypes (signed/unsigned char, int, short, long; float, double) *)      (* primtypes (signed/unsigned char, int, short, long; float, double) *)
54      type schar      type schar  and uchar
55      type uchar      type sint   and uint
56      type sint      type sshort and ushort
57      type uint      type slong  and ulong
58      type sshort      type float  and double
     type ushort  
     type slong  
     type ulong  
     type float  
     type double  
59    
60      (* going from abstract to concrete and vice versa *)      (* going from abstract to concrete and vice versa *)
61      structure Cvt : sig      structure Cvt : sig
# Line 121  Line 115 
115      type ('s, 'c) su_obj' = ('s su, 'c) obj'      type ('s, 'c) su_obj' = ('s su, 'c) obj'
116    
117      (* bitfields aren't "ordinary objects", so they have their own type *)      (* bitfields aren't "ordinary objects", so they have their own type *)
118      type 'c sbf      type 'c sbf and 'c ubf
     type 'c ubf  
119    
120      (*      (*
121       * A family of types and corresponding values representing natural numbers.       * A family of types and corresponding values representing natural numbers.
# Line 154  Line 147 
147           * is the same as "dec dg<Dn> ... dg<D0> dim".  The type of the zero           * is the same as "dec dg<Dn> ... dg<D0> dim".  The type of the zero
148           * value is "(dec, zero) dim0". *)           * value is "(dec, zero) dim0". *)
149          type dec          type dec
150          type 'a dg0          type 'a dg0 and 'a dg1 and 'a dg2 and 'a dg3 and 'a dg4
151          type 'a dg1          type 'a dg5 and 'a dg6 and 'a dg7 and 'a dg8 and 'a dg9
         type 'a dg2  
         type 'a dg3  
         type 'a dg4  
         type 'a dg5  
         type 'a dg6  
         type 'a dg7  
         type 'a dg8  
         type 'a dg9  
152    
153          (* Here are the corresponding constructors for ('a, 'z) dim0 values.          (* Here are the corresponding constructors for ('a, 'z) dim0 values.
154           * The type for dg0 ensures that there will be no "leading zeros" in           * The type for dg0 ensures that there will be no "leading zeros" in

Legend:
Removed from v.837  
changed lines
  Added in v.840

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