Commit 53ef684d authored by panne's avatar panne
Browse files

[project @ 2003-09-16 17:50:15 by panne]

Make "one of the most hammered bits in the whole compiler" (quotation
from the source code :-) compile without _ccall_
parent ce08a14f
......@@ -79,11 +79,19 @@ mkSplitUniqSupply (C# c#)
return (MkSplitUniqSupply uniq s1 s2)
)
mk_unique = _ccall_ genSymZh >>= \ (W# u#) ->
mk_unique =
#if __GLASGOW_HASKELL__ < 603
_ccall_
#endif
genSymZh >>= \ (W# u#) ->
return (I# (w2i (mask# `or#` u#)))
in
mk_supply#
#if __GLASGOW_HASKELL__ >= 603
foreign import ccall unsafe "genSymZh" genSymZh :: IO Word
#endif
splitUniqSupply (MkSplitUniqSupply _ s1 s2) = (s1, s2)
\end{code}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment