[project @ 2001-12-14 15:26:14 by sewardj]
[ghc-hetmet.git] / ghc / lib / std / PrelGHC.hi-boot.pp
index 3dbacc3..1223735 100644 (file)
@@ -5,8 +5,7 @@
 --     primitive operations and types that GHC knows about.
 ---------------------------------------------------------------------------
 
-#include "config.h"
-#include "Derived.h"
+#include "MachDeps.h"
 
 __interface "std" PrelGHC 1 0 where
 
@@ -52,6 +51,9 @@ __export PrelGHC
   tryPutMVarzh
   isEmptyMVarzh
 
+  -- Seq
+  seq          -- Defined in MkId
+
   -- Parallel
   seqzh
   parzh
@@ -88,12 +90,12 @@ __export PrelGHC
   remIntzh
   gcdIntzh
   negateIntzh
-  iShiftLzh
-  iShiftRAzh
-  iShiftRLzh
+  uncheckedIShiftLzh
+  uncheckedIShiftRAzh
+  uncheckedIShiftRLzh
   addIntCzh
   subIntCzh
-  mulIntCzh
+  mulIntMayOflozh
 
   Wordzh
   gtWordzh
@@ -111,30 +113,43 @@ __export PrelGHC
   orzh
   notzh
   xorzh
-  shiftLzh
-  shiftRLzh
+  uncheckedShiftLzh
+  uncheckedShiftRLzh
   int2Wordzh
   word2Intzh
 
+  narrow8Intzh
+  narrow16Intzh
+  narrow32Intzh
+  narrow8Wordzh
+  narrow16Wordzh
+  narrow32Wordzh
+
+#if WORD_SIZE_IN_BITS < 32
+  Int32zh
+  Word32zh
+#endif
+
+#if WORD_SIZE_IN_BITS < 64
   Int64zh
   Word64zh
-
-  intToInt8zh
-  intToInt16zh
-  intToInt32zh
-  wordToWord8zh
-  wordToWord16zh
-  wordToWord32zh
+#endif
 
   Addrzh
+  nullAddrzh   -- Defined in MkId
+  plusAddrzh
+  minusAddrzh
+  remAddrzh
+#if (WORD_SIZE_IN_BITS == 32 || WORD_SIZE_IN_BITS == 64)
+  addr2Intzh
+  int2Addrzh
+#endif
   gtAddrzh
   geAddrzh
   eqAddrzh
   neAddrzh
   ltAddrzh
   leAddrzh
-  int2Addrzh
-  addr2Intzh
 
   Floatzh
   gtFloatzh
@@ -196,6 +211,9 @@ __export PrelGHC
   ztztzhzh
   decodeDoublezh
 
+-- Integer is implemented by foreign imports on .NET, so no primops
+
+#ifndef ILX
   cmpIntegerzh
   cmpIntegerIntzh
   plusIntegerzh
@@ -213,9 +231,13 @@ __export PrelGHC
   integer2Wordzh
   int2Integerzh
   word2Integerzh
-#ifdef SUPPORT_LONG_LONGS
-  integerToInt64zh
-  integerToWord64zh
+#if WORD_SIZE_IN_BITS < 32
+  integerToInt32zh
+  integerToWord32zh
+  int32ToIntegerzh
+  word32ToIntegerzh
+#endif  
+#if WORD_SIZE_IN_BITS < 64
   int64ToIntegerzh
   word64ToIntegerzh
 #endif
@@ -223,6 +245,7 @@ __export PrelGHC
   orIntegerzh
   xorIntegerzh
   complementIntegerzh
+#endif
 
   Arrayzh
   ByteArrayzh
@@ -247,15 +270,11 @@ __export PrelGHC
   indexInt8Arrayzh
   indexInt16Arrayzh
   indexInt32Arrayzh
-#ifdef SUPPORT_LONG_LONGS
   indexInt64Arrayzh
-#endif
   indexWord8Arrayzh
   indexWord16Arrayzh
   indexWord32Arrayzh
-#ifdef SUPPORT_LONG_LONGS
   indexWord64Arrayzh
-#endif
 
   readArrayzh
   readCharArrayzh
@@ -269,15 +288,11 @@ __export PrelGHC
   readInt8Arrayzh
   readInt16Arrayzh
   readInt32Arrayzh
-#ifdef SUPPORT_LONG_LONGS
   readInt64Arrayzh
-#endif
   readWord8Arrayzh
   readWord16Arrayzh
   readWord32Arrayzh
-#ifdef SUPPORT_LONG_LONGS
   readWord64Arrayzh
-#endif
 
   writeArrayzh
   writeCharArrayzh
@@ -291,15 +306,11 @@ __export PrelGHC
   writeInt8Arrayzh
   writeInt16Arrayzh
   writeInt32Arrayzh
-#ifdef SUPPORT_LONG_LONGS
   writeInt64Arrayzh
-#endif
   writeWord8Arrayzh
   writeWord16Arrayzh
   writeWord32Arrayzh
-#ifdef SUPPORT_LONG_LONGS
   writeWord64Arrayzh
-#endif
 
   indexCharOffAddrzh
   indexWideCharOffAddrzh
@@ -312,15 +323,11 @@ __export PrelGHC
   indexInt8OffAddrzh
   indexInt16OffAddrzh
   indexInt32OffAddrzh
-#ifdef SUPPORT_LONG_LONGS
   indexInt64OffAddrzh
-#endif
   indexWord8OffAddrzh
   indexWord16OffAddrzh
   indexWord32OffAddrzh
-#ifdef SUPPORT_LONG_LONGS
   indexWord64OffAddrzh
-#endif
 
   readCharOffAddrzh
   readWideCharOffAddrzh
@@ -333,15 +340,11 @@ __export PrelGHC
   readInt8OffAddrzh
   readInt16OffAddrzh
   readInt32OffAddrzh
-#ifdef SUPPORT_LONG_LONGS
   readInt64OffAddrzh
-#endif
   readWord8OffAddrzh
   readWord16OffAddrzh
   readWord32OffAddrzh
-#ifdef SUPPORT_LONG_LONGS
   readWord64OffAddrzh
-#endif
 
   writeCharOffAddrzh
   writeWideCharOffAddrzh
@@ -355,15 +358,11 @@ __export PrelGHC
   writeInt8OffAddrzh
   writeInt16OffAddrzh
   writeInt32OffAddrzh
-#ifdef SUPPORT_LONG_LONGS
   writeInt64OffAddrzh
-#endif
   writeWord8OffAddrzh
   writeWord16OffAddrzh
   writeWord32OffAddrzh
-#ifdef SUPPORT_LONG_LONGS
   writeWord64OffAddrzh
-#endif
 
   eqForeignObjzh
   indexCharOffForeignObjzh
@@ -377,15 +376,11 @@ __export PrelGHC
   indexInt8OffForeignObjzh
   indexInt16OffForeignObjzh
   indexInt32OffForeignObjzh
-#ifdef SUPPORT_LONG_LONGS
   indexInt64OffForeignObjzh
-#endif
   indexWord8OffForeignObjzh
   indexWord16OffForeignObjzh
   indexWord32OffForeignObjzh
-#ifdef SUPPORT_LONG_LONGS
   indexWord64OffForeignObjzh
-#endif
 
   unsafeFreezzeArrayzh         -- Note zz in the middle
   unsafeFreezzeByteArrayzh     -- Ditto
@@ -425,19 +420,19 @@ __export PrelGHC
   eqStableNamezh
   stableNameToIntzh
 
-  reallyUnsafePtrEqualityzh
-
   newBCOzh
   BCOzh
   mkApUpd0zh
 
-  unsafeCoercezh
+  unsafeCoercezh       -- unsafeCoerce# :: forall a b. a -> b
+                       -- It's defined in ghc/compiler/basicTypes/MkId.lhs
   addrToHValuezh
 ;
 
 -- Export PrelErr.error, so that others do not have to import PrelErr
 __export PrelErr error ;
 
+infixr 0 seq ;
 
 --------------------------------------------------
 instance {CCallable Charzh} = zdfCCallableCharzh;
@@ -473,3 +468,4 @@ instance __forall s => {CCallable (StablePtrzh s)} = zdfCCallableStablePtrzh;
 1 zdfCCallableMutableByteArrayzh :: __forall s => {CCallable (MutableByteArrayzh s)} ;
 1 zdfCCallableForeignObjzh :: {CCallable ForeignObjzh} ;
 1 zdfCCallableStablePtrzh :: __forall a => {CCallable (StablePtrzh a)} ;
+