ajhc-0.8.0.8: Haskell compiler that produce binary through C language

Safe HaskellNone

Util.Gen

Description

similar to GenUtil but can rely on non-haskell 98 features

Synopsis

Documentation

mconcatMap :: Monoid a => (a1 -> a) -> [a1] -> aSource

mintercalate :: Monoid a => a -> [a] -> aSource

mconcatMapM :: (Monad m, Monoid b) => (a -> m b) -> [a] -> m bSource

runReadP :: Monad m => ReadP a -> String -> m aSource

travCollect :: Monoid w => ((a -> Writer w a) -> a -> Writer w a) -> (a -> w) -> a -> wSource

forMn_ :: Monad m => [a] -> ((a, Int) -> m b) -> m ()Source

forMn :: Monad m => [a] -> ((a, Int) -> m b) -> m [b]Source

maybeDo :: Monad m => Maybe (m a) -> m ()Source

module GenUtil

intercalate :: [a] -> [[a]] -> [a]

intercalate xs xss is equivalent to (concat (intersperse xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.