require data-pprint as a debugging aid and make some types compatible with it
This commit is contained in:
parent
a3900c80b2
commit
671bb6c4a2
@ -20,10 +20,10 @@ For more detailed documentation on each type, see the corresponding modules.
|
|||||||
module Hledger.Data.Types
|
module Hledger.Data.Types
|
||||||
where
|
where
|
||||||
import Control.Monad.Error (ErrorT)
|
import Control.Monad.Error (ErrorT)
|
||||||
|
import Data.Data
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.Time.Calendar
|
import Data.Time.Calendar
|
||||||
import Data.Time.LocalTime
|
import Data.Time.LocalTime
|
||||||
import Data.Typeable
|
|
||||||
import System.Time (ClockTime)
|
import System.Time (ClockTime)
|
||||||
|
|
||||||
|
|
||||||
@ -31,13 +31,13 @@ type SmartDate = (String,String,String)
|
|||||||
|
|
||||||
data WhichDate = PrimaryDate | SecondaryDate deriving (Eq,Show)
|
data WhichDate = PrimaryDate | SecondaryDate deriving (Eq,Show)
|
||||||
|
|
||||||
data DateSpan = DateSpan (Maybe Day) (Maybe Day) deriving (Eq,Show,Ord)
|
data DateSpan = DateSpan (Maybe Day) (Maybe Day) deriving (Eq,Show,Ord,Data,Typeable)
|
||||||
|
|
||||||
data Interval = NoInterval
|
data Interval = NoInterval
|
||||||
| Days Int | Weeks Int | Months Int | Quarters Int | Years Int
|
| Days Int | Weeks Int | Months Int | Quarters Int | Years Int
|
||||||
| DayOfMonth Int | DayOfWeek Int
|
| DayOfMonth Int | DayOfWeek Int
|
||||||
-- WeekOfYear Int | MonthOfYear Int | QuarterOfYear Int
|
-- WeekOfYear Int | MonthOfYear Int | QuarterOfYear Int
|
||||||
deriving (Eq,Show,Ord)
|
deriving (Eq,Show,Ord,Data,Typeable)
|
||||||
|
|
||||||
type AccountName = String
|
type AccountName = String
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{-# LANGUAGE RecordWildCards #-}
|
{-# LANGUAGE RecordWildCards, DeriveDataTypeable #-}
|
||||||
{-|
|
{-|
|
||||||
|
|
||||||
Generate several common kinds of report from a journal, as \"*Report\" -
|
Generate several common kinds of report from a journal, as \"*Report\" -
|
||||||
@ -99,7 +99,7 @@ data ReportOpts = ReportOpts {
|
|||||||
,related_ :: Bool
|
,related_ :: Bool
|
||||||
,average_ :: Bool
|
,average_ :: Bool
|
||||||
,query_ :: String -- all arguments, as a string
|
,query_ :: String -- all arguments, as a string
|
||||||
} deriving (Show)
|
} deriving (Show, Data, Typeable)
|
||||||
|
|
||||||
type DisplayExp = String
|
type DisplayExp = String
|
||||||
type FormatStr = String
|
type FormatStr = String
|
||||||
|
|||||||
@ -67,6 +67,7 @@ library
|
|||||||
-- ,cabal-file-th
|
-- ,cabal-file-th
|
||||||
,containers
|
,containers
|
||||||
,cmdargs >= 0.10 && < 0.11
|
,cmdargs >= 0.10 && < 0.11
|
||||||
|
,data-pprint >= 0.2.2 && < 0.3
|
||||||
,directory
|
,directory
|
||||||
,filepath
|
,filepath
|
||||||
,haskeline >= 0.6 && <= 0.8
|
,haskeline >= 0.6 && <= 0.8
|
||||||
@ -121,6 +122,7 @@ executable hledger
|
|||||||
,base >= 4.3 && < 5
|
,base >= 4.3 && < 5
|
||||||
,containers
|
,containers
|
||||||
,cmdargs >= 0.10 && < 0.11
|
,cmdargs >= 0.10 && < 0.11
|
||||||
|
,data-pprint >= 0.2.2 && < 0.3
|
||||||
,directory
|
,directory
|
||||||
,filepath
|
,filepath
|
||||||
,haskeline >= 0.6 && <= 0.8
|
,haskeline >= 0.6 && <= 0.8
|
||||||
@ -149,6 +151,7 @@ test-suite tests
|
|||||||
, cmdargs
|
, cmdargs
|
||||||
, containers
|
, containers
|
||||||
, csv
|
, csv
|
||||||
|
, data-pprint >= 0.2.2 && < 0.3
|
||||||
, directory
|
, directory
|
||||||
, filepath
|
, filepath
|
||||||
, haskeline
|
, haskeline
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user