diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-21 19:14:04 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-21 19:14:56 +0200 |
commit | 5ed12810e0972b1e0d408fe1355805746c4614f9 (patch) | |
tree | 93bef49c2ea5d5e2d67cb1684e14f227a3401c7f /libraries/base/Text | |
parent | 835d874df1973b7e1c602a747b42b77095592a9c (diff) | |
download | haskell-5ed12810e0972b1e0d408fe1355805746c4614f9.tar.gz |
Move `mapM` and `sequence` to GHC.Base and break import-cycles
This simplifies the import graph and more importantly removes import
cycles that arise due to `Control.Monad` & `Data.List` importing
`Data.Traversable` (preparation for #9586)
Reviewed By: ekmett, austin
Differential Revision: https://phabricator.haskell.org/D234
Diffstat (limited to 'libraries/base/Text')
-rw-r--r-- | libraries/base/Text/ParserCombinators/ReadP.hs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs index 0139e7733d..48cbe57e5d 100644 --- a/libraries/base/Text/ParserCombinators/ReadP.hs +++ b/libraries/base/Text/ParserCombinators/ReadP.hs @@ -310,10 +310,6 @@ count :: Int -> ReadP a -> ReadP [a] -- ^ @count n p@ parses @n@ occurrences of @p@ in sequence. A list of -- results is returned. count n p = sequence (replicate n p) - where -- local 'sequence' to avoid import-cycle - sequence ms = foldr k (return []) ms - where - k m m' = do { x <- m; xs <- m'; return (x:xs) } between :: ReadP open -> ReadP close -> ReadP a -> ReadP a -- ^ @between open close p@ parses @open@, followed by @p@ and finally |