lib: use Data.Default directly, not via cmdargs

This commit is contained in:
Simon Michael 2016-07-29 10:15:48 -07:00
parent 4022f5cb61
commit b7071dee84
9 changed files with 14 additions and 6 deletions

View File

@ -25,6 +25,7 @@ import Control.DeepSeq (NFData)
import Control.Monad.Except (ExceptT)
import Data.Data
import Data.Decimal
import Data.Default
import Text.Blaze (ToMarkup(..))
import qualified Data.Map as M
import Data.Text (Text)

View File

@ -37,7 +37,7 @@ import Data.Functor.Compat ((<$>))
import qualified Data.Text as T
import Data.Typeable (Typeable)
import Data.Time.Calendar
import System.Console.CmdArgs.Default -- some additional default stuff
import Data.Default
import Test.HUnit
import Hledger.Data
@ -97,6 +97,7 @@ data ReportOpts = ReportOpts {
} deriving (Show, Data, Typeable)
instance Default ReportOpts where def = defreportopts
instance Default Bool where def = False
defreportopts :: ReportOpts
defreportopts = ReportOpts

View File

@ -70,6 +70,7 @@ dependencies:
- cmdargs >= 0.10 && < 0.11
- containers
- csv
- data-default >= 0.5
- Decimal
- deepseq
- directory

View File

@ -71,6 +71,7 @@ library
, cmdargs >= 0.10 && < 0.11
, containers
, csv
, data-default >= 0.5
, Decimal
, deepseq
, directory
@ -154,6 +155,7 @@ test-suite hunittests
, cmdargs >= 0.10 && < 0.11
, containers
, csv
, data-default >= 0.5
, Decimal
, deepseq
, directory

View File

@ -5,12 +5,11 @@
module Hledger.UI.UIOptions
where
import Data.Default
#if !MIN_VERSION_base(4,8,0)
import Data.Functor.Compat ((<$>))
#endif
import Data.List (intercalate)
import System.Console.CmdArgs
import System.Console.CmdArgs.Explicit
import Hledger.Cli hiding (progname,version,prognameandversion)
import Hledger.UI.Theme (themeNames)

View File

@ -2,12 +2,11 @@
module Hledger.Web.WebOptions
where
import Prelude
import Data.Default
#if !MIN_VERSION_base(4,8,0)
import Data.Functor.Compat ((<$>))
#endif
import Data.Maybe
import System.Console.CmdArgs
import System.Console.CmdArgs.Explicit
import Hledger.Cli hiding (progname,version,prognameandversion)
import Settings

View File

@ -66,6 +66,7 @@ import Prelude ()
import Prelude.Compat
import qualified Control.Exception as C
import Control.Monad (when)
import Data.Default
#if !MIN_VERSION_base(4,8,0)
import Data.Functor.Compat ((<$>))
#endif
@ -76,7 +77,7 @@ import Data.Maybe
-- import Data.Text (Text)
import qualified Data.Text as T
import Safe
import System.Console.CmdArgs
import System.Console.CmdArgs hiding (Default,def)
import System.Console.CmdArgs.Explicit
import System.Console.CmdArgs.Text
#ifndef mingw32_HOST_OS

View File

@ -73,6 +73,7 @@ dependencies:
- unordered-containers
- cmdargs >= 0.10 && < 0.11
- csv
- data-default >= 0.5
- directory
- file-embed >= 0.0.10 && < 0.1
- filepath

View File

@ -92,6 +92,7 @@ library
, unordered-containers
, cmdargs >= 0.10 && < 0.11
, csv
, data-default >= 0.5
, directory
, file-embed >= 0.0.10 && < 0.1
, filepath
@ -174,6 +175,7 @@ executable hledger
, unordered-containers
, cmdargs >= 0.10 && < 0.11
, csv
, data-default >= 0.5
, directory
, file-embed >= 0.0.10 && < 0.1
, filepath
@ -230,6 +232,7 @@ test-suite test
, unordered-containers
, cmdargs >= 0.10 && < 0.11
, csv
, data-default >= 0.5
, directory
, file-embed >= 0.0.10 && < 0.1
, filepath