Skip to content

Commit

Permalink
Add support for Megaparsec 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Feb 1, 2017
1 parent 84a8aba commit 40587e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Hspec Megaparec 0.3.0
## Hspec Megaparsec 0.3.1

* Support for Megaparsec 5.2.0.

## Hspec Megaparsec 0.3.0

* Added helpers for parse error construction (useful with `shouldFailWith`):
`err`, `posI`, `posN`, `utok`, `utoks`, `ulabel`, `ueof`, `etok`, `etoks`,
Expand Down
8 changes: 7 additions & 1 deletion Test/Hspec/Megaparsec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,13 @@ succeedsLeaving :: ( ShowToken (Token s)
-- column).

initialState :: s -> State s
initialState s = State s (initialPos "" :| []) defaultTabWidth
initialState s = State
{ stateInput = s
, statePos = initialPos "" :| []
#if MIN_VERSION_megaparsec(5,2,0)
, stateTokensProcessed = 0
#endif
, stateTabWidth = defaultTabWidth }

----------------------------------------------------------------------------
-- Helpers
Expand Down

0 comments on commit 40587e9

Please sign in to comment.