fix handling of non-ascii arguments with ghc 6.12
Seems decodeString is needed here with 6.12 after all
This commit is contained in:
parent
557746da5e
commit
9261071987
@ -12,9 +12,7 @@ import Hledger.Data.IO (myLedgerPath,myTimelogPath)
|
|||||||
import Hledger.Data.Utils
|
import Hledger.Data.Utils
|
||||||
import Hledger.Data.Types
|
import Hledger.Data.Types
|
||||||
import Hledger.Data.Dates
|
import Hledger.Data.Dates
|
||||||
#if __GLASGOW_HASKELL__ <= 610
|
|
||||||
import Codec.Binary.UTF8.String (decodeString)
|
import Codec.Binary.UTF8.String (decodeString)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CHART
|
#ifdef CHART
|
||||||
chartoutput = "hledger.png"
|
chartoutput = "hledger.png"
|
||||||
@ -148,11 +146,7 @@ optValuesForConstructors fs opts = concatMap get opts
|
|||||||
-- YYYY/MM/DD format based on the current time.
|
-- YYYY/MM/DD format based on the current time.
|
||||||
parseArguments :: IO ([Opt], String, [String])
|
parseArguments :: IO ([Opt], String, [String])
|
||||||
parseArguments = do
|
parseArguments = do
|
||||||
#if __GLASGOW_HASKELL__ <= 610
|
|
||||||
args <- liftM (map decodeString) getArgs
|
args <- liftM (map decodeString) getArgs
|
||||||
#else
|
|
||||||
args <- getArgs
|
|
||||||
#endif
|
|
||||||
let (os,as,es) = getOpt Permute options args
|
let (os,as,es) = getOpt Permute options args
|
||||||
-- istimequery <- usingTimeProgramName
|
-- istimequery <- usingTimeProgramName
|
||||||
-- let os' = if istimequery then (Period "today"):os else os
|
-- let os' = if istimequery then (Period "today"):os else os
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user