import Data.Char ( ord )
import GHC.Base ( ByteArray#, MutableByteArray#, RealWorld )
-import GHC.IOBase ( IO(..) )
import GHC.Ptr ( Ptr(..) )
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
+
-- -----------------------------------------------------------------------------
-- Unlinked BCOs
literal st (MachLabel fs _ _) = litlabel st fs
literal st (MachWord w) = int st (fromIntegral w)
literal st (MachInt j) = int st (fromIntegral j)
- literal st MachNullAddr = int st (fromIntegral 0)
+ literal st MachNullAddr = int st 0
literal st (MachFloat r) = float st (fromRational r)
literal st (MachDouble r) = double st (fromRational r)
literal st (MachChar c) = int st (ord c)