[finish moving primitive types to Jhc.Type.* get rid of all 'PrimitiveOperators' related hacks. rejoice.
John Meacham <john@repetae.net>**20120124084933
 Ignore-this: 7e619c2f69a37429be32b6b63b57701
] hunk ./Makefile.am 7
-BUILT_SOURCES= src/PrimitiveOperators.hs src/RtsFiles.hs src/RawFiles.hs src/FrontEnd/HsParser.hs src/FlagDump.hs \
+BUILT_SOURCES= src/RtsFiles.hs src/RawFiles.hs src/FrontEnd/HsParser.hs src/FlagDump.hs \
hunk ./Makefile.am 30
-	src/Name/Prim.hs src/PackedString.hs src/PrimitiveOperators.hs src/Ho/ReadSource.hs \
+	src/Name/Prim.hs src/PackedString.hs src/Ho/ReadSource.hs \
hunk ./Makefile.am 150
-src/PrimitiveOperators.hs: utils/op_process.prl src/data/primitives.txt src/data/PrimitiveOperators-in.hs
-	perl $< > $@ || rm -f $@
-
-src/Name/Prim.hs: utils/op_names.prl src/data/primitives.txt src/data/names.txt
+src/Name/Prim.hs: utils/op_names.prl src/data/names.txt
hunk ./lib/base/Data/Typeable.hs 4
-
hunk ./lib/base/Data/Typeable.hs 7
-
-data TypeRep = TypeRep Addr__ [TypeRep]
+type String_ = BitsPtr_
hunk ./lib/base/Data/Typeable.hs 9
+data TypeRep = TypeRep String_ [TypeRep]
hunk ./lib/base/Data/Typeable.hs 11
-showsAddr__ :: Addr__ -> [Char] -> [Char]
+showsAddr__ :: String_ -> [Char] -> [Char]
hunk ./lib/base/Data/Typeable.hs 21
-
hunk ./lib/base/Data/Typeable.hs 26
-
hunk ./lib/base/Data/Typeable.hs 40
-
hunk ./lib/base/Data/Typeable.hs 152
-
hunk ./lib/base/Data/Typeable.hs 158
-
hunk ./lib/jhc/Data/Char.hs 19
---import Data.Word(Word())
hunk ./lib/jhc/Data/Int.hs 4
-import Jhc.Prim(Int())
-
-data Int8
-data Int16
-data Int32
-data Int64
-data IntMax
-data IntPtr
+import Jhc.Type.Word
hunk ./lib/jhc/Data/Word.hs 4
-data Word
-data Word8
-data Word16
-data Word32
-data Word64
-data WordMax
-data WordPtr
+import Jhc.Type.Word
hunk ./lib/jhc/Foreign/Ptr.hs 44
-castFunPtrToPtr (FunPtr x) = Ptr x
+castFunPtrToPtr (FunPtr (FunAddr_ x)) = Ptr (Addr_ x)
hunk ./lib/jhc/Foreign/Ptr.hs 47
-castPtrToFunPtr (Ptr x) = FunPtr x
+castPtrToFunPtr (Ptr (Addr_ x)) = FunPtr (FunAddr_ x)
hunk ./lib/jhc/Foreign/Ptr.hs 61
-foreign import primitive "box" boxWordPtr :: BitsPtr_ -> WordPtr
-foreign import primitive "unbox" unboxWordPtr :: WordPtr -> BitsPtr_
+foreign import primitive "box" boxWordPtr :: Addr_ -> WordPtr
+foreign import primitive "unbox" unboxWordPtr :: WordPtr -> Addr_
hunk ./lib/jhc/Foreign/Storable.hs 31
-INST_STORABLE((Ptr a),Ptr,BitsPtr_,bits<ptr>)
-INST_STORABLE((FunPtr a),FunPtr,BitsPtr_,bits<ptr>)
+INST_STORABLE((Ptr a),Ptr,Addr_,bits<ptr>)
+INST_STORABLE((FunPtr a),FunPtr,FunAddr_,bits<ptr>)
hunk ./lib/jhc/Foreign/Storable.m4 11
-    sizeOf _ = boxInt (sizeOf$3 0#)
-    alignment _ = boxInt (alignmentOf$3 0#)
+    sizeOf _ = (sizeOf$3 0#)
+    alignment _ = (alignmentOf$3 0#)
hunk ./lib/jhc/Foreign/Storable.m4 17
-foreign import primitive "sizeOf.$4" sizeOf$3 :: $3 -> Int__
-foreign import primitive "alignmentOf.$4" alignmentOf$3 :: $3 -> Int__
+foreign import primitive "sizeOf.$4" sizeOf$3 :: $3 -> Int
+foreign import primitive "alignmentOf.$4" alignmentOf$3 :: $3 -> Int
hunk ./lib/jhc/Foreign/Storable.m4 31
-    sizeOf _ = boxInt (sizeOf$1 0#)
-    alignment _ = boxInt (alignmentOf$1 0#)
+    sizeOf _ = (sizeOf$1 0#)
+    alignment _ = (alignmentOf$1 0#)
hunk ./lib/jhc/Foreign/Storable.m4 37
-foreign import primitive "sizeOf.$3" sizeOf$1 :: $2 -> Int__
-foreign import primitive "alignmentOf.$3" alignmentOf$1 :: $2 -> Int__
+foreign import primitive "sizeOf.$3" sizeOf$1 :: $2 -> Int
+foreign import primitive "alignmentOf.$3" alignmentOf$1 :: $2 -> Int
hunk ./lib/jhc/Jhc/Addr.hs 2
-
hunk ./lib/jhc/Jhc/Addr.hs 26
-INST_EQORDER((Ptr a),Ptr,BitsPtr_,U)
-INST_EQORDER((FunPtr a),FunPtr,BitsPtr_,U)
+INST_EQORDER((Ptr a),Ptr,Addr_,U)
+INST_EQORDER((FunPtr a),FunPtr,FunAddr_,U)
hunk ./lib/jhc/Jhc/Addr.hs 36
-minusPtr (Ptr a1) (Ptr a2) = boxInt (ptrToInt__ (a1 `minusWP` a2))
+minusPtr (Ptr a1) (Ptr a2) = boxInt (a1 `minusWP` a2)
hunk ./lib/jhc/Jhc/Addr.hs 38
-foreign import primitive "Sx" intToPtr__ :: Int__ -> BitsPtr_
-foreign import primitive "I2I" ptrToInt__ :: BitsPtr_ -> Int__
+foreign import primitive "Sx" intToPtr__ :: Int__ -> Addr_
+foreign import primitive "I2I" ptrToInt__ :: Addr_ -> Int__
hunk ./lib/jhc/Jhc/Addr.hs 41
-foreign import primitive "Add" plusWordPtr :: BitsPtr_ -> BitsPtr_ -> BitsPtr_
-foreign import primitive "Sub" minusWP :: BitsPtr_ -> BitsPtr_ -> BitsPtr_
+foreign import primitive "Add" plusWordPtr :: Addr_ -> Addr_ -> Addr_
+foreign import primitive "Sub" minusWP :: Addr_ -> Addr_ -> Int__
hunk ./lib/jhc/Jhc/Array.hs 13
-foreign import primitive newMutArray__      :: Int__ -> a -> UIO (MutArray__ a)
-foreign import primitive newBlankMutArray__ :: Int__ -> UIO (MutArray__ a)
-foreign import primitive copyArray__        :: Int__ -> Int__ -> Int__ -> Array__ a -> MutArray__ a -> UIO_
-foreign import primitive copyMutArray__     :: Int__ -> Int__ -> Int__ -> MutArray__ a -> MutArray__ a -> UIO_
-foreign import primitive readArray__        :: MutArray__ a -> Int__ -> UIO a
-foreign import primitive writeArray__       :: MutArray__ a -> Int__ -> a -> UIO_
-foreign import primitive indexArray__       :: Array__ a -> Int__ -> (# a #)
+foreign import primitive newMutArray__      :: Int_ -> a -> UIO (MutArray__ a)
+foreign import primitive newBlankMutArray__ :: Int_ -> UIO (MutArray__ a)
+foreign import primitive copyArray__        :: Int_ -> Int_ -> Int_ -> Array__ a -> MutArray__ a -> UIO_
+foreign import primitive copyMutArray__     :: Int_ -> Int_ -> Int_ -> MutArray__ a -> MutArray__ a -> UIO_
+foreign import primitive readArray__        :: MutArray__ a -> Int_ -> UIO a
+foreign import primitive writeArray__       :: MutArray__ a -> Int_ -> a -> UIO_
+foreign import primitive indexArray__       :: Array__ a -> Int_ -> (# a #)
hunk ./lib/jhc/Jhc/Basics.hs 2
-module Jhc.Basics(module Jhc.Basics, module Jhc.Prim, module Jhc.Prim.Prim) where
+module Jhc.Basics(module Jhc.Basics, module Jhc.Prim.Prim, module Jhc.Type.Basic, IO()) where
hunk ./lib/jhc/Jhc/Basics.hs 4
-import Jhc.Int
-import Jhc.Prim
+import Jhc.Type.Basic
hunk ./lib/jhc/Jhc/Basics.hs 6
-
-data Integer
-
-type String = [Char]
+import Jhc.Prim.IO
hunk ./lib/jhc/Jhc/Basics.hs 124
+unsafeChr :: Int -> Char
+unsafeChr = chr
+
+{-
hunk ./lib/jhc/Jhc/Basics.hs 134
-unsafeChr :: Int -> Char
-unsafeChr = chr
-
-{-
hunk ./lib/jhc/Jhc/Basics.hs 146
+
+foreign import primitive "B2B" ord :: Char -> Int
+foreign import primitive "B2B" chr :: Int -> Char
hunk ./lib/jhc/Jhc/Enum.hs 8
-import Jhc.Prim.Bits
+--import Jhc.Prim.Bits
hunk ./lib/jhc/Jhc/Enum.hs 10
+import Jhc.Type.Basic
+import Jhc.Type.Word
hunk ./lib/jhc/Jhc/Float.hs 2
-
hunk ./lib/jhc/Jhc/Float.hs 137
-foreign import primitive "box" boxBool :: Bool__ -> Bool
hunk ./lib/jhc/Jhc/Float.hs 192
-    $1 x == $1 y = boxBool (x `eq$2` y)
-    $1 x /= $1 y = boxBool (x `neq$2` y)
+    $1 x == $1 y = (x `eq$2` y)
+    $1 x /= $1 y = (x `neq$2` y)
hunk ./lib/jhc/Jhc/Float.hs 196
-    $1 x < $1 y = boxBool (flt$2 x y)
-    $1 x > $1 y = boxBool (fgt$2 x y)
-    $1 x <= $1 y = boxBool (flte$2 x y)
-    $1 x >= $1 y = boxBool (fgte$2 x y)
+    $1 x < $1 y = (flt$2 x y)
+    $1 x > $1 y = (fgt$2 x y)
+    $1 x <= $1 y = (flte$2 x y)
+    $1 x >= $1 y = (fgte$2 x y)
hunk ./lib/jhc/Jhc/Float.hs 201
-foreign import primitive "FEq" eq$2   :: $2 -> $2 -> Bool__
-foreign import primitive "FNEq" neq$2 :: $2 -> $2 -> Bool__
-foreign import primitive "FLt" flt$2  :: $2 -> $2 -> Bool__
-foreign import primitive "FLte" flte$2 :: $2 -> $2 -> Bool__
-foreign import primitive "FGt" fgt$2 :: $2 -> $2 -> Bool__
-foreign import primitive "FGte" fgte$2 :: $2 -> $2 -> Bool__
+foreign import primitive "FEq" eq$2   :: $2 -> $2 -> Bool
+foreign import primitive "FNEq" neq$2 :: $2 -> $2 -> Bool
+foreign import primitive "FLt" flt$2  :: $2 -> $2 -> Bool
+foreign import primitive "FLte" flte$2 :: $2 -> $2 -> Bool
+foreign import primitive "FGt" fgt$2 :: $2 -> $2 -> Bool
+foreign import primitive "FGte" fgte$2 :: $2 -> $2 -> Bool
hunk ./lib/jhc/Jhc/Handle.hs 115
-toStr ReadMode = "r"#
-toStr WriteMode = "w"#
-toStr AppendMode = "a"#
-toStr ReadWriteMode = "r+"#
+toStr x = Addr_ (case x of
+    ReadMode -> "r"#
+    WriteMode -> "w"#
+    AppendMode -> "a"#
+    ReadWriteMode -> "r+"#)
hunk ./lib/jhc/Jhc/Inst/PrimEnum.hs 8
+import Jhc.Basics
hunk ./lib/jhc/Jhc/Int.hs 4
-module Jhc.Int(Int(),Int__(),increment,decrement,plus,minus,times,divide,modulus,zero,one,boxInt,unboxInt) where
+module Jhc.Int(Int(),Int_(),increment,decrement,plus,minus,times,divide,modulus,zero,one,boxInt,unboxInt) where
hunk ./lib/jhc/Jhc/Int.hs 6
-import Jhc.Prim(Int(),Int__())
+import Jhc.Type.Word(Int(),Int_())
hunk ./lib/jhc/Jhc/Int.hs 18
-foreign import primitive "box" boxInt :: Int__ -> Int
-foreign import primitive "unbox" unboxInt :: Int -> Int__
+foreign import primitive "box" boxInt :: Int_ -> Int
+foreign import primitive "unbox" unboxInt :: Int -> Int_
hunk ./lib/jhc/Jhc/List.hs 36
-{-# RULES "foldr/unpackString"  forall k z (addr::Addr__) . foldr k z (unpackString addr) = unpackStringFoldr addr k z  #-}
+{-# RULES "foldr/unpackString"  forall k z (addr::BitsPtr_) . foldr k z (unpackString addr) = unpackStringFoldr addr k z  #-}
hunk ./lib/jhc/Jhc/Maybe.hs 27
-instance Show a => Show (Maybe a) where
-    showsPrec d (Just m) = showParen (d > app_prec) $
-             showString "Just " . showsPrec (app_prec+1) m
-          where app_prec = 10
-    showsPrec _ Nothing = showString "Nothing"
+instance (Show a) => Show (Maybe a) where
+    showsPrec d (Nothing) = showString "Nothing"
+    showsPrec d (Just aa) = showParen (d >= 10)
+	      (showString "Just" . showChar ' ' . showsPrec 10 aa)
hunk ./lib/jhc/Jhc/Maybe.hs 42
+
+
+-- either instances
+instance (Eq a,Eq b) => Eq (Either a b) where
+    (Left aa) == (Left aa') = aa == aa'
+    (Right aa) == (Right aa') = aa == aa'
+    _ == _ = False
+
+instance (Ord a,Ord b) => Ord (Either a b) where
+    compare (Left aa) (Left aa') = compare aa aa'
+    compare (Left aa) (Right aa') = LT
+    compare (Right aa) (Left aa') = GT
+    compare (Right aa) (Right aa') = compare aa aa'
+
+instance (Show a,Show b) => Show (Either a b) where
+    showsPrec d (Left aa) = showParen (d >= 10)
+	      (showString "Left" . showChar ' ' . showsPrec 10 aa)
+    showsPrec d (Right aa) = showParen (d >= 10)
+	      (showString "Right" . showChar ' ' . showsPrec 10 aa)
hunk ./lib/jhc/Jhc/Options.hs 30
-foreign import primitive "box" boxBool   :: Enum__ -> Bool
+foreign import primitive "box" boxBool   :: Bool_ -> Bool
hunk ./lib/jhc/Jhc/Order.hs 17
+import Jhc.Type.Basic
hunk ./lib/jhc/Jhc/Order.m4 5
-foreign import primitive "box" boxBool :: Bool__ -> Bool
+foreign import primitive "box" boxBool :: Bool_ -> Bool
hunk ./lib/jhc/Jhc/Order.m4 10
-    $2 x == $2 y = boxBool (equals$3 x y)
-    $2 x /= $2 y = boxBool (nequals$3 x y)
+    $2 x == $2 y =  (equals$3 x y)
+    $2 x /= $2 y =  (nequals$3 x y)
hunk ./lib/jhc/Jhc/Order.m4 13
-foreign import primitive "Eq" equals$3 :: $3 -> $3 -> Bool__
-foreign import primitive "NEq" nequals$3 :: $3 -> $3 -> Bool__
+foreign import primitive "Eq" equals$3 :: $3 -> $3 -> Bool
+foreign import primitive "NEq" nequals$3 :: $3 -> $3 -> Bool
hunk ./lib/jhc/Jhc/Order.m4 23
-    $2 x < $2 y = boxBool (lt$4$3 x y)
-    $2 x > $2 y = boxBool (gt$4$3 x y)
-    $2 x <= $2 y = boxBool (lte$4$3 x y)
-    $2 x >= $2 y = boxBool (gte$4$3 x y)
+    $2 x < $2 y =  (lt$4$3 x y)
+    $2 x > $2 y =  (gt$4$3 x y)
+    $2 x <= $2 y =  (lte$4$3 x y)
+    $2 x >= $2 y =  (gte$4$3 x y)
hunk ./lib/jhc/Jhc/Order.m4 28
-foreign import primitive "$4Lt" lt$4$3   :: $3 -> $3 -> Bool__
-foreign import primitive "$4Lte" lte$4$3 :: $3 -> $3 -> Bool__
-foreign import primitive "$4Gt" gt$4$3   :: $3 -> $3 -> Bool__
-foreign import primitive "$4Gte" gte$4$3 :: $3 -> $3 -> Bool__
+foreign import primitive "$4Lt" lt$4$3   :: $3 -> $3 -> Bool
+foreign import primitive "$4Lte" lte$4$3 :: $3 -> $3 -> Bool
+foreign import primitive "$4Gt" gt$4$3   :: $3 -> $3 -> Bool
+foreign import primitive "$4Gte" gte$4$3 :: $3 -> $3 -> Bool
hunk ./lib/jhc/Jhc/Prim.hs 2
-module Jhc.Prim(module Jhc.Prim.Bits, module Jhc.Prim, module Jhc.Prim.Prim, module Jhc.Prim.IO) where
+module Jhc.Prim(module Jhc.Prim.Bits, module Jhc.Prim, module Jhc.Prim.Prim, module Jhc.Prim.IO, module Jhc.Prim.Type.Basic, module Jhc.Prim.Type.Word) where
hunk ./lib/jhc/Jhc/Prim.hs 7
+import Jhc.Type.Word
hunk ./lib/jhc/Jhc/Prim.hs 9
-data Int
-data Char = Char Char_
+--data Int
+--data Char = Char Char_
hunk ./lib/jhc/Jhc/Prim.hs 12
-type Bool__ = Bits16_ -- Change to Bits1_ when the time comes
-type Int__  = Bits32_
-type Char__ = Bits32_
-type Enum__ = Bits16_
-type Addr__ = BitsPtr_
+--type Bool__ = Bits16_ -- Change to Bits1_ when the time comes
+--type Int__  = Bits32_
+--type Char__ = Bits32_
+--type Enum__ = Bits16_
hunk ./lib/jhc/Jhc/String.hs 11
-import Jhc.Prim
+import Jhc.Type.Basic
hunk ./lib/jhc/Jhc/String.hs 15
+type Addr__ = BitsPtr_
+
hunk ./lib/jhc/Jhc/Text/Read.hs 5
-import Jhc.Order
hunk ./lib/jhc/Jhc/Text/Read.hs 7
+import Jhc.Num
+import Jhc.Order
+import Jhc.Type.Basic
hunk ./lib/jhc/Jhc/Text/Read.hs 124
+
+instance (Read a,Read b) => Read (Either a b) where
+    readsPrec d input =
+	      readParen (d > 9)
+	      (\ inp ->
+	       [((Left aa) , rest) | ("Left" , inp) <- lex inp ,
+		(aa , rest) <- readsPrec 10 inp])
+	      input
+	      ++
+	      readParen (d > 9)
+	      (\ inp ->
+	       [((Right aa) , rest) | ("Right" , inp) <- lex inp ,
+		(aa , rest) <- readsPrec 10 inp])
+	      input
+
+instance (Read a) => Read (Maybe a) where
+    readsPrec d input =
+	      (\ inp -> [((Nothing) , rest) | ("Nothing" , rest) <- lex inp])
+	      input
+	      ++
+	      readParen (d > 9)
+	      (\ inp ->
+	       [((Just aa) , rest) | ("Just" , inp) <- lex inp ,
+		(aa , rest) <- readsPrec 10 inp])
+	      input
hunk ./lib/jhc/Jhc/Type/Basic.hs 1
-module Jhc.Type.Basic where
+module Jhc.Type.Basic(module Jhc.Type.Basic, module Jhc.Type.Word)  where
hunk ./lib/jhc/Jhc/Type/Basic.hs 4
-import Jhc.Prim
+import Jhc.Prim.Bits
+import Jhc.Type.Word
+
+type String = [Char]
hunk ./lib/jhc/Jhc/Type/Basic.hs 10
+
+data Either a b = Left a | Right b
+
+data Char = Char Char_
+data Integer = Integer BitsMax_
+
+--type Bool__ = Bits16_
+type Bool__ = Bool_
+type Int__  = Bits32_
+type Char__ = Bits32_
+type Enum__ = Bits16_
+type Addr__ = Addr_
hunk ./lib/jhc/Jhc/Type/Ptr.hs 5
-data Ptr a = Ptr BitsPtr_
-data FunPtr a = FunPtr BitsPtr_
+data Ptr a = Ptr Addr_
+data FunPtr a = FunPtr FunAddr_
addfile ./lib/jhc/Jhc/Type/Word.hs
hunk ./lib/jhc/Jhc/Type/Word.hs 1
+module Jhc.Type.Word(module Jhc.Type.Word, module Jhc.Prim.Bits) where
+
+import Jhc.Prim.Bits
+
+-- define the lifted form of the basic
+-- numeric types.
+
+data Word = Word Bits32_
+data Word8 = Word8 Bits8_
+data Word16 = Word16 Bits16_
+data Word32 = Word32 Bits32_
+data Word64 = Word64 Bits64_
+data Word128 = Word128 Bits128_
+data WordPtr = WordPtr BitsPtr_
+data WordMax = WordMax BitsMax_
+
+data Int = Int Bits32_
+data Int8 = Int8 Bits8_
+data Int16 = Int16 Bits16_
+data Int32 = Int32 Bits32_
+data Int64 = Int64 Bits64_
+data Int128 = Int128 Bits128_
+data IntPtr = IntPtr BitsPtr_
+data IntMax = IntMax BitsMax_
hunk ./lib/jhc/Numeric.hs 361
-
-
hunk ./lib/jhc/Prelude.hs 36
+    Either(Left,Right),
hunk ./lib/jhc/Prelude.hs 64
-import Data.Int(Int())
hunk ./lib/jhc/Prelude.hs 83
+import Jhc.Type.Basic
+import Jhc.Type.Word(Int)
hunk ./lib/jhc/Prelude.hs 136
-data Either a b = Left a | Right b
-    deriving (Eq, Ord, Read, Show)
-
hunk ./lib/jhc/Prelude/CType.hs 12
-import Jhc.Num
-import Data.Word
hunk ./lib/jhc/Prelude/CType.hs 48
-  | c >= 'a' && c <= 'f' =  ord c - (ord 'a' + 10)
-  | c >= 'A' && c <= 'F' =  ord c - (ord 'A' + 10)
+  | c >= 'a' && c <= 'f' =  ord c - (ord 'a' + Int 10#)
+  | c >= 'A' && c <= 'F' =  ord c - (ord 'A' + Int 10#)
hunk ./lib/jhc/Prelude/CType.hs 53
-intToDigit i = f (fromIntegral i :: Word) where
-    f w | w < 10 = chr (ord '0' + i)
-        | w < 16 = chr ((ord 'a' - 10) + i)
+intToDigit i = f (int2word i) where
+    f w | w < (Word 10#) = chr (ord '0' + i)
+        | w < (Word 16#) = chr ((ord 'a' - Int 10#) + i)
hunk ./lib/jhc/Prelude/CType.hs 58
+foreign import primitive "U2U" int2word :: Int -> Word
+foreign import primitive "Add" (+) :: Int -> Int -> Int
+foreign import primitive "Sub" (-) :: Int -> Int -> Int
+
hunk ./lib/jhc/Prelude/CType.hs 64
-toUpper c | isLower c = chr $ ord c - 32
+toUpper c | isLower c = chr $ ord c - (Int 32#)
hunk ./lib/jhc/Prelude/CType.hs 68
-toLower c | isUpper c = chr $ ord c + 32
+toLower c | isUpper c = chr $ ord c + (Int 32#)
hunk ./lib/jhc/Prelude/IO.hs 34
+import Jhc.Prim.Wrapper
hunk ./lib/jhc/Prelude/IO.hs 71
-    file <- withCString fn $ \fnc -> c_fopen fnc (Ptr "r"#)
+    file <- withCString fn $ \fnc -> c_fopen fnc (Ptr (Addr_ "r"#))
hunk ./lib/jhc/Prelude/IO.hs 108
-writeFile fn s = writeFile' fn s "w"#
+writeFile fn s = writeFile' fn s (Addr_ "w"#)
hunk ./lib/jhc/Prelude/IO.hs 111
-appendFile fn s = writeFile' fn s "a"#
+appendFile fn s = writeFile' fn s (Addr_ "a"#)
hunk ./lib/jhc/System/C/Stdio.hs 4
-import Data.Int
-import Foreign.C.Types
-import Foreign.Ptr
hunk ./lib/jhc/System/C/Stdio.hs 5
+import Jhc.Type.C
+import Jhc.Type.Ptr
hunk ./lib/jhc/System/Mem.hs 6
+import Jhc.Prim.IO
hunk ./lib/jhc/System/Mem/StableName.hs 8
+import Jhc.Type.Basic
hunk ./lib/jhc/jhc.yaml 59
+        - Jhc.Type.Word
hunk ./src/DataConstructors.hs 74
-import PrimitiveOperators
hunk ./src/DataConstructors.hs 277
+primitiveTable = []
+{-
hunk ./src/DataConstructors.hs 296
+        -}
hunk ./src/E/FromHs.hs 50
-import PrimitiveOperators
hunk ./src/E/FromHs.hs 63
+r_bits32       = ELit litCons { litName = rt_bits32, litType = eHash }
+r_bits_max_    = ELit litCons { litName = rt_bits_max_, litType = eHash }
+r_bits_ptr_    = ELit litCons { litName = rt_bits_ptr_, litType = eHash }
+
hunk ./src/E/PrimOpt.hs 171
-        (bp,(tr,str)) <- boxPrimitive dataTable
+        (bp,(tr,str))  <- boxPrimitive dataTable
hunk ./src/data/PrimitiveOperators-in.hs 1
-
-{- This file is generated -}
-module PrimitiveOperators(
-    r_bits_ptr_,
-    r_bits_max_,
-    r_bits32,
-    allCTypes
-    ) where
-
-import E.E
-import Name.Names
-
rmfile ./src/data/PrimitiveOperators-in.hs
hunk ./src/data/names.txt 4
-IOMode  Jhc.Type.Handle.IOMode
+IOMode       Jhc.Type.Handle.IOMode
+
hunk ./src/data/names.txt 10
-Char       Jhc.Prim.Char
+Char       Jhc.Type.Basic.Char
hunk ./src/data/names.txt 47
-#Int       Jhc.Prim.Int
-#Integer   Jhc.Basics.Integer
-#
-#Int8      Data.Int.Int8
-#Int16     Data.Int.Int16
-#Int32     Data.Int.Int32
-#Int64     Data.Int.Int64
-#IntMax    Data.Int.IntMax
-#IntPtr    Data.Int.IntPtr
-#
-#Word       Jhc.Prim.Word
-#Word8      Data.Word.Word8
-#Word16     Data.Word.Word16
-#Word32     Data.Word.Word32
-#Word64     Data.Word.Word64
-#WordMax    Data.Word.WordMax
-#WordPtr    Data.Word.WordPtr
+Integer   Jhc.Type.Basic.Integer
+
+Int       Jhc.Type.Word.Int
+Int8      Jhc.Type.Word.Int8
+Int16     Jhc.Type.Word.Int16
+Int32     Jhc.Type.Word.Int32
+Int64     Jhc.Type.Word.Int64
+IntMax    Jhc.Type.Word.IntMax
+IntPtr    Jhc.Type.Word.IntPtr
+
+Word       Jhc.Type.Word.Word
+Word8      Jhc.Type.Word.Word8
+Word16     Jhc.Type.Word.Word16
+Word32     Jhc.Type.Word.Word32
+Word64     Jhc.Type.Word.Word64
+WordMax    Jhc.Type.Word.WordMax
+WordPtr    Jhc.Type.Word.WordPtr
hunk ./src/data/names.txt 92
-Ratio      Jhc.Type.Float.:%
+Boolzh     Jhc.Prim.Prim.Bool#
+Char       Jhc.Type.Basic.Char
hunk ./src/data/names.txt 96
+Int        Jhc.Type.Word.Int
+Integer    Jhc.Type.Basic.Integer
+Ratio      Jhc.Type.Float.:%
hunk ./src/data/names.txt 100
-Boolzh     Jhc.Prim.Prim.Bool#
-Char       Jhc.Prim.Char
+Word       Jhc.Type.Word.Word
hunk ./src/data/primitives.txt 1
-# Ideally, people should be able to declare these in the program.
-
-Jhc.Prim.Int, bits32
-Jhc.Basics.Integer, bits<max>
-
-Data.Int.Int8, bits8
-Data.Int.Int16, bits16
-Data.Int.Int32, bits32
-Data.Int.Int64, bits64
-Data.Int.IntMax, bits<max>
-Data.Int.IntPtr, bits<ptr>
-
-Data.Word.Word, bits32
-Data.Word.Word8, bits8
-Data.Word.Word16, bits16
-Data.Word.Word32, bits32
-Data.Word.Word64, bits64
-Data.Word.WordMax, bits<max>
-Data.Word.WordPtr, bits<ptr>
rmfile ./src/data/primitives.txt
hunk ./utils/op_names.prl 14
-open PR, "<src/data/primitives.txt";
-while(<PR>) {
-    chomp;
-    next unless /\S/;
-    next if /^\s*#/;
-    my @a = split /\s*,\s*/;
-    push @ds, \@a;
-}
+#open PR, "<src/data/primitives.txt";
+#while(<PR>) {
+#    chomp;
+#    next unless /\S/;
+#    next if /^\s*#/;
+#    my @a = split /\s*,\s*/;
+#    push @ds, \@a;
+#}
hunk ./utils/op_process.prl 1
-#!/usr/bin/perl -w
-
-use strict;
-use warnings;
-use Data::Dumper;
-
-my @ds;
-open PR, "<src/data/primitives.txt";
-while(<PR>) {
-    chomp;
-    next unless /\S/;
-    next if /^\s*#/;
-    my @a = split /\s*,\s*/;
-    push @ds, \@a;
-}
-
-my @names;
-
-my %rtype;
-sub rtype($) {
-    return $rtype{$_[0]}[0] if $rtype{$_[0]};
-    my $c = $_[0];
-    $c =~ s/\W/_/g;
-    my $n = "r_" . $c;
-    my $v = "$n " . " "x(14-length $n) . "= ELit litCons { litName = rt_$c, litType = eHash }";
-    $rtype{$_[0]} = [$n,$v];
-    return $n;
-}
-
-foreach my $d (@ds) {
-    my $sname = $d->[0];
-    $sname =~ s/^.*\.//;
-    push @names, "(dc_$sname, tc_$sname, " . rtype($d->[1]) . ")\n";
-}
-
-my $head = `cat src/data/PrimitiveOperators-in.hs`;
-print "$head\n";
-print "allCTypes = [\n   ", join("  ,",@names), " ]\n\n";
-print join("\n",map { $_->[1] } values %rtype) . "\n\n";
-
rmfile ./utils/op_process.prl