[update GenUtil.hs
John Meacham <john@repetae.net>**20070525235437] hunk ./GenUtil.hs 2
---  $Id: GenUtil.hs,v 1.51 2006/06/07 00:16:10 john Exp $
+--  $Id: GenUtil.hs,v 1.52 2007/05/25 23:54:08 john Exp $
hunk ./GenUtil.hs 42
+    fst3,snd3,thd3,
hunk ./GenUtil.hs 64
+    maybeM,
hunk ./GenUtil.hs 81
-    concatInter,
+    intercalate,
hunk ./GenUtil.hs 312
---    peekUniq :: m Int
---    modifyUniq :: (Int -> Int) -> m ()
---    newUniq = do
---	v <- peekUniq
---	modifyUniq (+1)
---	return v
hunk ./GenUtil.hs 316
+fst3 (a,_,_) = a
+snd3 (_,b,_) = b
+thd3 (_,_,c) = c
+
hunk ./GenUtil.hs 361
-{-# SPECIALIZE maybeToMonad :: Maybe a -> IO a #-}
hunk ./GenUtil.hs 366
+-- | convert a maybe to an arbitrary failable monad
+maybeM :: Monad m => String -> Maybe a -> m a
+maybeM _ (Just x) = return x
+maybeM s Nothing = fail s
+
hunk ./GenUtil.hs 583
-concatInter :: String -> [String] -> String
-concatInter x = concat . (intersperse x)
+intercalate :: [a] -> [[a]] -> [a]
+intercalate x xss = concat (intersperse x xss)
hunk ./GenUtil.hs 763
-        f xs = concatInter " " [  es n s | s <- xs | n <- cw ]
+        f xs = intercalate " " [  es n s | s <- xs | n <- cw ]