[remove several uses of generics, remove lots of unused Data and Typeable derivations
John Meacham <john@repetae.net>**20061109033706] hunk ./E/CPR.hs 4
-import Data.Generics
+import Data.Typeable
hunk ./E/E.hs 7
-import Data.Generics
hunk ./E/E.hs 38
-    deriving(Data,Eq,Ord,Typeable)
+    deriving(Eq,Ord)
hunk ./E/E.hs 60
-    deriving(Data,Eq, Ord, Typeable)
+    deriving(Eq, Ord)
hunk ./E/E.hs 85
-	deriving(Data,Eq, Ord, Typeable, Show)
+	deriving(Eq, Ord, Show)
hunk ./E/E.hs 89
-data EBind = EBind [TVr] E
-    deriving(Data,Eq,Typeable,Show)
-    {-! derive: GhcBinary !-}
-
hunk ./E/E.hs 112
-    deriving(Data,Typeable)
hunk ./E/E.hs 159
-    deriving(Data,Show,Eq,Ord,Typeable)
+    deriving(Show,Eq,Ord)
hunk ./E/SSimplify.hs 15
-import Data.Generics
+import Data.Typeable
hunk ./FrontEnd/Class.hs 21
-import Data.Generics
hunk ./FrontEnd/Class.hs 22
+import Data.Generics
hunk ./FrontEnd/Class.hs 51
+import Support.Tickle
hunk ./FrontEnd/Class.hs 62
-    } deriving(Typeable,Data,Eq,Ord,Show)
+    } deriving(Eq,Ord,Show)
hunk ./FrontEnd/Class.hs 83
-    } deriving(Typeable,Data)
+    }
hunk ./FrontEnd/Class.hs 370
-   TForAll _ ((IsIn _ classArg:restContext) :=> t) = qt'
-   -- the assumption is that the context is non-empty and that
-   -- the class and variable that we are interested in are at the
-   -- front of the old context - the method of inserting instance types into
-   -- the class hierarchy should ensure this
-   --((className, classArg):restContxt) = cntxt
-   foo = "_" ++ (show methodName ++ show (getTypeHead instanceType)) ++ "@@"
-   newQualType = everywhere (mkT at) $ tForAll (nub $ freeVars qt) qt
-   at (Tyvar _ n k) =  tyvar (updateName (++ foo) n) k
-   updateName f n = toName nt (md,f nm) where
-        (nt,(md::String,nm)) = fromName n
-   qt = (newCntxt ++ restContext) :=> (everywhere (mkT ct) t)
-   ct n | n == classArg = instanceType
-   ct n =  n
+    TForAll _ ((IsIn _ classArg:restContext) :=> t) = qt'
+    -- the assumption is that the context is non-empty and that
+    -- the class and variable that we are interested in are at the
+    -- front of the old context - the method of inserting instance types into
+    -- the class hierarchy should ensure this
+    --((className, classArg):restContxt) = cntxt
+    foo = "_" ++ (show methodName ++ show (getTypeHead instanceType)) ++ "@@"
+--    newQualType = everywhere (mkT at) $ tForAll (nub $ freeVars qt) qt
+
+    newQualType = tForAll vs nqt where
+        vs = nub $ freeVars nqt
+        nqt = map (tickle f) (newCntxt ++ restContext) :=> f t
+        f t | t == classArg = f instanceType
+        f (TVar t) = TVar (at t)
+        f (TForAll ta (ps :=> t)) = tickle f (TForAll (map at ta) (ps :=> t))
+        f (TExists ta (ps :=> t)) = tickle f (TExists (map at ta) (ps :=> t))
+        f t = tickle f t
+
+    at (Tyvar _ n k) =  tyvar (updateName (++ foo) n) k
+    updateName f n = toName nt (md,f nm) where
+         (nt,(md::String,nm)) = fromName n
+--    qt = (newCntxt ++ restContext) :=> t
+    {-
+    qt = (newCntxt ++ restContext) :=> (everywhere (mkT ct) t)
+    ct n | n == classArg = instanceType
+    ct n =  n
+    -}
hunk ./FrontEnd/HsSyn.hs 28
-  deriving(Data,Typeable,Eq,Ord,ToAtom,FromAtom)
+  deriving(Eq,Data,Typeable,Ord,ToAtom,FromAtom)
hunk ./FrontEnd/HsSyn.hs 88
-  deriving(Data,Typeable, Show)
hunk ./FrontEnd/HsSyn.hs 98
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 111
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 118
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 121
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 164
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 176
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 183
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 188
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 197
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 202
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 206
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 267
-  deriving(Data,Typeable,Eq,Ord, Show)
+  deriving(Eq,Ord, Show)
hunk ./FrontEnd/HsSyn.hs 279
- deriving(Data,Typeable,Eq,Show)
+ deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 311
- deriving(Data,Typeable,Eq,Show)
+ deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 329
- deriving(Data,Typeable,Eq,Ord,Show)
+ deriving(Eq,Ord,Show)
hunk ./FrontEnd/HsSyn.hs 334
- deriving(Data,Typeable,Eq,Ord,Show)
+ deriving(Eq,Ord,Show)
hunk ./FrontEnd/HsSyn.hs 340
- deriving(Data,Typeable,Eq,Show)
+ deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 344
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/HsSyn.hs 347
-  deriving(Data,Typeable,Eq,Show)
+  deriving(Eq,Show)
hunk ./FrontEnd/Representation.hs 38
-import Data.Generics
hunk ./FrontEnd/Representation.hs 61
-             deriving(Data,Typeable,Eq,Ord,Show)
+             deriving(Eq,Ord,Show)
hunk ./FrontEnd/Representation.hs 72
-             deriving(Data,Typeable,Ord,Show)
+             deriving(Ord,Show)
hunk ./FrontEnd/Representation.hs 76
-             deriving(Data,Typeable,Show)
+             deriving(Show)
hunk ./FrontEnd/Representation.hs 109
-    deriving(Data,Typeable)
hunk ./FrontEnd/Representation.hs 144
-    deriving(Data,Typeable, Eq, Show,Ord)
+    deriving(Eq, Show,Ord)
hunk ./FrontEnd/Representation.hs 164
-              deriving(Data,Typeable, Show, Eq,Ord)
+              deriving(Show, Eq,Ord)
hunk ./FrontEnd/Representation.hs 169
-              deriving(Data,Typeable, Show, Eq,Ord)
+              deriving(Show, Eq,Ord)
hunk ./FrontEnd/Tc/Kind.hs 14
-import Data.Generics
hunk ./FrontEnd/Tc/Kind.hs 38
-    deriving(Data,Typeable, Eq, Ord)   -- but we need them for kind inference
+    deriving(Eq, Ord)   -- but we need them for kind inference
hunk ./FrontEnd/Tc/Kind.hs 48
-             deriving(Data,Typeable, Eq, Ord)   -- but we need them for kind inference
+             deriving(Eq, Ord)   -- but we need them for kind inference
hunk ./FrontEnd/Tc/Kind.hs 72
-    deriving(Eq,Ord,Typeable,Data,Show)
+    deriving(Eq,Ord,Show)
hunk ./FrontEnd/Tc/Kind.hs 86
-    } deriving
-    (Data,Typeable)
+    }
hunk ./Name/Name.hs 25
-import Data.Generics
hunk ./Name/Name.hs 26
+import Data.Typeable
hunk ./Name/Name.hs 46
-    deriving(Ord,Eq,Enum,Read,Show,Typeable,Data)
+    deriving(Ord,Eq,Enum,Read,Show)
hunk ./Name/Name.hs 50
-    deriving(Ord,Eq,Typeable,Data,Binary,ToAtom,FromAtom)
+    deriving(Ord,Eq,Typeable,Binary,ToAtom,FromAtom)
hunk ./Number.hs 5
-import Data.Generics
hunk ./Number.hs 45
-    deriving(Num,Eq,Ord,Binary,Real,Fractional,RealFrac,Enum,Typeable,Data)
+    deriving(Num,Eq,Ord,Binary,Real,Fractional,RealFrac,Enum)
hunk ./PackedString.hs 91
-import Data.Generics(Data(..))
hunk ./PackedString.hs 106
-instance Data PackedString where
-    toConstr _   = error "toConstr"
-    --fromConstr _   = error "fromConstr"
-    --gfoldl f g x  = g x
-    --dataTypeOf _ = mkDataType []