[rearrange libraries some, move RULES to more logical places
John Meacham <john@repetae.net>**20080326092814] hunk ./lib/base/Jhc/List.hs 8
-import Jhc.Monad
hunk ./lib/base/Jhc/List.hs 59
+{-# RULES "tail/map"      forall f xs . tail (map f xs) = map f (tail xs) #-}
+{-# RULES "head/map"      forall f xs . head (map f xs) = f (head xs) #-}
+{-# RULES "head/:"        forall x xs . head (x:xs) = x #-}
+{-# RULES "tail/:"        forall x xs . tail (x:xs) = xs #-}
+
hunk ./lib/base/Jhc/List.hs 71
+{-# CATALYST "and/foldr" forall . and = foldr (&&) True #-}
+{-# CATALYST "or/foldr"  forall . or = foldr (||) False #-}
+
hunk ./lib/base/Jhc/List.hs 83
+{-# RULES "any/build"     forall p (g::forall b.(a->b->b)->b->b) .  any p (build g) = g ((||) . p) False #-}
+
+
+{-# RULES "all/build"     forall p (g::forall b.(a->b->b)->b->b) .  all p (build g) = g ((&&) . p) True #-}
+
hunk ./lib/base/Jhc/List.hs 147
-xs !! n | n < zero  =  error "Prelude.(!!): negative index\n"
+xs !! n | n < zero  =  error "Prelude.(!!): negative index"
hunk ./lib/base/Jhc/List.hs 151
-                sub []     _ = error "Prelude.(!!): index too large\n"
+                sub []     _ = error "Prelude.(!!): index too large"
hunk ./lib/base/Jhc/List.hs 167
+head             :: [a] -> a
+head (x:_)       =  x
+head []          =  error "Prelude.head: empty list"
+
+
+tail             :: [a] -> [a]
+tail (_:xs)      =  xs
+tail []          =  error "Prelude.tail: empty list"
+
+
+last             :: [a] -> a
+last []          =  error "Prelude.last: empty list"
+last (x:xs)      = last' x xs where
+    last' x []     = x
+    last' _ (y:ys) = last' y xs
hunk ./lib/base/Jhc/List.hs 184
-{- SPECIALIZE sequence :: forall a . [IO a] -> IO [a] #-}
-{- SPECIALIZE sequence_ :: forall a . [IO a] -> IO () #-}
-{- SPECIALIZE mapM :: forall a b . (a -> IO b) -> [a]-> IO [b] #-}
-{- SPECIALIZE mapM_ :: forall a b . (a -> IO b) -> [a]-> IO () #-}
+init             :: [a] -> [a]
+init []          =  error "Prelude.init: empty list"
+init (x:xs)      =  init' x xs where
+    init' _ [] = []
+    init' y (z:zs) = y:init' z zs
hunk ./lib/base/Jhc/List.hs 190
--- | use local routine so monad type is shared.
-sequence       :: Monad m => [m a] -> m [a]
-sequence xs = f xs where
-    f [] = return []
-    f (x:xs) = x >>= \r -> f xs >>= \rs -> return (r:rs)
hunk ./lib/base/Jhc/List.hs 191
-sequence_      :: Monad m => [m a] -> m ()
-sequence_ xs  =  f xs where
-    f [] = return ()
-    f (x:xs) = x >> f xs
+{-# RULES "head/iterate"  forall f x . head (iterate f x) = x #-}
+{-# RULES "head/repeat"   forall x . head (repeat x) = x #-}
+{-# RULES "tail/repeat"   forall x . tail (repeat x) = repeat x #-}
+{-# RULES "tail/iterate"  forall f x . tail (iterate f x) = iterate f (f x) #-}
+{-# RULES "iterate/id" forall . iterate id = repeat #-}
hunk ./lib/base/Jhc/Monad.hs 28
+{- SPECIALIZE sequence :: forall a . [IO a] -> IO [a] #-}
+{- SPECIALIZE sequence_ :: forall a . [IO a] -> IO () #-}
+{- SPECIALIZE mapM :: forall a b . (a -> IO b) -> [a]-> IO [b] #-}
+{- SPECIALIZE mapM_ :: forall a b . (a -> IO b) -> [a]-> IO () #-}
+
+{-# RULES "sequence/[]"   sequence [] = return [] #-}
+{-# RULES "sequence_/[]"  sequence_ [] = return () #-}
+{-# RULES "mapM/[]"       forall f . mapM f [] = return [] #-}
+{-# RULES "mapM_/[]"      forall f . mapM_ f [] = return () #-}
+{-# RULES "sequence_/++"  forall xs ys . sequence_ (xs ++ ys) = sequence_ xs >> sequence_ ys #-}
+{-# RULES "mapM_/++"      forall xs ys f . mapM_ f (xs ++ ys) = mapM_ f xs >> mapM_ f ys #-}
+
hunk ./lib/base/Jhc/Monad.hs 53
+sequence       :: Monad m => [m a] -> m [a]
+sequence xs = f xs where
+    f [] = return []
+    f (x:xs) = x >>= \r -> f xs >>= \rs -> return (r:rs)
+
+sequence_      :: Monad m => [m a] -> m ()
+sequence_ xs  =  f xs where
+    f [] = return ()
+    f (x:xs) = x >> f xs
+
hunk ./lib/base/Prelude.hs 26
+    head,
+    tail,
+    last,
+    init,
hunk ./lib/base/Prelude.hs 170
-{-# SUPERINLINE head, tail, null #-}
-head             :: [a] -> a
-head (x:_)       =  x
-head []          =  error "Prelude.head: empty list"
-
-
-tail             :: [a] -> [a]
-tail (_:xs)      =  xs
-tail []          =  error "Prelude.tail: empty list"
-
-
-last             :: [a] -> a
-last []          =  error "Prelude.last: empty list"
-last (x:xs)      = last' x xs where
-    last' x []     = x
-    last' _ (y:ys) = last' y xs
-
-
-init             :: [a] -> [a]
-init []          =  error "Prelude.init: empty list"
-init (x:xs)      =  init' x xs where
-    init' _ [] = []
-    init' y (z:zs) = y:init' z zs
-
hunk ./lib/base/Prelude.hs 372
-{-# RULES "iterate/id" forall . iterate id = repeat #-}
-{-# RULES "head/iterate"  forall f x . head (iterate f x) = x #-}
-{-# RULES "head/repeat"   forall x . head (repeat x) = x #-}
-{-# RULES "tail/repeat"   forall x . tail (repeat x) = repeat x #-}
-{-# RULES "tail/iterate"  forall f x . tail (iterate f x) = iterate f (f x) #-}
hunk ./lib/base/Prelude.hs 383
-{-# RULES "tail/map"      forall f xs . tail (map f xs) = map f (tail xs) #-}
-{-# RULES "head/map"      forall f xs . head (map f xs) = f (head xs) #-}
-{-# RULES "head/:"        forall x xs . head (x:xs) = x #-}
-{-# RULES "tail/:"        forall x xs . tail (x:xs) = xs #-}
hunk ./lib/base/Prelude.hs 401
-{-# RULES "sequence/[]"   sequence [] = return [] #-}
-{-# RULES "sequence_/[]"  sequence_ [] = return () #-}
-{-# RULES "mapM/[]"       forall f . mapM f [] = return [] #-}
-{-# RULES "mapM_/[]"      forall f . mapM_ f [] = return () #-}
hunk ./lib/base/Prelude.hs 403
-{-# RULES "sequence_/++"  forall xs ys . sequence_ (xs ++ ys) = sequence_ xs >> sequence_ ys #-}
-{-# RULES "mapM_/++"      forall xs ys f . mapM_ f (xs ++ ys) = mapM_ f xs >> mapM_ f ys #-}
hunk ./lib/base/base.cabal 38
-                 Jhc.IOArray,
+                 Data.Array.IO,
+                 Data.Array.Unboxed,