Skip to content

Commit

Permalink
sepCap doc fix for empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdbrock committed Mar 5, 2020
1 parent c7b634d commit e67be65
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Revision history for replace-megaparsec

## 1.3.0.0 -- 2020-03-06

`sepCap` won't throw.

Don't throw an exception on an unreachable error case, just bottom.
Remove type constraints for `Exception`.

## 1.2.1.0 -- 2020-01-01

Allow any error parameter, not just `Void`.

## 1.2.0.0 -- 2019-10-31

Benchmark improvements
Expand Down
2 changes: 1 addition & 1 deletion replace-megaparsec.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: replace-megaparsec
version: 1.2.1.0
version: 1.3.1.0
cabal-version: 1.18
synopsis: Find, replace, and edit text patterns with Megaparsec parsers
homepage: https://github.com/jamesdbrock/replace-megaparsec
Expand Down
16 changes: 8 additions & 8 deletions src/Replace/Megaparsec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ import Replace.Megaparsec.Internal.Text
--
-- === Output
--
-- The input stream is separated into a list of sections:
-- The input stream is separated and output into a list of sections:
--
-- * sections which can parsed by the pattern @sep@ will be captured as
-- matching sections in 'Right'
-- * non-matching sections of the stream will be captured in 'Left'.
-- * Sections which can parsed by the pattern @sep@ will be parsed and captured
-- as 'Right'.
-- * Non-matching sections of the stream will be captured in 'Left'.
--
-- There are two constraints on the output:
-- The output list also has these properties:
--
-- * The output list will non-empty. If there are no pattern matches, then
-- * If the input is @""@ then the output list will be @[]@.
-- * If there are no pattern matches, then
-- the entire input stream will be returned as one non-matching 'Left' section.
-- If the input is @""@ then the output list will be @[Left ""]@.
-- * The output list will not contain two consecutive 'Left's.
-- * The output list will not contain two consecutive 'Left' sections.
--
-- === Zero-width matches forbidden
--
Expand Down

0 comments on commit e67be65

Please sign in to comment.