allow megaparsec 5.0 or 5.1 for stackage compatibility

This commit is contained in:
Simon Michael 2016-10-27 07:19:26 -07:00
parent 13a8f21dc5
commit 8bc0538778
9 changed files with 16 additions and 14 deletions

View File

@ -81,9 +81,11 @@ debugLevel = case snd $ break (=="--debug") args of
args = unsafePerformIO getArgs
-- | Convenience aliases for tracePrettyAt.
-- Pretty-print a message and the showable value to the console, then return it.
dbg :: Show a => String -> a -> a
dbg = tracePrettyAt 0
-- Always pretty-print a message and the showable value to the console, then return it.
-- ("dbg" without the 0 clashes with megaparsec 5.1).
dbg0 :: Show a => String -> a -> a
dbg0 = tracePrettyAt 0
-- | Pretty-print a message and the showable value to the console when the debug level is >= 1, then return it. Uses unsafePerformIO.
dbg1 :: Show a => String -> a -> a
@ -212,7 +214,7 @@ dbgppshow level
-- | Like dbg, then exit the program. Uses unsafePerformIO.
dbgExit :: Show a => String -> a -> a
dbgExit msg = const (unsafePerformIO exitFailure) . dbg msg
dbgExit msg = const (unsafePerformIO exitFailure) . dbg0 msg
-- | Print a message and parsec debug info (parse position and next
-- input) to the console when the debug level is at or above

View File

@ -68,7 +68,7 @@ library
, deepseq
, directory
, filepath
, megaparsec >=5 && < 5.1
, megaparsec >=5.0 && < 5.2
, mtl
, mtl-compat
, old-time
@ -158,7 +158,7 @@ test-suite doctests
, deepseq
, directory
, filepath
, megaparsec >=5 && < 5.1
, megaparsec >=5.0 && < 5.2
, mtl
, mtl-compat
, old-time
@ -198,7 +198,7 @@ test-suite hunittests
, deepseq
, directory
, filepath
, megaparsec >=5 && < 5.1
, megaparsec >=5.0 && < 5.2
, mtl
, mtl-compat
, old-time

View File

@ -52,7 +52,7 @@ dependencies:
- deepseq
- directory
- filepath
- megaparsec >=5 && < 5.1
- megaparsec >=5.0 && < 5.2
- mtl
- mtl-compat
- old-time

View File

@ -69,7 +69,7 @@ executable hledger-ui
, HUnit
, microlens >= 0.4 && < 0.5
, microlens-platform >= 0.2.3.1 && < 0.4
, megaparsec >= 5
, megaparsec >=5.0 && < 5.2
, pretty-show >=1.6.4
, process >= 1.2
, safe >= 0.2

View File

@ -60,7 +60,7 @@ executables:
- HUnit
- microlens >= 0.4 && < 0.5
- microlens-platform >= 0.2.3.1 && < 0.4
- megaparsec >= 5
- megaparsec >=5.0 && < 5.2
- pretty-show >=1.6.4
- process >= 1.2
- safe >= 0.2

View File

@ -159,7 +159,7 @@ library
, yesod-form
, yesod-static
, json
, megaparsec >=5 && < 5.1
, megaparsec >=5.0 && < 5.2
, mtl
if (flag(dev)) || (flag(library-only))
cpp-options: -DDEVELOPMENT

View File

@ -119,7 +119,7 @@ library:
- Settings.Development
- Settings.StaticFiles
dependencies:
- megaparsec >=5 && < 5.1
- megaparsec >=5.0 && < 5.2
- mtl
when:
- condition: (flag(dev)) || (flag(library-only))

View File

@ -104,7 +104,7 @@ library
, mtl
, mtl-compat
, old-time
, megaparsec >=5 && < 5.1
, megaparsec >=5.0 && < 5.2
, regex-tdfa
, safe >=0.2
, split >=0.1 && <0.3

View File

@ -117,7 +117,7 @@ library:
- mtl
- mtl-compat
- old-time
- megaparsec >=5 && < 5.1
- megaparsec >=5.0 && < 5.2
- regex-tdfa
- safe >=0.2
- split >=0.1 && <0.3