[fill out library with missing functions and instances
John Meacham <john@repetae.net>**20080306130438] hunk ./lib/base/Control/Monad.hs 7
+    foldM_,replicateM,replicateM_,(>=>),(<=<),forever,
+
hunk ./lib/base/Control/Monad.hs 95
+
+-- extensions
+
+-- | Like 'foldM', but discards the result.
+foldM_            :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m ()
+foldM_ f a xs     = foldM f a xs >> return ()
+
+-- | @'replicateM' n act@ performs the action @n@ times,
+-- gathering the results.
+replicateM        :: (Monad m) => Int -> m a -> m [a]
+replicateM n x    = sequence (replicate n x)
+
+-- | Like 'replicateM', but discards the result.
+replicateM_       :: (Monad m) => Int -> m a -> m ()
+replicateM_ n x   = sequence_ (replicate n x)
+
+
+-- | 'forM' is 'mapM' with its arguments flipped
+forM            :: Monad m => [a] -> (a -> m b) -> m [b]
+{-# INLINE forM #-}
+forM            = flip mapM
+
+-- | 'forM_' is 'mapM_' with its arguments flipped
+forM_           :: Monad m => [a] -> (a -> m b) -> m ()
+{-# INLINE forM_ #-}
+forM_           = flip mapM_
+
+infixr 1 <=<, >=>
+
+-- | Left-to-right Kleisli composition of monads.
+(>=>)       :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c)
+f >=> g     = \x -> f x >>= g
+
+-- | Right-to-left Kleisli composition of monads. '(>=>)', with the
+-- arguments flipped
+(<=<)       :: Monad m => (b -> m c) -> (a -> m b) -> (a -> m c)
+(<=<)       = flip (>=>)
+
+-- | @'forever' act@ repeats the action infinitely.
+forever     :: (Monad m) => m a -> m ()
+forever a   = a >> forever a
+
hunk ./lib/base/Data/Ix.hs 8
+import Jhc.Num
hunk ./lib/base/Data/Ix.hs 40
-{-
-XXX
-instance  Ix Integer  where
+instance  (Ix a, Ix b)  => Ix (a,b) where
+        range   ((l,l'),(u,u')) = [(i,i') | i <- range (l,u), i' <- range (l',u')]
+        index   ((l,l'),(u,u')) (i,i') =  index (l,u) i * rangeSize (l',u') + index (l',u') i'
+        inRange ((l,l'),(u,u')) (i,i') = inRange (l,u) i && inRange (l',u') i'
+
+--instance  Ix Integer  where
+--    range (m,n)		= [m..n]
+--    index b@(m,n) i
+--        | inRange b i   =  fromInteger (i - m)
+--        | otherwise     =  error "Ix.index: Index out of range."
+--    inRange (m,n) i     =  m <= i && i <= n
+
+instance  Ix Bool  where
hunk ./lib/base/Data/Ix.hs 54
-    index b@(m,n) i
-        | inRange b i   =  fromInteger (i - m)
-        | otherwise     =  error "Ix.index: Index out of range."
-    inRange (m,n) i     =  m <= i && i <= n
--}
+    index b@(c,c') ci
+        | inRange b ci  =  fromEnum ci `minus` fromEnum c
+        | otherwise     =  error "Ix.index: 'Bool' Index out of range."
+    inRange (c,c') i    =  c <= i && i <= c'
+
+instance  Ix Ordering  where
+    range (m,n)		= [m..n]
+    index b@(c,c') ci
+        | inRange b ci  =  fromEnum ci `minus` fromEnum c
+        | otherwise     =  error "Ix.index: 'Ordering' Index out of range."
+    inRange (c,c') i    =  c <= i && i <= c'
hunk ./lib/base/Data/List.hs 17
+    foldl', foldl1',
+
hunk ./lib/base/Data/List.hs 56
-    nub' [] _		= []
+    nub' [] _           = []
hunk ./lib/base/Data/List.hs 58
-	| x `elem` ls   = nub' xs ls
-	| otherwise     = x : nub' xs (x:ls)
+        | x `elem` ls   = nub' xs ls
+        | otherwise     = x : nub' xs (x:ls)
hunk ./lib/base/Data/List.hs 66
-    nubBy' [] _		= []
+    nubBy' [] _         = []
hunk ./lib/base/Data/List.hs 69
-       | otherwise	 = y : nubBy' ys (y:xs)
+       | otherwise       = y : nubBy' ys (y:xs)
hunk ./lib/base/Data/List.hs 71
-    elem_by _  _ []		=  False
-    elem_by eq y (x:xs)	=  x `eq` y || elem_by eq y xs
+    elem_by _  _ []             =  False
+    elem_by eq y (x:xs) =  x `eq` y || elem_by eq y xs
hunk ./lib/base/Data/List.hs 299
-{-
hunk ./lib/base/Data/List.hs 318
--}
hunk ./lib/base/Data/List.hs 322
+
+-- | A strict version of 'foldl'.
+foldl'           :: (a -> b -> a) -> a -> [b] -> a
+foldl' f z xs = lgo z xs where
+    lgo z []     = z
+    lgo z (x:xs) = let z' = f z x in z' `seq` lgo z' xs
+
+
+-- | A strict version of 'foldl1'
+foldl1'                  :: (a -> a -> a) -> [a] -> a
+foldl1' f (x:xs)         =  foldl' f x xs
+foldl1' _ []             =  error "foldl1': empty list"
+
+
+
+
hunk ./lib/base/Jhc/Tuples.hs 43
+instance  (Read a, Read b, Read c) => Read (a,b,c)  where
+    readsPrec p       = readParen False
+                            (\r -> [((x,y,z), w) | ("(",s) <- lex r,
+                                                 (x,t)   <- reads s,
+                                                 (",",u) <- lex t,
+                                                 (y,v)   <- reads u,
+                                                 (",",w) <- lex v,
+                                                 (z,p)   <- reads w,
+                                                 (")",w) <- lex p ] )
+
hunk ./lib/base/Jhc/Tuples.hs 57
-					      shows x . showChar ',' .
-					      shows y . showChar ',' .
-					      shows z . showChar ')')
-			      s
+                                              shows x . showChar ',' .
+                                              shows y . showChar ',' .
+                                              shows z . showChar ')')
+                              s
hunk ./lib/base/Jhc/Tuples.hs 64
-					     	shows w . showChar ',' .
-					     	shows x . showChar ',' .
-					     	shows y . showChar ',' .
-					     	shows z . showChar ')')
+                                                shows w . showChar ',' .
+                                                shows x . showChar ',' .
+                                                shows y . showChar ',' .
+                                                shows z . showChar ')')
+                                    s
+
+instance (Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) where
+    showsPrec _ (v,w,x,y,z,a) s = (showChar '(' . shows v . showChar ',' .
+                                                  shows w . showChar ',' .
+                                                  shows x . showChar ',' .
+                                                  shows y . showChar ',' .
+                                                  shows z . showChar ',' .
+                                                  shows a . showChar ')')