X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FFastTypes.lhs;h=9f9d9038f169498fa48b0dbe29d9b3d1ba35e989;hb=06e14415fa8aef5be7d01314d08fcd87873cd0da;hp=07df3c39dfb21bde24d510f93fadb4d8a8b004b9;hpb=30d559930fff086ad3a8ef4162e7d748d1e96b70;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/FastTypes.lhs b/ghc/compiler/utils/FastTypes.lhs index 07df3c3..9f9d903 100644 --- a/ghc/compiler/utils/FastTypes.lhs +++ b/ghc/compiler/utils/FastTypes.lhs @@ -9,13 +9,15 @@ module FastTypes ( (+#), (-#), (*#), quotFastInt, negateFastInt, (==#), (<#), (<=#), (>=#), (>#), - FastBool, fastBool, _IS_TRUE_ + FastBool, fastBool, isFastTrue, fastOr ) where +#include "HsVersions.h" + #if defined(__GLASGOW_HASKELL__) -- Import the beggars -import GlaExts +import GLAEXTS ( Int(..), Int#, (+#), (-#), (*#), quotInt#, negateInt#, (==#), (<#), (<=#), (>=#), (>#) ) @@ -30,9 +32,15 @@ negateFastInt = negateInt# type FastBool = Int# fastBool True = 1# fastBool False = 0# -_IS_TRUE_ x = x ==# 1# +isFastTrue x = x ==# 1# + +fastOr 1# _ = 1# +fastOr 0# x = x + +fastAnd 0# x = 0# +fastAnd 1# x = x -#else {- ! __GLASGOW_HASKELL__ -} +#else /* ! __GLASGOW_HASKELL__ */ type FastInt = Int _ILIT x = x @@ -53,5 +61,5 @@ type FastBool = Bool fastBool x = x _IS_TRUE_ x = x -#endif {- ! __GLASGOW_HASKELL__ -} +#endif /* ! __GLASGOW_HASKELL__ */ \end{code}