projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2000-11-14 10:46:39 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
utils
/
BitSet.lhs
diff --git
a/ghc/compiler/utils/BitSet.lhs
b/ghc/compiler/utils/BitSet.lhs
index
bc4ea14
..
22afea6
100644
(file)
--- a/
ghc/compiler/utils/BitSet.lhs
+++ b/
ghc/compiler/utils/BitSet.lhs
@@
-1,5
+1,5
@@
%
%
-% (c) The GRASP Project, Glasgow University, 1994-1995
+% (c) The GRASP Project, Glasgow University, 1994-1998
%
\section[BitSet]{An implementation of very small sets}
%
\section[BitSet]{An implementation of very small sets}
@@
-19,13
+19,11
@@
Integer and get virtually unlimited sets.
module BitSet (
BitSet, -- abstract type
mkBS, listBS, emptyBS, unitBS,
module BitSet (
BitSet, -- abstract type
mkBS, listBS, emptyBS, unitBS,
- unionBS, minusBS
+ unionBS, minusBS, intBS
) where
#ifdef __GLASGOW_HASKELL__
) where
#ifdef __GLASGOW_HASKELL__
-#if __GLASGOW_HASKELL__ >= 202
import GlaExts
import GlaExts
-#endif
-- nothing to import
#elif defined(__YALE_HASKELL__)
{-hide import from mkdependHS-}
-- nothing to import
#elif defined(__YALE_HASKELL__)
{-hide import from mkdependHS-}
@@
-87,6
+85,10
@@
listBS s = listify s 0
_ -> n : more
shiftr x y = shiftRL# x y
_ -> n : more
shiftr x y = shiftRL# x y
+-- intBS is a bit naughty.
+intBS :: BitSet -> Int
+intBS (MkBS w#) = I# (word2Int# w#)
+
#elif defined(__YALE_HASKELL__)
data BitSet = MkBS Int
#elif defined(__YALE_HASKELL__)
data BitSet = MkBS Int