allow megaparsec 5.0 or 5.1 for stackage compatibility
This commit is contained in:
		
							parent
							
								
									13a8f21dc5
								
							
						
					
					
						commit
						8bc0538778
					
				| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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)) | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user