SCM Repository
[smlnj] / sml / branches / blume-private-devel / src / system / Basis / Implementation / bit-flags-fn.sml |
View of /sml/branches/blume-private-devel/src/system/Basis/Implementation/bit-flags-fn.sml
Parent Directory
|
Revision Log
Revision 1452 -
(download)
(annotate)
Mon Feb 9 20:33:28 2004 UTC (16 years, 11 months ago)
File size: 549 byte(s)
Mon Feb 9 20:33:28 2004 UTC (16 years, 11 months ago)
File size: 549 byte(s)
This commit was manufactured by cvs2svn to create branch 'blume-private-devel'.
(* bit-flags-fn.sml * * COPYRIGHT (c) 2003 The Fellowship of SML/NJ * * Signature for bit flags. * *) functor BitFlagsFn () :> BIT_FLAGS = struct structure SW = SysWordImp type flags = SW.word infix ++ & val op ++ = SW.orb val op & = SW.andb val neg = SW.notb fun toWord x = x fun fromWord x = x val all : flags = ~ 0w1 val flags = foldl op ++ 0w0 val intersect = foldl op & all fun clear (m, x) = x & (neg m) fun allSet (a, b) = (a ++ b) = b fun anySet (a, b) = (a & b) <> 0w0 end
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |