avoid pretty-show with GHC < 7.4; update tested-with (fixes #155)
hledger builds with GHC 7.2 through 7.8. 7.0 is not supported because we require shakespeare which requires the DeriveGeneric extension.
This commit is contained in:
		
							parent
							
								
									da0ce23144
								
							
						
					
					
						commit
						ef1cc06cab
					
				| @ -24,7 +24,9 @@ module Hledger.Utils (---- provide these frequently used modules - or not, for c | ||||
|                           -- module Data.PPrint, | ||||
|                           -- module Hledger.Utils.UTF8IOCompat | ||||
|                           SystemString,fromSystemString,toSystemString,error',userError', | ||||
| #if __GLASGOW_HASKELL__ >= 704 | ||||
|                           ppShow | ||||
| #endif | ||||
|                           -- the rest need to be done in each module I think | ||||
|                           ) | ||||
| where | ||||
| @ -52,13 +54,20 @@ import Text.ParserCombinators.Parsec | ||||
| import Text.Printf | ||||
| import Text.Regex.TDFA | ||||
| import Text.RegexPR | ||||
| import Text.Show.Pretty | ||||
| -- import qualified Data.Map as Map | ||||
| --  | ||||
| -- import Prelude hiding (readFile,writeFile,appendFile,getContents,putStr,putStrLn) | ||||
| -- import Hledger.Utils.UTF8IOCompat   (readFile,writeFile,appendFile,getContents,putStr,putStrLn) | ||||
| import Hledger.Utils.UTF8IOCompat (SystemString,fromSystemString,toSystemString,error',userError') | ||||
| 
 | ||||
| #if __GLASGOW_HASKELL__ >= 704 | ||||
| import Text.Show.Pretty (ppShow) | ||||
| #else | ||||
| -- the required pretty-show version requires GHC >= 7.4 | ||||
| ppShow :: Show a => a -> String | ||||
| ppShow = show | ||||
| #endif | ||||
| 
 | ||||
| -- strings | ||||
| 
 | ||||
| lowercase = map toLower | ||||
|  | ||||
| @ -17,7 +17,7 @@ author:         Simon Michael <simon@joyful.com> | ||||
| maintainer:     Simon Michael <simon@joyful.com> | ||||
| homepage:       http://hledger.org | ||||
| bug-reports:    http://hledger.org/bugs | ||||
| tested-with:    GHC==7.4.2, GHC==7.6.3 | ||||
| tested-with:    GHC==7.2.2, GHC==7.4.2, GHC==7.6.3, GHC==7.8 | ||||
| cabal-version:  >= 1.10 | ||||
| build-type:     Simple | ||||
| -- data-dir:       data | ||||
| @ -31,6 +31,7 @@ extra-source-files: tests/suite.hs | ||||
| library | ||||
|   -- should set patchlevel here as in Makefile | ||||
|   cpp-options:    -DPATCHLEVEL=0 | ||||
|   default-language: Haskell2010 | ||||
|   exposed-modules: | ||||
|                   Hledger | ||||
|                   Hledger.Data | ||||
| @ -75,7 +76,6 @@ library | ||||
|                  ,old-locale | ||||
|                  ,old-time | ||||
|                  ,parsec | ||||
|                  ,pretty-show >= 1.6.4 | ||||
|                  ,regex-tdfa | ||||
|                  ,regexpr >= 0.5.1 | ||||
|                  ,safe >= 0.2 | ||||
| @ -84,7 +84,8 @@ library | ||||
|                  ,transformers >= 0.2 && < 0.4 | ||||
|                  ,utf8-string >= 0.3.5 && < 0.4 | ||||
|                  ,HUnit | ||||
|   default-language: Haskell2010 | ||||
|   if impl(ghc >= 7.4) | ||||
|     build-depends: pretty-show >= 1.6.4 | ||||
| 
 | ||||
| source-repository head | ||||
|   type:     git | ||||
| @ -94,6 +95,7 @@ test-suite tests | ||||
|   type:     exitcode-stdio-1.0 | ||||
|   main-is:  tests/suite.hs | ||||
|   ghc-options: -Wall | ||||
|   default-language: Haskell2010 | ||||
|   build-depends: hledger-lib | ||||
|                , base >= 4.3 && < 5 | ||||
|                , cmdargs | ||||
| @ -107,7 +109,6 @@ test-suite tests | ||||
|                , old-locale | ||||
|                , old-time | ||||
|                , parsec | ||||
|                , pretty-show >= 1.6.4 | ||||
|                , regex-tdfa | ||||
|                , regexpr | ||||
|                , safe | ||||
| @ -116,7 +117,8 @@ test-suite tests | ||||
|                , test-framework-hunit | ||||
|                , time | ||||
|                , transformers | ||||
|   default-language: Haskell2010 | ||||
|   if impl(ghc >= 7.4) | ||||
|     build-depends: pretty-show >= 1.6.4 | ||||
| 
 | ||||
| -- cf http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html | ||||
| 
 | ||||
|  | ||||
| @ -18,7 +18,7 @@ author:         Simon Michael <simon@joyful.com> | ||||
| maintainer:     Simon Michael <simon@joyful.com> | ||||
| homepage:       http://hledger.org | ||||
| bug-reports:    http://hledger.org/bugs | ||||
| tested-with:    GHC==7.4.2, GHC==7.6.3 | ||||
| tested-with:    GHC==7.2.2, GHC==7.4.2, GHC==7.6.3, GHC==7.8 | ||||
| cabal-version:  >= 1.10 | ||||
| build-type:     Simple | ||||
| -- data-dir:       data | ||||
| @ -43,6 +43,7 @@ flag threaded | ||||
| library | ||||
|   cpp-options:    -DVERSION="0.22.98" | ||||
|   ghc-options:    -W | ||||
|   default-language: Haskell2010 | ||||
|   -- should be the same as below | ||||
|   exposed-modules: | ||||
|                   Hledger.Cli | ||||
| @ -86,7 +87,8 @@ library | ||||
|                  ,time | ||||
|                  ,utf8-string >= 0.3.5 && < 0.4 | ||||
|                  ,wizards == 1.0.* | ||||
|   default-language: Haskell2010 | ||||
|   if impl(ghc >= 7.4) | ||||
|     build-depends: pretty-show >= 1.6.4 | ||||
| 
 | ||||
| -- should depend on the above to avoid double compilation but this is | ||||
| -- still too complicated as of 2011/6/1 because: | ||||
| @ -119,6 +121,7 @@ executable hledger | ||||
|   if flag(threaded) | ||||
|        ghc-options:   -threaded | ||||
|  -- should be the same as above | ||||
|   default-language: Haskell2010 | ||||
|   build-depends: | ||||
|                   hledger-lib == 0.22.98 | ||||
|                  ,base >= 4.3 && < 5 | ||||
| @ -143,12 +146,14 @@ executable hledger | ||||
|                  ,time | ||||
|                  ,utf8-string >= 0.3.5 && < 0.4 | ||||
|                  ,wizards == 1.0.* | ||||
|   default-language: Haskell2010 | ||||
|   if impl(ghc >= 7.4) | ||||
|     build-depends: pretty-show >= 1.6.4 | ||||
| 
 | ||||
| test-suite tests | ||||
|   type:     exitcode-stdio-1.0 | ||||
|   main-is:  tests/suite.hs | ||||
|   ghc-options: -Wall | ||||
|   default-language: Haskell2010 | ||||
|   build-depends: hledger-lib | ||||
|                , hledger | ||||
|                , base >= 4.3 && < 5 | ||||
| @ -164,7 +169,6 @@ test-suite tests | ||||
|                , old-locale | ||||
|                , old-time | ||||
|                , parsec | ||||
|                , pretty-show >= 1.6.4 | ||||
|                , process | ||||
|                , regexpr | ||||
|                , safe | ||||
| @ -177,4 +181,5 @@ test-suite tests | ||||
|                , time | ||||
|                , transformers | ||||
|                , wizards == 1.0.* | ||||
|   default-language: Haskell2010 | ||||
|   if impl(ghc >= 7.4) | ||||
|     build-depends: pretty-show >= 1.6.4 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user