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 args = unsafePerformIO getArgs
-- | Convenience aliases for tracePrettyAt. -- | Convenience aliases for tracePrettyAt.
-- Pretty-print a message and the showable value to the console, then return it.
dbg :: Show a => String -> a -> a -- Always pretty-print a message and the showable value to the console, then return it.
dbg = tracePrettyAt 0 -- ("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. -- | 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 dbg1 :: Show a => String -> a -> a
@ -212,7 +214,7 @@ dbgppshow level
-- | Like dbg, then exit the program. Uses unsafePerformIO. -- | Like dbg, then exit the program. Uses unsafePerformIO.
dbgExit :: Show a => String -> a -> a 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 -- | Print a message and parsec debug info (parse position and next
-- input) to the console when the debug level is at or above -- input) to the console when the debug level is at or above

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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