[rearrange standard libraries some. move stuff needed by everything into Jhc.Prim, make Jhc.Prim always be included in everything compiled
John Meacham <john@repetae.net>**20061130045327] hunk ./DataConstructors.hs 600
-primitiveAliases = [(tc_Int__,rt_int),(tc_Addr__,rt_HsPtr)]
+primitiveAliases = [(tc_Int__,rt_int),(tc_Addr__,rt_HsPtr),(tc_Char__,rt_HsChar),(tc_Bool__,rt_int)]
hunk ./E/Demand.hs 289
-analyze (EPrim (APrim (PrimPrim "drop__") pc) [t1,t2] pt) s = do
-    (t1',dt1) <- analyze t1 lazy
-    (t2',dt2) <- analyze t2 s
-    return (EPrim (APrim (PrimPrim "drop__") pc) [t1',t2'] pt,dt1 `glb` dt2)
+analyze (EPrim (APrim (PrimPrim "dependingOn") pc) [t1,t2] pt) s = do
+    (t1',dt1) <- analyze t1 s
+    (t2',dt2) <- analyze t2 lazy
+    return (EPrim (APrim (PrimPrim "dependingOn") pc) [t1',t2'] pt,dt1 `glb` dt2)
hunk ./E/ToHs.hs 260
-    ("drop__",[_x,y])   -> transE y  -- XXX
+    ("dependingOn",[x,_y])   -> transE x  -- XXX
hunk ./E/Values.hs 219
-isAtomic (EPrim (APrim (PrimPrim "drop__") _) [x,y] _) = isAtomic y
+isAtomic (EPrim (APrim (PrimPrim "dependingOn") _) [x,y] _) = isAtomic x
hunk ./Grin/FromE.hs 386
-    ce (EPrim ap@(APrim (PrimPrim "drop__") _) [_,e] _) = ce e
+    ce (EPrim ap@(APrim (PrimPrim "dependingOn") _) [e,_] _) = ce e
hunk ./Grin/FromE.hs 543
-    cc (EPrim (APrim (PrimPrim "drop__") _) [_,e] _) = cc e
+    cc (EPrim (APrim (PrimPrim "dependingOn") _) [e,_] _) = cc e
hunk ./Ho/Build.hs 347
-hsModuleRequires x = ans where
+hsModuleRequires x = "Jhc.Prim":ans where
hunk ./Name/Names.hs 62
-dc_Cons = toName DataConstructor ("Jhc.Basics",":")
-dc_EmptyList = toName DataConstructor ("Jhc.Basics","[]")
+dc_Cons = toName DataConstructor ("Jhc.Prim",":")
+dc_EmptyList = toName DataConstructor ("Jhc.Prim","[]")
hunk ./Name/Names.hs 74
-tc_IOResult = toName TypeConstructor ("Jhc.IO","IOResult")
-tc_IO = toName TypeConstructor       ("Jhc.IO", "IO")
+tc_IO = toName TypeConstructor       ("Jhc.Prim", "IO")
hunk ./Name/Names.hs 78
+tc_Char__ = toName TypeConstructor  ("Jhc.Prim","Char__")
+tc_Bool__ = toName TypeConstructor  ("Jhc.Prim","Bool__")
hunk ./Name/Names.hs 85
-tc_Bool = toName TypeConstructor  ("Jhc.Order","Bool")
-tc_Target = toName TypeConstructor  ("Jhc.Options","Target")
-tc_List = toName TypeConstructor  ("Jhc.Basics","[]")
+tc_Bool = toName TypeConstructor   ("Jhc.Order","Bool")
+tc_Boolzh = toName TypeConstructor ("Jhc.Order","Bool#")
+tc_Target = toName TypeConstructor ("Jhc.Options","Target")
+tc_List = toName TypeConstructor  ("Jhc.Prim","[]")
hunk ./data/primitives.txt 5
-Jhc.Basics.Char, HsChar, char, UINT32_MAX, 0
-Data.Int.Int, int, int, INT_MAX, INT_MIN
-# Prelude.Integer, int, int, INT_MAX, INT_MIN
+Jhc.Prim.Char, HsChar, char, UINT32_MAX, 0
+Jhc.Prim.Int, int, int, INT_MAX, INT_MIN
hunk ./lib/base/Data/Int.hs 4
+import Jhc.Prim(Int())
hunk ./lib/base/Data/Int.hs 6
-data Int
hunk ./lib/base/Jhc/Basics.hs 2
-module Jhc.Basics where
+module Jhc.Basics(module Jhc.Basics, module Jhc.Prim) where
hunk ./lib/base/Jhc/Basics.hs 4
-import Data.Int(Int())
+import Jhc.Prim
hunk ./lib/base/Jhc/Basics.hs 6
-type String = [Char]
hunk ./lib/base/Jhc/Basics.hs 7
-data Char
-
hunk ./lib/base/Jhc/Basics.hs 8
-infixr 5  :
-
-data [] a =  a : ([] a) | []
-    -- odd syntax, so we write instances manually
+type String = [Char]
hunk ./lib/base/Jhc/IO.hs 37
-newtype IO a = IO (World__ -> (# World__, a #))
hunk ./lib/base/Jhc/IO.hs 118
-foreign import primitive "drop__" worldDep__ :: forall b. World__ -> b -> b
+foreign import primitive "dependingOn" worldDep__ :: forall b. b -> World__ -> b
hunk ./lib/base/Jhc/IO.hs 122
-strictReturn a = IO $ \w -> (# w, worldDep__ w a #)
+strictReturn a = IO $ \w -> (# w, worldDep__ a w #)
hunk ./lib/base/Jhc/Int.hs 6
-import Data.Int(Int())
-import Jhc.Prim(Int__())
+import Jhc.Prim(Int(),Int__())
hunk ./lib/base/Jhc/Prim.hs 1
-{-# OPTIONS_JHC -N -fffi #-}
-module Jhc.Prim(
-    World__(),
-    Int__(),
-    Addr__(),
-    runRaw,
-    unsafeCoerce__,
-    dependingOn
-    ) where
+{-# OPTIONS_JHC -N -fffi -funboxed-tuples #-}
+module Jhc.Prim where
hunk ./lib/base/Jhc/Prim.hs 4
+-- this module is always included in all programs compiled by jhc. it defines some things that are needed to make jhc work at all.
+
+infixr 5  :
+data [] a =  a : ([] a) | []
+
+newtype IO a = IO (World__ -> (# World__, a #))
hunk ./lib/base/Jhc/Prim.hs 11
--- | this is treated very specially by the compiler. it is unboxed.
hunk ./lib/base/Jhc/Prim.hs 13
+data Int
+data Char
+
+data Bool__ :: #
hunk ./lib/base/Jhc/Prim.hs 19
+data Char__ :: #
hunk ./lib/base/Jhc/Prim.hs 27
--- throws away first argument. but causes second argument to artificially depend on it.
-foreign import primitive drop__ :: forall a b. a -> b -> b
-
hunk ./lib/base/Jhc/Prim.hs 28
-dependingOn :: b -> a -> b
-dependingOn a b = drop__ b a
+foreign import primitive dependingOn :: forall a b. a -> b -> a
hunk ./utils/op_process.prl 141
-    if ($d->[0] eq "Prelude.Int") {
+    if ($d->[0] eq "Jhc.Prim.Int") {
hunk ./utils/op_process.prl 148
-    if ($d->[0] eq "Prelude.Integer") {
+    if ($d->[0] eq "Jhc.Basics.Integer") {