Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hledger.Cli.Script
Description
A convenient module to import in hledger scripts, aiming to provide the most useful imports and reduce boilerplate. |
Synopsis
- data Char
- data Ordering
- data Maybe a
- type Change = MixedAmount
- class Eq a => Ord a where
- type FilePath = String
- class Functor f => Applicative (f :: Type -> Type) where
- class Functor (f :: Type -> Type) where
- class Applicative m => Monad (m :: Type -> Type) where
- data Either a b
- data IO a
- newtype Const a (b :: k) = Const {
- getConst :: a
- class Applicative f => Alternative (f :: Type -> Type) where
- data Text
- data UTCTime = UTCTime {
- utctDay :: Day
- utctDayTime :: DiffTime
- class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where
- class Monad m => MonadFail (m :: Type -> Type) where
- data ThreadId
- data Complete
- data Arg a = Arg {
- argValue :: Update a
- argType :: FlagHelp
- argRequire :: Bool
- data MVar a
- data Chan a
- data QSem
- data QSemN
- type IOError = IOException
- data ExitCode
- = ExitSuccess
- | ExitFailure Int
- data Handle
- data TextEncoding
- data SeekMode
- data HandlePosn
- data BufferMode
- = NoBuffering
- | LineBuffering
- | BlockBuffering (Maybe Int)
- data Newline
- data NewlineMode = NewlineMode {}
- data IOMode
- data IOErrorType
- newtype Down a = Down {
- getDown :: a
- newtype WrappedArrow (a :: Type -> Type -> Type) b c = WrapArrow {
- unwrapArrow :: a b c
- newtype WrappedMonad (m :: Type -> Type) a = WrapMonad {
- unwrapMonad :: m a
- newtype ZipList a = ZipList {
- getZipList :: [a]
- data GeneralCategory
- = UppercaseLetter
- | LowercaseLetter
- | TitlecaseLetter
- | ModifierLetter
- | OtherLetter
- | NonSpacingMark
- | SpacingCombiningMark
- | EnclosingMark
- | DecimalNumber
- | LetterNumber
- | OtherNumber
- | ConnectorPunctuation
- | DashPunctuation
- | OpenPunctuation
- | ClosePunctuation
- | InitialQuote
- | FinalQuote
- | OtherPunctuation
- | MathSymbol
- | CurrencySymbol
- | ModifierSymbol
- | OtherSymbol
- | Space
- | LineSeparator
- | ParagraphSeparator
- | Control
- | Format
- | Surrogate
- | PrivateUse
- | NotAssigned
- class HPrintfType t
- class IsChar c where
- class PrintfArg a where
- formatArg :: a -> FieldFormatter
- parseFormat :: a -> ModifierParser
- class PrintfType t
- data FieldFormat = FieldFormat {
- fmtWidth :: Maybe Int
- fmtPrecision :: Maybe Int
- fmtAdjust :: Maybe FormatAdjustment
- fmtSign :: Maybe FormatSign
- fmtAlternate :: Bool
- fmtModifiers :: String
- fmtChar :: Char
- type FieldFormatter = FieldFormat -> ShowS
- data FormatAdjustment
- data FormatParse = FormatParse {}
- data FormatSign
- type ModifierParser = String -> FormatParse
- type HasCallStack = ?callStack :: CallStack
- type Tag = (TagName, TagValue)
- class Remap (m :: Type -> Type) where
- remap :: (a -> b) -> (b -> (a, a -> b)) -> m a -> m b
- data Flag a = Flag {}
- type Update a = String -> a -> Either String a
- data FlagInfo
- data Mode a = Mode {
- modeGroupModes :: Group (Mode a)
- modeNames :: [Name]
- modeValue :: a
- modeCheck :: a -> Either String a
- modeReform :: a -> Maybe [String]
- modeExpandAt :: Bool
- modeHelp :: Help
- modeHelpSuffix :: [String]
- modeArgs :: ([Arg a], Maybe (Arg a))
- modeGroupFlags :: Group (Flag a)
- data Group a = Group {
- groupUnnamed :: [a]
- groupHidden :: [a]
- groupNamed :: [(Help, [a])]
- type FlagHelp = String
- type Help = String
- data HelpFormat
- data Reader (m :: Type -> Type) = Reader {
- rFormat :: StorageFormat
- rExtensions :: [String]
- rReadFn :: InputOpts -> FilePath -> Text -> ExceptT String IO Journal
- rParser :: MonadIO m => ErroringJournalParser m ParsedJournal
- data ProcessHandle
- data StdStream
- data CmdSpec
- data CreateProcess = CreateProcess {
- cmdspec :: CmdSpec
- cwd :: Maybe FilePath
- env :: Maybe [(String, String)]
- std_in :: StdStream
- std_out :: StdStream
- std_err :: StdStream
- close_fds :: Bool
- create_group :: Bool
- delegate_ctlc :: Bool
- detach_console :: Bool
- create_new_console :: Bool
- new_session :: Bool
- child_group :: Maybe GroupID
- child_user :: Maybe UserID
- use_process_jobs :: Bool
- type Pid = CPid
- data Permissions
- data XdgDirectory
- data XdgDirectoryList
- data SourcePos = SourcePos {
- sourceName :: FilePath
- sourceLine :: !Pos
- sourceColumn :: !Pos
- data Timeout
- data TestTree
- data DependencyType
- type TestName = String
- type Year = Integer
- type RegexError = String
- type Replacement = String
- data Regexp
- data Ledger = Ledger {}
- data NormalSign
- data Account = Account {
- aname :: AccountName
- adeclarationinfo :: Maybe AccountDeclarationInfo
- asubs :: [Account]
- aparent :: Maybe Account
- aboring :: Bool
- anumpostings :: Int
- aebalance :: MixedAmount
- aibalance :: MixedAmount
- data AccountDeclarationInfo = AccountDeclarationInfo {
- adicomment :: Text
- aditags :: [Tag]
- adideclarationorder :: Int
- adisourcepos :: SourcePos
- newtype TagDeclarationInfo = TagDeclarationInfo {
- tdicomment :: Text
- data PayeeDeclarationInfo = PayeeDeclarationInfo {
- pdicomment :: Text
- pditags :: [Tag]
- type StorageFormat = String
- type ParsedJournal = Journal
- data Journal = Journal {
- jparsedefaultyear :: Maybe Year
- jparsedefaultcommodity :: Maybe (CommoditySymbol, AmountStyle)
- jparsedecimalmark :: Maybe DecimalMark
- jparseparentaccounts :: [AccountName]
- jparsealiases :: [AccountAlias]
- jparsetimeclockentries :: [TimeclockEntry]
- jincludefilestack :: [FilePath]
- jdeclaredpayees :: [(Payee, PayeeDeclarationInfo)]
- jdeclaredtags :: [(TagName, TagDeclarationInfo)]
- jdeclaredaccounts :: [(AccountName, AccountDeclarationInfo)]
- jdeclaredaccounttags :: Map AccountName [Tag]
- jdeclaredaccounttypes :: Map AccountType [AccountName]
- jaccounttypes :: Map AccountName AccountType
- jglobalcommoditystyles :: Map CommoditySymbol AmountStyle
- jcommodities :: Map CommoditySymbol Commodity
- jinferredcommodities :: Map CommoditySymbol AmountStyle
- jpricedirectives :: [PriceDirective]
- jinferredmarketprices :: [MarketPrice]
- jtxnmodifiers :: [TransactionModifier]
- jperiodictxns :: [PeriodicTransaction]
- jtxns :: [Transaction]
- jfinalcommentlines :: Text
- jfiles :: [(FilePath, Text)]
- jlastreadtime :: POSIXTime
- data MarketPrice = MarketPrice {
- mpdate :: Day
- mpfrom :: CommoditySymbol
- mpto :: CommoditySymbol
- mprate :: Quantity
- data PriceDirective = PriceDirective {}
- data TimeclockEntry = TimeclockEntry {
- tlsourcepos :: SourcePos
- tlcode :: TimeclockCode
- tldatetime :: LocalTime
- tlaccount :: AccountName
- tldescription :: Text
- tlcomment :: Text
- tltags :: [Tag]
- data TimeclockCode
- = SetBalance
- | SetRequiredHours
- | In
- | Out
- | FinalOut
- data PeriodicTransaction = PeriodicTransaction {
- ptperiodexpr :: Text
- ptinterval :: Interval
- ptspan :: DateSpan
- ptsourcepos :: (SourcePos, SourcePos)
- ptstatus :: Status
- ptcode :: Text
- ptdescription :: Text
- ptcomment :: Text
- pttags :: [Tag]
- ptpostings :: [Posting]
- data TMPostingRule = TMPostingRule {
- tmprPosting :: Posting
- tmprIsMultiplier :: Bool
- data TransactionModifier = TransactionModifier {}
- data Transaction = Transaction {}
- data Posting = Posting {
- pdate :: Maybe Day
- pdate2 :: Maybe Day
- pstatus :: Status
- paccount :: AccountName
- pamount :: MixedAmount
- pcomment :: Text
- ptype :: PostingType
- ptags :: [Tag]
- pbalanceassertion :: Maybe BalanceAssertion
- ptransaction :: Maybe Transaction
- poriginal :: Maybe Posting
- data BalanceAssertion = BalanceAssertion {
- baamount :: Amount
- batotal :: Bool
- bainclusive :: Bool
- baposition :: SourcePos
- data Status
- type DateTag = (TagName, Day)
- type TagValue = Text
- type TagName = Text
- data PostingType
- data MixedAmount
- class HasAmounts a where
- styleAmounts :: Map CommoditySymbol AmountStyle -> a -> a
- data Amount = Amount {
- acommodity :: !CommoditySymbol
- aquantity :: !Quantity
- astyle :: !AmountStyle
- aprice :: !(Maybe AmountPrice)
- data Commodity = Commodity {}
- type CommoditySymbol = Text
- data DigitGroupStyle = DigitGroups !Char ![Word8]
- data AmountPrecision
- = Precision !Word8
- | NaturalPrecision
- data AmountStyle = AmountStyle {
- ascommodityside :: !Side
- ascommodityspaced :: !Bool
- asdigitgroups :: !(Maybe DigitGroupStyle)
- asdecimalmark :: !(Maybe Char)
- asprecision :: !(Maybe AmountPrecision)
- data AmountPrice
- = UnitPrice !Amount
- | TotalPrice !Amount
- type Quantity = Decimal
- type DecimalMark = Char
- data Side
- data AccountAlias
- data AccountType
- type AccountName = Text
- type Payee = Text
- data Interval
- = NoInterval
- | Days Int
- | Weeks Int
- | Months Int
- | Quarters Int
- | Years Int
- | DayOfMonth Int
- | WeekdayOfMonth Int Int
- | DaysOfWeek [Int]
- | DayOfYear Int Int
- type DayOfMonth = Int
- data Period
- class Ord p => DayPeriod p where
- periodFirstDay :: p -> Day
- periodLastDay :: p -> Day
- dayPeriod :: Day -> p
- data DateSpan = DateSpan (Maybe EFDay) (Maybe EFDay)
- data EFDay
- data WhichDate
- data SmartInterval
- newtype Day = ModifiedJulianDay {
- toModifiedJulianDay :: Integer
- type Month = Int
- type Quarter = Int
- data SmartDate
- type WeekDay = Int
- type MonthDay = Int
- type YearDay = Int
- type MonthWeek = Int
- type YearWeek = Int
- type HledgerParseErrors = ParseErrorBundle Text HledgerParseErrorData
- data HledgerParseErrorData
- data WideBuilder = WideBuilder {}
- type TextParser (m :: Type -> Type) a = ParsecT HledgerParseErrorData Text m a
- type SimpleTextParser = Parsec HledgerParseErrorData Text
- type SimpleStringParser a = Parsec HledgerParseErrorData String a
- data RawOpts
- data ReportItemField
- data StringFormatComponent
- = FormatLiteral Text
- | FormatField Bool (Maybe Int) (Maybe Int) ReportItemField
- data StringFormat
- data AmountDisplayOpts = AmountDisplayOpts {
- displayPrice :: Bool
- displayZeroCommodity :: Bool
- displayThousandsSep :: Bool
- displayColour :: Bool
- displayOneLine :: Bool
- displayMinWidth :: Maybe Int
- displayMaxWidth :: Maybe Int
- displayOrder :: Maybe [CommoditySymbol]
- type PriceOracle = (Day, CommoditySymbol, Maybe CommoditySymbol) -> Maybe (CommoditySymbol, Quantity)
- data ValuationType
- data ConversionOp
- data QueryOpt
- data OrdPlus
- data Query
- type ErroringJournalParser (m :: Type -> Type) a = StateT Journal (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError m)) a
- type JournalParser (m :: Type -> Type) a = StateT Journal (ParsecT HledgerParseErrorData Text m) a
- data BalancingOpts = BalancingOpts {
- ignore_assertions_ :: Bool
- infer_balancing_costs_ :: Bool
- commodity_styles_ :: Maybe (Map CommoditySymbol AmountStyle)
- class HasBalancingOpts c where
- balancingOpts :: Lens' c BalancingOpts
- commodity_styles :: Lens' c (Maybe (Map CommoditySymbol AmountStyle))
- ignore_assertions :: Lens' c Bool
- infer_balancing_costs :: Lens' c Bool
- data InputOpts = InputOpts {
- mformat_ :: Maybe StorageFormat
- mrules_file_ :: Maybe FilePath
- aliases_ :: [String]
- anon_ :: Bool
- new_ :: Bool
- new_save_ :: Bool
- pivot_ :: String
- forecast_ :: Maybe DateSpan
- verbose_tags_ :: Bool
- reportspan_ :: DateSpan
- auto_ :: Bool
- infer_equity_ :: Bool
- infer_costs_ :: Bool
- balancingopts_ :: BalancingOpts
- strict_ :: Bool
- _ioDay :: Day
- class HasInputOpts c where
- inputOpts :: Lens' c InputOpts
- aliases :: Lens' c [String]
- anon__ :: Lens' c Bool
- auto__ :: Lens' c Bool
- balancingopts :: Lens' c BalancingOpts
- forecast :: Lens' c (Maybe DateSpan)
- infer_costs :: Lens' c Bool
- infer_equity :: Lens' c Bool
- ioDay :: Lens' c Day
- mformat :: Lens' c (Maybe StorageFormat)
- mrules_file :: Lens' c (Maybe FilePath)
- new__ :: Lens' c Bool
- new_save :: Lens' c Bool
- pivot :: Lens' c String
- reportspan :: Lens' c DateSpan
- strict :: Lens' c Bool
- verbose_tags :: Lens' c Bool
- data ReportSpec = ReportSpec {
- _rsReportOpts :: ReportOpts
- _rsDay :: Day
- _rsQuery :: Query
- _rsQueryOpts :: [QueryOpt]
- data ReportOpts = ReportOpts {
- period_ :: Period
- interval_ :: Interval
- statuses_ :: [Status]
- conversionop_ :: Maybe ConversionOp
- value_ :: Maybe ValuationType
- infer_prices_ :: Bool
- depth_ :: Maybe Int
- date2_ :: Bool
- empty_ :: Bool
- no_elide_ :: Bool
- real_ :: Bool
- format_ :: StringFormat
- pretty_ :: Bool
- querystring_ :: [Text]
- average_ :: Bool
- related_ :: Bool
- txn_dates_ :: Bool
- balancecalc_ :: BalanceCalculation
- balanceaccum_ :: BalanceAccumulation
- budgetpat_ :: Maybe Text
- accountlistmode_ :: AccountListMode
- drop_ :: Int
- declared_ :: Bool
- row_total_ :: Bool
- no_total_ :: Bool
- show_costs_ :: Bool
- sort_amount_ :: Bool
- percent_ :: Bool
- invert_ :: Bool
- normalbalance_ :: Maybe NormalSign
- color_ :: Bool
- transpose_ :: Bool
- layout_ :: Layout
- data Layout
- = LayoutWide (Maybe Int)
- | LayoutTall
- | LayoutBare
- | LayoutTidy
- data AccountListMode
- data BalanceAccumulation
- data BalanceCalculation
- class HasReportOptsNoUpdate c where
- reportOptsNoUpdate :: Lens' c ReportOpts
- accountlistmode :: Lens' c AccountListMode
- average :: Lens' c Bool
- balanceaccum :: Lens' c BalanceAccumulation
- balancecalc :: Lens' c BalanceCalculation
- budgetpat :: Lens' c (Maybe Text)
- color__ :: Lens' c Bool
- conversionop :: Lens' c (Maybe ConversionOp)
- date2NoUpdate :: Lens' c Bool
- declared :: Lens' c Bool
- depthNoUpdate :: Lens' c (Maybe Int)
- drop__ :: Lens' c Int
- empty__ :: Lens' c Bool
- format :: Lens' c StringFormat
- infer_prices :: Lens' c Bool
- interval :: Lens' c Interval
- invert :: Lens' c Bool
- layout :: Lens' c Layout
- no_elide :: Lens' c Bool
- no_total :: Lens' c Bool
- normalbalance :: Lens' c (Maybe NormalSign)
- percent :: Lens' c Bool
- periodNoUpdate :: Lens' c Period
- pretty :: Lens' c Bool
- querystringNoUpdate :: Lens' c [Text]
- realNoUpdate :: Lens' c Bool
- related :: Lens' c Bool
- row_total :: Lens' c Bool
- show_costs :: Lens' c Bool
- sort_amount :: Lens' c Bool
- statusesNoUpdate :: Lens' c [Status]
- transpose__ :: Lens' c Bool
- txn_dates :: Lens' c Bool
- value :: Lens' c (Maybe ValuationType)
- class HasReportOptsNoUpdate a => HasReportOpts a where
- reportOpts :: ReportableLens' a ReportOpts
- period :: ReportableLens' a Period
- statuses :: ReportableLens' a [Status]
- depth :: ReportableLens' a (Maybe Int)
- date2 :: ReportableLens' a Bool
- real :: ReportableLens' a Bool
- querystring :: ReportableLens' a [Text]
- class HasReportSpec c where
- reportSpec :: Lens' c ReportSpec
- rsDay :: Lens' c Day
- rsQuery :: Lens' c Query
- rsQueryOpts :: Lens' c [QueryOpt]
- rsReportOpts :: Lens' c ReportOpts
- data DisplayName = DisplayName {
- displayFull :: AccountName
- displayName :: AccountName
- displayDepth :: Int
- data CBCSubreportSpec a = CBCSubreportSpec {}
- data CompoundPeriodicReport a b = CompoundPeriodicReport {
- cbrTitle :: Text
- cbrDates :: [DateSpan]
- cbrSubreports :: [(Text, PeriodicReport a b, Bool)]
- cbrTotals :: PeriodicReportRow () b
- data PeriodicReportRow a b = PeriodicReportRow {
- prrName :: a
- prrAmounts :: [b]
- prrTotal :: b
- prrAverage :: b
- data PeriodicReport a b = PeriodicReport {
- prDates :: [DateSpan]
- prRows :: [PeriodicReportRow a b]
- prTotals :: PeriodicReportRow () b
- type Average = MixedAmount
- type Total = MixedAmount
- type Balance = MixedAmount
- type Percentage = Decimal
- type PostingsReportItem = (Maybe Day, Maybe Period, Maybe Text, Posting, MixedAmount)
- type PostingsReport = [PostingsReportItem]
- type MultiBalanceReportRow = PeriodicReportRow DisplayName MixedAmount
- type MultiBalanceReport = PeriodicReport DisplayName MixedAmount
- type EntriesReportItem = Transaction
- type EntriesReport = [EntriesReportItem]
- type BudgetReport = PeriodicReport DisplayName BudgetCell
- type BudgetReportRow = PeriodicReportRow DisplayName BudgetCell
- type BudgetCell = (Maybe Change, Maybe BudgetGoal)
- type BudgetAverage = Average
- type BudgetTotal = Total
- type BudgetGoal = Change
- type BalanceReportItem = (AccountName, AccountName, Int, MixedAmount)
- type BalanceReport = ([BalanceReportItem], MixedAmount)
- type AccountTransactionsReportItem = (Transaction, Transaction, Bool, Text, MixedAmount, MixedAmount)
- type AccountTransactionsReport = [AccountTransactionsReportItem]
- type PrefixedFilePath = FilePath
- type Assertion = IO ()
- type AssertionPredicate = IO Bool
- class Assertable t where
- data HUnitFailure = HUnitFailure (Maybe SrcLoc) String
- class AssertionPredicable t where
- assertionPredicate :: t -> IO Bool
- data TimeLocale = TimeLocale {}
- data CalendarDiffDays = CalendarDiffDays {}
- type MonthOfYear = Int
- data DayOfWeek
- class FormatTime t
- data CalendarDiffTime = CalendarDiffTime {
- ctMonths :: Integer
- ctTime :: NominalDiffTime
- data NominalDiffTime
- data DiffTime
- data LocalTime = LocalTime {}
- data TimeOfDay = TimeOfDay {}
- data TimeZone = TimeZone {
- timeZoneMinutes :: Int
- timeZoneSummerOnly :: Bool
- timeZoneName :: String
- newtype UniversalTime = ModJulianDate {
- getModJulianDate :: Rational
- data ZonedTime = ZonedTime {}
- class ParseTime t
- data CliOpts = CliOpts {
- rawopts_ :: RawOpts
- command_ :: String
- file_ :: [FilePath]
- inputopts_ :: InputOpts
- reportspec_ :: ReportSpec
- output_file_ :: Maybe FilePath
- output_format_ :: Maybe String
- debug_ :: Int
- no_new_accounts_ :: Bool
- width_ :: Maybe String
- available_width_ :: Int
- progstarttime_ :: POSIXTime
- class HasCliOpts c where
- cliOpts :: Lens' c CliOpts
- available_width :: Lens' c Int
- command :: Lens' c String
- debug__ :: Lens' c Int
- file__ :: Lens' c [FilePath]
- inputopts :: Lens' c InputOpts
- no_new_accounts :: Lens' c Bool
- output_file :: Lens' c (Maybe FilePath)
- output_format :: Lens' c (Maybe String)
- progstarttime :: Lens' c POSIXTime
- rawopts__ :: Lens' c RawOpts
- reportspec :: Lens' c ReportSpec
- width__ :: Lens' c (Maybe String)
- type CommandDoc = String
- type Topic = String
- type ProgramName = String
- type PackageVersion = String
- type VersionString = String
- pattern MixedAmountKeyNoPrice :: !CommoditySymbol -> MixedAmountKey
- pattern MixedAmountKeyTotalPrice :: !CommoditySymbol -> !CommoditySymbol -> MixedAmountKey
- pattern MixedAmountKeyUnitPrice :: !CommoditySymbol -> !CommoditySymbol -> !Quantity -> MixedAmountKey
- pattern YearMonthDay :: Year -> MonthOfYear -> DayOfMonth -> Day
- pattern April :: MonthOfYear
- pattern August :: MonthOfYear
- pattern BeforeCommonEra :: Integer -> Year
- pattern CommonEra :: Integer -> Year
- pattern December :: MonthOfYear
- pattern February :: MonthOfYear
- pattern January :: MonthOfYear
- pattern July :: MonthOfYear
- pattern June :: MonthOfYear
- pattern March :: MonthOfYear
- pattern May :: MonthOfYear
- pattern November :: MonthOfYear
- pattern October :: MonthOfYear
- pattern September :: MonthOfYear
- pager :: String -> IO ()
- process :: Mode a -> [String] -> Either String a
- isLeft :: Either a b -> Bool
- fromLeft :: a -> Either a b -> a
- span :: (a -> Bool) -> [a] -> ([a], [a])
- filter :: (a -> Bool) -> [a] -> [a]
- getCurrentDirectory :: IO FilePath
- (++) :: [a] -> [a] -> [a]
- foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
- null :: Foldable t => t a -> Bool
- foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
- foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
- length :: Foldable t => t a -> Int
- elem :: (Foldable t, Eq a) => a -> t a -> Bool
- foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
- foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
- maximum :: (Foldable t, Ord a) => t a -> a
- minimum :: (Foldable t, Ord a) => t a -> a
- product :: (Foldable t, Num a) => t a -> a
- sum :: (Foldable t, Num a) => t a -> a
- map :: (a -> b) -> [a] -> [b]
- join :: Monad m => m (m a) -> m a
- zip :: [a] -> [b] -> [(a, b)]
- concat :: Foldable t => t [a] -> [a]
- readProcessWithExitCode :: FilePath -> [String] -> String -> IO (ExitCode, String, String)
- sort :: Ord a => [a] -> [a]
- delete :: Eq a => a -> [a] -> [a]
- oneLine :: AmountDisplayOpts
- abort :: Partial => String -> a
- testCase :: TestName -> Assertion -> TestTree
- toUpper :: Char -> Char
- singleton :: a -> [a]
- lookup :: Eq a => a -> [(a, b)] -> Maybe b
- insert :: Ord a => a -> [a] -> [a]
- union :: Eq a => [a] -> [a] -> [a]
- mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
- void :: Functor f => f a -> f ()
- when :: Applicative f => Bool -> f () -> f ()
- unless :: Applicative f => Bool -> f () -> f ()
- ($>) :: Functor f => f a -> b -> f b
- catMaybes :: [Maybe a] -> [a]
- fromMaybe :: a -> Maybe a -> a
- toLower :: Char -> Char
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- liftM :: Monad m => (a1 -> r) -> m a1 -> m r
- guard :: Alternative f => Bool -> f ()
- hIsTerminalDevice :: Handle -> IO Bool
- stdout :: Handle
- stdin :: Handle
- forkIO :: IO () -> IO ThreadId
- forkOS :: IO () -> IO ThreadId
- forkOn :: Int -> IO () -> IO ThreadId
- forkIOWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId
- forkOnWithUnmask :: Int -> ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId
- mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
- isSpace :: Char -> Bool
- takeWhile :: (a -> Bool) -> [a] -> [a]
- take :: Int -> [a] -> [a]
- isDigit :: Char -> Bool
- char8 :: TextEncoding
- isAlpha :: Char -> Bool
- unzip :: [(a, b)] -> ([a], [b])
- forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId
- forkOSWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId
- withMVarMasked :: MVar a -> (a -> IO b) -> IO b
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- ap :: Monad m => m (a -> b) -> m a -> m b
- liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
- liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
- liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
- fromRight :: b -> Either a b -> b
- isRight :: Either a b -> Bool
- sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- lines :: String -> [String]
- unlines :: [String] -> String
- unwords :: [String] -> String
- words :: String -> [String]
- mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
- sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
- (<$!>) :: Monad m => (a -> b) -> m a -> m b
- (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
- foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
- forever :: Applicative f => f a -> f b
- mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
- replicateM :: Applicative m => Int -> m a -> m [a]
- replicateM_ :: Applicative m => Int -> m a -> m ()
- zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
- zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
- msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
- forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
- (<&>) :: Functor f => f a -> (a -> b) -> f b
- head :: HasCallStack => [a] -> a
- last :: HasCallStack => [a] -> a
- (!!) :: HasCallStack => [a] -> Int -> a
- break :: (a -> Bool) -> [a] -> ([a], [a])
- cycle :: HasCallStack => [a] -> [a]
- drop :: Int -> [a] -> [a]
- dropWhile :: (a -> Bool) -> [a] -> [a]
- group :: Eq a => [a] -> [[a]]
- groupBy :: (a -> a -> Bool) -> [a] -> [[a]]
- init :: HasCallStack => [a] -> [a]
- inits :: [a] -> [[a]]
- intersperse :: a -> [a] -> [a]
- isPrefixOf :: Eq a => [a] -> [a] -> Bool
- iterate :: (a -> a) -> a -> [a]
- nub :: Eq a => [a] -> [a]
- nubBy :: (a -> a -> Bool) -> [a] -> [a]
- partition :: (a -> Bool) -> [a] -> ([a], [a])
- repeat :: a -> [a]
- reverse :: [a] -> [a]
- scanl :: (b -> a -> b) -> b -> [a] -> [b]
- scanl1 :: (a -> a -> a) -> [a] -> [a]
- scanr :: (a -> b -> b) -> b -> [a] -> [b]
- scanr1 :: (a -> a -> a) -> [a] -> [a]
- sortBy :: (a -> a -> Ordering) -> [a] -> [a]
- splitAt :: Int -> [a] -> ([a], [a])
- tail :: HasCallStack => [a] -> [a]
- tails :: [a] -> [[a]]
- transpose :: [[a]] -> [[a]]
- uncons :: [a] -> Maybe (a, [a])
- unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
- zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- diff :: CliOpts -> Journal -> IO ()
- traceShowId :: Show a => a -> a
- traceWith :: (a -> String) -> a -> a
- hGetContents' :: Handle -> IO String
- getContents' :: IO String
- readFile' :: FilePath -> IO String
- getArgs :: IO [String]
- getEnv :: String -> IO String
- getEnvironment :: IO [(String, String)]
- getProgName :: IO String
- lookupEnv :: String -> IO (Maybe String)
- setEnv :: String -> String -> IO ()
- unsetEnv :: String -> IO ()
- withArgs :: [String] -> IO a -> IO a
- withProgName :: String -> IO a -> IO a
- die :: String -> IO a
- isResourceVanishedError :: IOError -> Bool
- isResourceVanishedErrorType :: IOErrorType -> Bool
- resourceVanishedErrorType :: IOErrorType
- dupChan :: Chan a -> IO (Chan a)
- getChanContents :: Chan a -> IO [a]
- newChan :: IO (Chan a)
- readChan :: Chan a -> IO a
- writeChan :: Chan a -> a -> IO ()
- writeList2Chan :: Chan a -> [a] -> IO ()
- addMVarFinalizer :: MVar a -> IO () -> IO ()
- mkWeakMVar :: MVar a -> IO () -> IO (Weak (MVar a))
- modifyMVar :: MVar a -> (a -> IO (a, b)) -> IO b
- modifyMVarMasked :: MVar a -> (a -> IO (a, b)) -> IO b
- modifyMVarMasked_ :: MVar a -> (a -> IO a) -> IO ()
- modifyMVar_ :: MVar a -> (a -> IO a) -> IO ()
- swapMVar :: MVar a -> a -> IO a
- withMVar :: MVar a -> (a -> IO b) -> IO b
- newQSem :: Int -> IO QSem
- signalQSem :: QSem -> IO ()
- waitQSem :: QSem -> IO ()
- newQSemN :: Int -> IO QSemN
- signalQSemN :: QSemN -> Int -> IO ()
- waitQSemN :: QSemN -> Int -> IO ()
- threadDelay :: Int -> IO ()
- threadWaitRead :: Fd -> IO ()
- threadWaitReadSTM :: Fd -> IO (STM (), IO ())
- threadWaitWrite :: Fd -> IO ()
- threadWaitWriteSTM :: Fd -> IO (STM (), IO ())
- getNumCapabilities :: IO Int
- killThread :: ThreadId -> IO ()
- mkWeakThreadId :: ThreadId -> IO (Weak ThreadId)
- myThreadId :: IO ThreadId
- setNumCapabilities :: Int -> IO ()
- threadCapability :: ThreadId -> IO (Int, Bool)
- throwTo :: Exception e => ThreadId -> e -> IO ()
- yield :: IO ()
- isEmptyMVar :: MVar a -> IO Bool
- newEmptyMVar :: IO (MVar a)
- newMVar :: a -> IO (MVar a)
- putMVar :: MVar a -> a -> IO ()
- readMVar :: MVar a -> IO a
- takeMVar :: MVar a -> IO a
- tryPutMVar :: MVar a -> a -> IO Bool
- tryReadMVar :: MVar a -> IO (Maybe a)
- tryTakeMVar :: MVar a -> IO (Maybe a)
- rtsSupportsBoundThreads :: Bool
- isCurrentThreadBound :: IO Bool
- runInBoundThread :: IO a -> IO a
- runInUnboundThread :: IO a -> IO a
- ioError :: IOError -> IO a
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- lefts :: [Either a b] -> [a]
- partitionEithers :: [Either a b] -> ([a], [b])
- rights :: [Either a b] -> [b]
- all :: Foldable t => (a -> Bool) -> t a -> Bool
- and :: Foldable t => t Bool -> Bool
- any :: Foldable t => (a -> Bool) -> t a -> Bool
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- or :: Foldable t => t Bool -> Bool
- asum :: (Foldable t, Alternative f) => t (f a) -> f a
- find :: Foldable t => (a -> Bool) -> t a -> Maybe a
- maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a
- mapAccumL :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
- mapAccumR :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
- traceIO :: String -> IO ()
- trace :: String -> a -> a
- replicate :: Int -> a -> [a]
- maybe :: b -> (a -> b) -> Maybe a -> b
- userError :: String -> IOError
- unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- appendFile :: FilePath -> String -> IO ()
- getChar :: IO Char
- getContents :: IO String
- getLine :: IO String
- interact :: (String -> String) -> IO ()
- print :: Show a => a -> IO ()
- putChar :: Char -> IO ()
- putStr :: String -> IO ()
- putStrLn :: String -> IO ()
- readFile :: FilePath -> IO String
- readIO :: Read a => String -> IO a
- readLn :: Read a => IO a
- writeFile :: FilePath -> String -> IO ()
- intercalate :: [a] -> [[a]] -> [a]
- insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
- iterate' :: (a -> a) -> a -> [a]
- scanl' :: (b -> a -> b) -> b -> [a] -> [b]
- (\\) :: Eq a => [a] -> [a] -> [a]
- genericLength :: Num i => [a] -> i
- zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
- zipWith5 :: (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f]
- zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]
- zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
- deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
- deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- dropWhileEnd :: (a -> Bool) -> [a] -> [a]
- elemIndex :: Eq a => a -> [a] -> Maybe Int
- elemIndices :: Eq a => a -> [a] -> [Int]
- findIndex :: (a -> Bool) -> [a] -> Maybe Int
- findIndices :: (a -> Bool) -> [a] -> [Int]
- genericDrop :: Integral i => i -> [a] -> [a]
- genericIndex :: Integral i => [a] -> i -> a
- genericReplicate :: Integral i => i -> a -> [a]
- genericSplitAt :: Integral i => i -> [a] -> ([a], [a])
- genericTake :: Integral i => i -> [a] -> [a]
- intersect :: Eq a => [a] -> [a] -> [a]
- intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- isInfixOf :: Eq a => [a] -> [a] -> Bool
- isSuffixOf :: Eq a => [a] -> [a] -> Bool
- permutations :: [a] -> [[a]]
- sortOn :: Ord b => (a -> b) -> [a] -> [a]
- stripPrefix :: Eq a => [a] -> [a] -> Maybe [a]
- subsequences :: [a] -> [[a]]
- unionBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d])
- unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e])
- unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f])
- unzip7 :: [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g])
- zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)]
- zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)]
- zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)]
- zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)]
- isSubsequenceOf :: Eq a => [a] -> [a] -> Bool
- exitFailure :: IO a
- exitSuccess :: IO a
- exitWith :: ExitCode -> IO a
- hFlush :: Handle -> IO ()
- utf8 :: TextEncoding
- latin1 :: TextEncoding
- mkTextEncoding :: String -> IO TextEncoding
- utf16 :: TextEncoding
- utf16be :: TextEncoding
- utf16le :: TextEncoding
- utf32 :: TextEncoding
- utf32be :: TextEncoding
- utf32le :: TextEncoding
- utf8_bom :: TextEncoding
- hClose :: Handle -> IO ()
- hFileSize :: Handle -> IO Integer
- hGetBuffering :: Handle -> IO BufferMode
- hGetEcho :: Handle -> IO Bool
- hGetEncoding :: Handle -> IO (Maybe TextEncoding)
- hGetPosn :: Handle -> IO HandlePosn
- hIsClosed :: Handle -> IO Bool
- hIsEOF :: Handle -> IO Bool
- hIsOpen :: Handle -> IO Bool
- hIsReadable :: Handle -> IO Bool
- hIsSeekable :: Handle -> IO Bool
- hIsWritable :: Handle -> IO Bool
- hLookAhead :: Handle -> IO Char
- hSeek :: Handle -> SeekMode -> Integer -> IO ()
- hSetBinaryMode :: Handle -> Bool -> IO ()
- hSetBuffering :: Handle -> BufferMode -> IO ()
- hSetEcho :: Handle -> Bool -> IO ()
- hSetEncoding :: Handle -> TextEncoding -> IO ()
- hSetFileSize :: Handle -> Integer -> IO ()
- hSetNewlineMode :: Handle -> NewlineMode -> IO ()
- hSetPosn :: HandlePosn -> IO ()
- hShow :: Handle -> IO String
- hTell :: Handle -> IO Integer
- isEOF :: IO Bool
- hGetBuf :: Handle -> Ptr a -> Int -> IO Int
- hGetBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int
- hGetBufSome :: Handle -> Ptr a -> Int -> IO Int
- hGetChar :: Handle -> IO Char
- hGetContents :: Handle -> IO String
- hGetLine :: Handle -> IO String
- hPutBuf :: Handle -> Ptr a -> Int -> IO ()
- hPutBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int
- hPutChar :: Handle -> Char -> IO ()
- hPutStr :: Handle -> String -> IO ()
- hPutStrLn :: Handle -> String -> IO ()
- hWaitForInput :: Handle -> Int -> IO Bool
- nativeNewline :: Newline
- nativeNewlineMode :: NewlineMode
- noNewlineTranslation :: NewlineMode
- universalNewlineMode :: NewlineMode
- openBinaryFile :: FilePath -> IOMode -> IO Handle
- openFile :: FilePath -> IOMode -> IO Handle
- stderr :: Handle
- withBinaryFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
- withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
- fixIO :: (a -> IO a) -> IO a
- hPrint :: Show a => Handle -> a -> IO ()
- hReady :: Handle -> IO Bool
- localeEncoding :: TextEncoding
- openBinaryTempFile :: FilePath -> String -> IO (FilePath, Handle)
- openBinaryTempFileWithDefaultPermissions :: FilePath -> String -> IO (FilePath, Handle)
- openTempFile :: FilePath -> String -> IO (FilePath, Handle)
- openTempFileWithDefaultPermissions :: FilePath -> String -> IO (FilePath, Handle)
- mkIOError :: IOErrorType -> String -> Maybe Handle -> Maybe FilePath -> IOError
- isEOFError :: IOError -> Bool
- isFullError :: IOError -> Bool
- isPermissionError :: IOError -> Bool
- alreadyExistsErrorType :: IOErrorType
- alreadyInUseErrorType :: IOErrorType
- annotateIOError :: IOError -> String -> Maybe Handle -> Maybe FilePath -> IOError
- catchIOError :: IO a -> (IOError -> IO a) -> IO a
- doesNotExistErrorType :: IOErrorType
- eofErrorType :: IOErrorType
- fullErrorType :: IOErrorType
- illegalOperationErrorType :: IOErrorType
- ioeGetErrorString :: IOError -> String
- ioeGetErrorType :: IOError -> IOErrorType
- ioeGetFileName :: IOError -> Maybe FilePath
- ioeGetHandle :: IOError -> Maybe Handle
- ioeGetLocation :: IOError -> String
- ioeSetErrorString :: IOError -> String -> IOError
- ioeSetErrorType :: IOError -> IOErrorType -> IOError
- ioeSetFileName :: IOError -> FilePath -> IOError
- ioeSetHandle :: IOError -> Handle -> IOError
- ioeSetLocation :: IOError -> String -> IOError
- isAlreadyExistsError :: IOError -> Bool
- isAlreadyExistsErrorType :: IOErrorType -> Bool
- isAlreadyInUseError :: IOError -> Bool
- isAlreadyInUseErrorType :: IOErrorType -> Bool
- isDoesNotExistError :: IOError -> Bool
- isDoesNotExistErrorType :: IOErrorType -> Bool
- isEOFErrorType :: IOErrorType -> Bool
- isFullErrorType :: IOErrorType -> Bool
- isIllegalOperation :: IOError -> Bool
- isIllegalOperationErrorType :: IOErrorType -> Bool
- isPermissionErrorType :: IOErrorType -> Bool
- isUserError :: IOError -> Bool
- isUserErrorType :: IOErrorType -> Bool
- modifyIOError :: (IOError -> IOError) -> IO a -> IO a
- permissionErrorType :: IOErrorType
- tryIOError :: IO a -> IO (Either IOError a)
- userErrorType :: IOErrorType
- close :: CliOpts -> Journal -> IO ()
- (<**>) :: Applicative f => f a -> f (a -> b) -> f b
- liftA :: Applicative f => (a -> b) -> f a -> f b
- liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- optional :: Alternative f => f a -> f (Maybe a)
- ord :: Char -> Int
- chr :: Int -> Char
- lexLitChar :: ReadS String
- readLitChar :: ReadS Char
- intToDigit :: Int -> Char
- showLitChar :: Char -> ShowS
- generalCategory :: Char -> GeneralCategory
- isAlphaNum :: Char -> Bool
- isAscii :: Char -> Bool
- isAsciiLower :: Char -> Bool
- isAsciiUpper :: Char -> Bool
- isControl :: Char -> Bool
- isHexDigit :: Char -> Bool
- isLatin1 :: Char -> Bool
- isLower :: Char -> Bool
- isLowerCase :: Char -> Bool
- isOctDigit :: Char -> Bool
- isPrint :: Char -> Bool
- isPunctuation :: Char -> Bool
- isSymbol :: Char -> Bool
- isUpper :: Char -> Bool
- isUpperCase :: Char -> Bool
- toTitle :: Char -> Char
- digitToInt :: Char -> Int
- isLetter :: Char -> Bool
- isMark :: Char -> Bool
- isNumber :: Char -> Bool
- isSeparator :: Char -> Bool
- formatRealFloat :: RealFloat a => a -> FieldFormatter
- formatInt :: (Integral a, Bounded a) => a -> FieldFormatter
- errorBadArgument :: a
- errorBadFormat :: Char -> a
- errorMissingArgument :: a
- errorShortFormat :: a
- formatChar :: Char -> FieldFormatter
- formatInteger :: Integer -> FieldFormatter
- formatString :: Bool -> Maybe Int -> Maybe Int -> String -> String
- hPrintf :: HPrintfType r => Handle -> String -> r
- perror :: String -> a
- printf :: PrintfType r => String -> r
- vFmt :: Char -> FieldFormat -> FieldFormat
- wrap :: Text -> Text -> Text -> Text
- expandArgsAt :: [String] -> IO [String]
- joinArgs :: [String] -> String
- splitArgs :: String -> [String]
- parseBool :: String -> Maybe Bool
- fromGroup :: Group a -> [a]
- toGroup :: [a] -> Group a
- modeModes :: Mode a -> [Mode a]
- modeFlags :: Mode a -> [Flag a]
- fromFlagOpt :: FlagInfo -> String
- checkMode :: Mode a -> Maybe String
- remap2 :: Remap m => (a -> b) -> (b -> a) -> m a -> m b
- remapUpdate :: (a -> b) -> (b -> (a, a -> b)) -> Update a -> Update b
- modeEmpty :: a -> Mode a
- mode :: Name -> a -> Help -> Arg a -> [Flag a] -> Mode a
- modes :: String -> a -> Help -> [Mode a] -> Mode a
- flagNone :: [Name] -> (a -> a) -> Help -> Flag a
- flagOpt :: String -> [Name] -> Update a -> FlagHelp -> Help -> Flag a
- flagReq :: [Name] -> Update a -> FlagHelp -> Help -> Flag a
- flagArg :: Update a -> FlagHelp -> Arg a
- flagBool :: [Name] -> (Bool -> a -> a) -> Help -> Flag a
- complete :: Mode a -> [String] -> (Int, Int) -> [Complete]
- helpText :: [String] -> HelpFormat -> Mode a -> [Text]
- processArgs :: Mode a -> IO a
- processValue :: Mode a -> [String] -> a
- processValueIO :: Mode a -> [String] -> IO a
- flagHelpSimple :: (a -> a) -> Flag a
- flagHelpFormat :: (HelpFormat -> TextFormat -> a -> a) -> Flag a
- flagVersion :: (a -> a) -> Flag a
- flagNumericVersion :: (a -> a) -> Flag a
- flagsVerbosity :: (Verbosity -> a -> a) -> [Flag a]
- add :: CliOpts -> Journal -> IO ()
- headDef :: a -> [a] -> a
- lastDef :: a -> [a] -> a
- proc :: FilePath -> [String] -> CreateProcess
- createPipe :: IO (Handle, Handle)
- createPipeFd :: IO (FD, FD)
- createProcess_ :: String -> CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
- interruptProcessGroupOf :: ProcessHandle -> IO ()
- terminateProcess :: ProcessHandle -> IO ()
- getProcessExitCode :: ProcessHandle -> IO (Maybe ExitCode)
- callCommand :: String -> IO ()
- callProcess :: FilePath -> [String] -> IO ()
- cleanupProcess :: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> IO ()
- createProcess :: CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
- getCurrentPid :: IO Pid
- getPid :: ProcessHandle -> IO (Maybe Pid)
- rawSystem :: String -> [String] -> IO ExitCode
- readCreateProcess :: CreateProcess -> String -> IO String
- readCreateProcessWithExitCode :: CreateProcess -> String -> IO (ExitCode, String, String)
- readProcess :: FilePath -> [String] -> String -> IO String
- runCommand :: String -> IO ProcessHandle
- runInteractiveCommand :: String -> IO (Handle, Handle, Handle, ProcessHandle)
- runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> IO (Handle, Handle, Handle, ProcessHandle)
- runProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> Maybe Handle -> Maybe Handle -> Maybe Handle -> IO ProcessHandle
- shell :: String -> CreateProcess
- showCommandForUser :: FilePath -> [String] -> String
- spawnCommand :: String -> IO ProcessHandle
- spawnProcess :: FilePath -> [String] -> IO ProcessHandle
- system :: String -> IO ExitCode
- waitForProcess :: ProcessHandle -> IO ExitCode
- withCreateProcess :: CreateProcess -> (Maybe Handle -> Maybe Handle -> Maybe Handle -> ProcessHandle -> IO a) -> IO a
- chomp :: String -> String
- charWidth :: Char -> Int
- curry3 :: ((a, b, c) -> d) -> a -> b -> c -> d
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
- first3 :: (a, b, c) -> a
- second3 :: (a, b, c) -> b
- third3 :: (a, b, c) -> c
- takeEnd :: Int -> [a] -> [a]
- spanEnd :: DateSpan -> Maybe Day
- withCurrentDirectory :: FilePath -> IO a -> IO a
- getDirectoryContents :: FilePath -> IO [FilePath]
- createDirectory :: FilePath -> IO ()
- doesDirectoryExist :: FilePath -> IO Bool
- doesFileExist :: FilePath -> IO Bool
- canonicalizePath :: FilePath -> IO FilePath
- copyFile :: FilePath -> FilePath -> IO ()
- copyFileWithMetadata :: FilePath -> FilePath -> IO ()
- copyPermissions :: FilePath -> FilePath -> IO ()
- createDirectoryIfMissing :: Bool -> FilePath -> IO ()
- createDirectoryLink :: FilePath -> FilePath -> IO ()
- createFileLink :: FilePath -> FilePath -> IO ()
- doesPathExist :: FilePath -> IO Bool
- exeExtension :: String
- findExecutable :: String -> IO (Maybe FilePath)
- findExecutables :: String -> IO [FilePath]
- findExecutablesInDirectories :: [FilePath] -> String -> IO [FilePath]
- findFileWith :: (FilePath -> IO Bool) -> [FilePath] -> String -> IO (Maybe FilePath)
- findFilesWith :: (FilePath -> IO Bool) -> [FilePath] -> String -> IO [FilePath]
- getAccessTime :: FilePath -> IO UTCTime
- getAppUserDataDirectory :: FilePath -> IO FilePath
- getFileSize :: FilePath -> IO Integer
- getHomeDirectory :: IO FilePath
- getModificationTime :: FilePath -> IO UTCTime
- getPermissions :: FilePath -> IO Permissions
- getSymbolicLinkTarget :: FilePath -> IO FilePath
- getTemporaryDirectory :: IO FilePath
- getUserDocumentsDirectory :: IO FilePath
- getXdgDirectory :: XdgDirectory -> FilePath -> IO FilePath
- getXdgDirectoryList :: XdgDirectoryList -> IO [FilePath]
- listDirectory :: FilePath -> IO [FilePath]
- makeAbsolute :: FilePath -> IO FilePath
- makeRelativeToCurrentDirectory :: FilePath -> IO FilePath
- pathIsSymbolicLink :: FilePath -> IO Bool
- removeDirectory :: FilePath -> IO ()
- removeDirectoryLink :: FilePath -> IO ()
- removeDirectoryRecursive :: FilePath -> IO ()
- removeFile :: FilePath -> IO ()
- removePathForcibly :: FilePath -> IO ()
- renameDirectory :: FilePath -> FilePath -> IO ()
- renameFile :: FilePath -> FilePath -> IO ()
- renamePath :: FilePath -> FilePath -> IO ()
- setAccessTime :: FilePath -> UTCTime -> IO ()
- setCurrentDirectory :: FilePath -> IO ()
- setModificationTime :: FilePath -> UTCTime -> IO ()
- setPermissions :: FilePath -> Permissions -> IO ()
- isSymbolicLink :: FilePath -> IO Bool
- emptyPermissions :: Permissions
- findFile :: [FilePath] -> String -> IO (Maybe FilePath)
- findFiles :: [FilePath] -> String -> IO [FilePath]
- setOwnerExecutable :: Bool -> Permissions -> Permissions
- setOwnerReadable :: Bool -> Permissions -> Permissions
- setOwnerSearchable :: Bool -> Permissions -> Permissions
- setOwnerWritable :: Bool -> Permissions -> Permissions
- executablePath :: Maybe (IO (Maybe FilePath))
- getExecutablePath :: IO FilePath
- mkPos :: Int -> Pos
- unPos :: Pos -> Int
- initialPos :: FilePath -> SourcePos
- sourcePosPretty :: SourcePos -> String
- mkTimeout :: Integer -> Timeout
- testGroup :: TestName -> [TestTree] -> TestTree
- sequentialTestGroup :: TestName -> DependencyType -> [TestTree] -> TestTree
- after_ :: DependencyType -> Expr -> TestTree -> TestTree
- after :: DependencyType -> String -> TestTree -> TestTree
- includingOptions :: [OptionDescription] -> Ingredient
- defaultMainWithIngredients :: [Ingredient] -> TestTree -> IO ()
- defaultIngredients :: [Ingredient]
- adjustOption :: IsOption v => (v -> v) -> TestTree -> TestTree
- localOption :: IsOption v => v -> TestTree -> TestTree
- askOption :: IsOption v => (v -> TestTree) -> TestTree
- withResource :: IO a -> (a -> IO ()) -> (IO a -> TestTree) -> TestTree
- toRegex :: Text -> Either RegexError Regexp
- toRegexCI :: Text -> Either RegexError Regexp
- toRegex' :: Text -> Regexp
- toRegexCI' :: Text -> Regexp
- regexMatch :: Regexp -> String -> Bool
- regexMatchText :: Regexp -> Text -> Bool
- regexReplace :: Regexp -> Replacement -> String -> Either RegexError String
- regexReplaceUnmemo :: Regexp -> Replacement -> String -> Either RegexError String
- regexReplaceAllBy :: Regexp -> (String -> String) -> String -> String
- fromEFDay :: EFDay -> Day
- modifyEFDay :: (Day -> Day) -> EFDay -> EFDay
- isBalanceSheetAccountType :: AccountType -> Bool
- isIncomeStatementAccountType :: AccountType -> Bool
- isAccountSubtypeOf :: AccountType -> AccountType -> Bool
- isDecimalMark :: Char -> Bool
- maCompare :: MixedAmount -> MixedAmount -> Ordering
- nulltransactionmodifier :: TransactionModifier
- nullperiodictransaction :: PeriodicTransaction
- nullpayeedeclarationinfo :: PayeeDeclarationInfo
- nulltagdeclarationinfo :: TagDeclarationInfo
- nullaccountdeclarationinfo :: AccountDeclarationInfo
- runExceptT :: ExceptT e m a -> m (Either e a)
- periodAsDateSpan :: Period -> DateSpan
- dateSpanAsPeriod :: DateSpan -> Period
- simplifyPeriod :: Period -> Period
- isLastDayOfMonth :: (Eq a1, Eq a2, Num a1, Num a2) => Year -> a1 -> a2 -> Bool
- isStandardPeriod :: Period -> Bool
- periodTextWidth :: Period -> Int
- showPeriod :: Period -> Text
- showPeriodMonthAbbrev :: Period -> Text
- periodStart :: Period -> Maybe Day
- periodEnd :: Period -> Maybe Day
- periodNext :: Period -> Period
- periodPrevious :: Period -> Period
- periodNextIn :: DateSpan -> Period -> Period
- periodPreviousIn :: DateSpan -> Period -> Period
- periodMoveTo :: Day -> Period -> Period
- periodGrow :: Period -> Period
- periodShrink :: Day -> Period -> Period
- mondayBefore :: Day -> Day
- yearMonthContainingWeekStarting :: Day -> (Year, MonthOfYear)
- quarterContainingMonth :: Integral a => a -> a
- firstMonthOfQuarter :: Num a => a -> a
- startOfFirstWeekInMonth :: Integer -> Int -> Day
- customErrorBundlePretty :: HledgerParseErrors -> String
- wbToText :: WideBuilder -> Text
- wbFromText :: Text -> WideBuilder
- wbUnpack :: WideBuilder -> String
- textElideRight :: Int -> Text -> Text
- textChomp :: Text -> Text
- formatText :: Bool -> Maybe Int -> Maybe Int -> Text -> Text
- quoteIfSpaced :: Text -> Text
- textQuoteIfNeeded :: Text -> Text
- escapeDoubleQuotes :: Text -> Text
- stripquotes :: Text -> Text
- textUnbracket :: Text -> Text
- textConcatTopPadded :: [Text] -> Text
- textConcatBottomPadded :: [Text] -> Text
- fitText :: Maybe Int -> Maybe Int -> Bool -> Bool -> Text -> Text
- textTakeWidth :: Int -> Text -> Text
- linesPrepend :: Text -> Text -> Text
- linesPrepend2 :: Text -> Text -> Text -> Text
- unlinesB :: [Builder] -> Builder
- readDecimal :: Text -> Integer
- tests_Text :: TestTree
- pshow :: Show a => a -> String
- pshow' :: Show a => a -> String
- pprint :: Show a => a -> IO ()
- pprint' :: Show a => a -> IO ()
- getTerminalHeightWidth :: IO (Maybe (Int, Int))
- getTerminalHeight :: IO (Maybe Int)
- getTerminalWidth :: IO (Maybe Int)
- setupPager :: IO ()
- progArgs :: [String]
- outputFileOption :: Maybe String
- hasOutputFile :: Bool
- bold' :: String -> String
- faint' :: String -> String
- black' :: String -> String
- red' :: String -> String
- green' :: String -> String
- yellow' :: String -> String
- blue' :: String -> String
- magenta' :: String -> String
- cyan' :: String -> String
- white' :: String -> String
- brightBlack' :: String -> String
- brightRed' :: String -> String
- brightGreen' :: String -> String
- brightYellow' :: String -> String
- brightBlue' :: String -> String
- brightMagenta' :: String -> String
- brightCyan' :: String -> String
- brightWhite' :: String -> String
- rgb' :: Word8 -> Word8 -> Word8 -> String -> String
- colorOption :: String
- useColorOnStdout :: Bool
- useColorOnStderr :: Bool
- color :: ColorIntensity -> Color -> String -> String
- bgColor :: ColorIntensity -> Color -> String -> String
- colorB :: ColorIntensity -> Color -> WideBuilder -> WideBuilder
- bgColorB :: ColorIntensity -> Color -> WideBuilder -> WideBuilder
- terminalIsLight :: Maybe Bool
- terminalLightness :: Maybe Float
- terminalBgColor :: Maybe (RGB Float)
- terminalFgColor :: Maybe (RGB Float)
- error' :: String -> a
- usageError :: String -> a
- expandHomePath :: FilePath -> IO FilePath
- expandPath :: FilePath -> FilePath -> IO FilePath
- expandGlob :: FilePath -> FilePath -> IO [FilePath]
- sortByModTime :: [FilePath] -> IO [FilePath]
- readFilePortably :: FilePath -> IO Text
- readFileOrStdinPortably :: String -> IO Text
- readHandlePortably :: Handle -> IO Text
- embedFileRelative :: FilePath -> Q Exp
- getCurrentLocalTime :: IO LocalTime
- getCurrentZonedTime :: IO ZonedTime
- assertLeft :: (HasCallStack, Eq b, Show b) => Either a b -> Assertion
- assertRight :: (HasCallStack, Eq a, Show a) => Either a b -> Assertion
- assertParse :: (HasCallStack, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> Assertion
- assertParseEq :: (HasCallStack, Eq a, Show a, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> a -> Assertion
- assertParseEqOn :: (HasCallStack, Eq b, Show b, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> (a -> b) -> b -> Assertion
- assertParseError :: (HasCallStack, Eq a, Show a, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> String -> Assertion
- assertParseStateOn :: (HasCallStack, Eq b, Show b, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> (st -> b) -> b -> Assertion
- assertParseE :: (HasCallStack, Eq a, Show a, Default st) => StateT st (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError IO)) a -> Text -> Assertion
- assertParseEqE :: (Default st, Eq a, Show a, HasCallStack) => StateT st (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError IO)) a -> Text -> a -> Assertion
- assertParseErrorE :: (Default st, Eq a, Show a, HasCallStack) => StateT st (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError IO)) a -> Text -> String -> Assertion
- debugLevel :: Int
- ptrace :: Show a => a -> a
- traceAt :: Int -> String -> a -> a
- traceAtWith :: Int -> (a -> String) -> a -> a
- ptraceAt :: Show a => Int -> String -> a -> a
- ptraceAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m ()
- traceLog :: String -> a -> a
- traceLogAt :: Int -> String -> a -> a
- traceLogIO :: MonadIO m => String -> m ()
- traceLogAtIO :: MonadIO m => Int -> String -> m ()
- traceLogWith :: (a -> String) -> a -> a
- traceLogAtWith :: Int -> (a -> String) -> a -> a
- ptraceLogAt :: Show a => Int -> String -> a -> a
- ptraceLogAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m ()
- traceOrLog :: String -> a -> a
- traceOrLogAt :: Int -> String -> a -> a
- ptraceOrLogAt :: Show a => Int -> String -> a -> a
- ptraceOrLogAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m ()
- traceOrLogAtWith :: Int -> (a -> String) -> a -> a
- dbg0 :: Show a => String -> a -> a
- dbg1 :: Show a => String -> a -> a
- dbg2 :: Show a => String -> a -> a
- dbg3 :: Show a => String -> a -> a
- dbg4 :: Show a => String -> a -> a
- dbg5 :: Show a => String -> a -> a
- dbg6 :: Show a => String -> a -> a
- dbg7 :: Show a => String -> a -> a
- dbg8 :: Show a => String -> a -> a
- dbg9 :: Show a => String -> a -> a
- dbgExit :: Show a => String -> a -> a
- dbg0IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg1IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg2IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg3IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg4IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg5IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg6IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg7IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg8IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg9IO :: (MonadIO m, Show a) => String -> a -> m ()
- dbg0With :: (a -> String) -> a -> a
- dbg1With :: Show a => (a -> String) -> a -> a
- dbg2With :: Show a => (a -> String) -> a -> a
- dbg3With :: Show a => (a -> String) -> a -> a
- dbg4With :: Show a => (a -> String) -> a -> a
- dbg5With :: Show a => (a -> String) -> a -> a
- dbg6With :: Show a => (a -> String) -> a -> a
- dbg7With :: Show a => (a -> String) -> a -> a
- dbg8With :: Show a => (a -> String) -> a -> a
- dbg9With :: Show a => (a -> String) -> a -> a
- traceOrLogParse :: forall (m :: Type -> Type). String -> TextParser m ()
- dbgparse :: forall (m :: Type -> Type). Int -> String -> TextParser m ()
- sourcePosPairPretty :: (SourcePos, SourcePos) -> String
- choice' :: forall (m :: Type -> Type) a. [TextParser m a] -> TextParser m a
- choiceInState :: forall s (m :: Type -> Type) a. [StateT s (ParsecT HledgerParseErrorData Text m) a] -> StateT s (ParsecT HledgerParseErrorData Text m) a
- surroundedBy :: Applicative m => m openclose -> m a -> m a
- parsewith :: Parsec e Text a -> Text -> Either (ParseErrorBundle Text e) a
- runTextParser :: TextParser Identity a -> Text -> Either HledgerParseErrors a
- rtp :: TextParser Identity a -> Text -> Either HledgerParseErrors a
- parsewithString :: Parsec e String a -> String -> Either (ParseErrorBundle String e) a
- parseWithState :: Monad m => st -> StateT st (ParsecT HledgerParseErrorData Text m) a -> Text -> m (Either HledgerParseErrors a)
- parseWithState' :: Stream s => st -> StateT st (ParsecT e s Identity) a -> s -> Either (ParseErrorBundle s e) a
- fromparse :: (Show t, Show (Token t), Show e) => Either (ParseErrorBundle t e) a -> a
- parseerror :: (Show t, Show (Token t), Show e) => ParseErrorBundle t e -> a
- showDateParseError :: (Show t, Show (Token t), Show e) => ParseErrorBundle t e -> String
- isNewline :: Char -> Bool
- nonspace :: forall (m :: Type -> Type). TextParser m Char
- isNonNewlineSpace :: Char -> Bool
- spacenonewline :: forall s (m :: Type -> Type). (Stream s, Char ~ Token s) => ParsecT HledgerParseErrorData s m Char
- restofline :: forall (m :: Type -> Type). TextParser m String
- skipNonNewlineSpaces :: forall s (m :: Type -> Type). (Stream s, Token s ~ Char) => ParsecT HledgerParseErrorData s m ()
- skipNonNewlineSpaces1 :: forall s (m :: Type -> Type). (Stream s, Token s ~ Char) => ParsecT HledgerParseErrorData s m ()
- skipNonNewlineSpaces' :: forall s (m :: Type -> Type). (Stream s, Token s ~ Char) => ParsecT HledgerParseErrorData s m Bool
- eolof :: forall (m :: Type -> Type). TextParser m ()
- lowercase :: String -> String
- uppercase :: String -> String
- strip :: String -> String
- lstrip :: String -> String
- rstrip :: String -> String
- strip1Char :: Char -> Char -> String -> String
- stripBy :: (Char -> Bool) -> String -> String
- strip1By :: (Char -> Bool) -> String -> String
- chomp1 :: String -> String
- singleline :: String -> String
- stripbrackets :: String -> String
- elideLeft :: Int -> String -> String
- elideRight :: Int -> String -> String
- underline :: String -> String
- quoteIfNeeded :: String -> String
- singleQuoteIfNeeded :: String -> String
- quoteForCommandLine :: String -> String
- words' :: String -> [String]
- unwords' :: [String] -> String
- takeWidth :: Int -> String -> String
- strWidthAnsi :: String -> Int
- strWidth :: String -> Int
- stripAnsi :: String -> String
- applyN :: Int -> (a -> a) -> a -> a
- mapM' :: Monad f => (a -> f b) -> [a] -> f [b]
- sequence' :: Monad f => [f a] -> f [a]
- curry2 :: ((a, b) -> c) -> a -> b -> c
- uncurry2 :: (a -> b -> c) -> (a, b) -> c
- curry4 :: ((a, b, c, d) -> e) -> a -> b -> c -> d -> e
- uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> e
- maximum' :: Integral a => [a] -> a
- maximumStrict :: Ord a => [a] -> a
- minimumStrict :: Ord a => [a] -> a
- splitAtElement :: Eq a => a -> [a] -> [[a]]
- sumStrict :: Num a => [a] -> a
- treeLeaves :: Tree a -> [a]
- first4 :: (a, b, c, d) -> a
- second4 :: (a, b, c, d) -> b
- third4 :: (a, b, c, d) -> c
- fourth4 :: (a, b, c, d) -> d
- first5 :: (a, b, c, d, e) -> a
- second5 :: (a, b, c, d, e) -> b
- third5 :: (a, b, c, d, e) -> c
- fourth5 :: (a, b, c, d, e) -> d
- fifth5 :: (a, b, c, d, e) -> e
- first6 :: (a, b, c, d, e, f) -> a
- second6 :: (a, b, c, d, e, f) -> b
- third6 :: (a, b, c, d, e, f) -> c
- fourth6 :: (a, b, c, d, e, f) -> d
- fifth6 :: (a, b, c, d, e, f) -> e
- sixth6 :: (a, b, c, d, e, f) -> f
- multicol :: Int -> [String] -> String
- numDigitsInt :: Integral a => Int -> a
- makeHledgerClassyLenses :: Name -> DecsQ
- tests_Utils :: TestTree
- overRawOpts :: ([(String, String)] -> [(String, String)]) -> RawOpts -> RawOpts
- setopt :: String -> String -> RawOpts -> RawOpts
- setboolopt :: String -> RawOpts -> RawOpts
- unsetboolopt :: String -> RawOpts -> RawOpts
- appendopts :: [(String, String)] -> RawOpts -> RawOpts
- boolopt :: String -> RawOpts -> Bool
- toggleopt :: String -> RawOpts -> Bool
- choiceopt :: (String -> Maybe a) -> RawOpts -> Maybe a
- collectopts :: ((String, String) -> Maybe a) -> RawOpts -> [a]
- maybestringopt :: String -> RawOpts -> Maybe String
- stringopt :: String -> RawOpts -> String
- maybecharopt :: String -> RawOpts -> Maybe Char
- listofstringopt :: String -> RawOpts -> [String]
- maybeintopt :: String -> RawOpts -> Maybe Int
- maybeposintopt :: String -> RawOpts -> Maybe Int
- intopt :: String -> RawOpts -> Int
- posintopt :: String -> RawOpts -> Int
- showDate :: Day -> Text
- showEFDate :: EFDay -> Text
- showDateSpan :: DateSpan -> Text
- showDateSpanDebug :: DateSpan -> String
- showDateSpanMonthAbbrev :: DateSpan -> Text
- getCurrentDay :: IO Day
- getCurrentMonth :: IO Int
- getCurrentYear :: IO Integer
- elapsedSeconds :: Fractional a => UTCTime -> UTCTime -> a
- spanStart :: DateSpan -> Maybe Day
- spanStartYear :: DateSpan -> Maybe Year
- spanEndYear :: DateSpan -> Maybe Year
- spanYears :: DateSpan -> [Year]
- spansSpan :: [DateSpan] -> DateSpan
- splitSpan :: Bool -> Interval -> DateSpan -> [DateSpan]
- spansFromBoundaries :: Day -> [Day] -> [DateSpan]
- daysInSpan :: DateSpan -> Maybe Integer
- spanContainsDate :: DateSpan -> Day -> Bool
- periodContainsDate :: Period -> Day -> Bool
- groupByDateSpan :: Bool -> (a -> Day) -> [DateSpan] -> [a] -> [(DateSpan, [a])]
- spansIntersect :: [DateSpan] -> DateSpan
- spanIntersect :: DateSpan -> DateSpan -> DateSpan
- spanDefaultsFrom :: DateSpan -> DateSpan -> DateSpan
- spansUnion :: [DateSpan] -> DateSpan
- spanUnion :: DateSpan -> DateSpan -> DateSpan
- daysSpan :: [Day] -> DateSpan
- latestSpanContaining :: [DateSpan] -> Day -> Maybe DateSpan
- parsePeriodExpr :: Day -> Text -> Either HledgerParseErrors (Interval, DateSpan)
- parsePeriodExpr' :: Day -> Text -> (Interval, DateSpan)
- fixSmartDateStr :: Day -> Text -> Text
- fixSmartDateStrEither :: Day -> Text -> Either HledgerParseErrors Text
- fixSmartDateStrEither' :: Day -> Text -> Either HledgerParseErrors EFDay
- fixSmartDate :: Day -> SmartDate -> EFDay
- prevday :: Day -> Day
- intervalBoundaryBefore :: Interval -> Day -> Day
- parsedateM :: String -> Maybe Day
- smartdate :: forall (m :: Type -> Type). TextParser m SmartDate
- datesepchars :: String
- datesepchar :: forall (m :: Type -> Type). TextParser m Char
- isDateSepChar :: Char -> Bool
- yearp :: forall (m :: Type -> Type). TextParser m Integer
- periodexprp :: forall (m :: Type -> Type). Day -> TextParser m (Interval, DateSpan)
- nulldatespan :: DateSpan
- emptydatespan :: DateSpan
- nulldate :: Day
- tests_Dates :: TestTree
- acctsepchar :: Char
- acctsep :: Text
- accountNameComponents :: AccountName -> [Text]
- accountNameFromComponents :: [Text] -> AccountName
- accountLeafName :: AccountName -> Text
- accountSummarisedName :: AccountName -> Text
- assetAccountRegex :: Regexp
- cashAccountRegex :: Regexp
- liabilityAccountRegex :: Regexp
- equityAccountRegex :: Regexp
- conversionAccountRegex :: Regexp
- revenueAccountRegex :: Regexp
- expenseAccountRegex :: Regexp
- accountNameInferType :: AccountName -> Maybe AccountType
- accountNameType :: Map AccountName AccountType -> AccountName -> Maybe AccountType
- accountNameLevel :: AccountName -> Int
- unbudgetedAccountName :: Text
- accountNamePostingType :: AccountName -> PostingType
- accountNameWithoutPostingType :: AccountName -> AccountName
- accountNameWithPostingType :: PostingType -> AccountName -> AccountName
- joinAccountNames :: AccountName -> AccountName -> AccountName
- concatAccountNames :: [AccountName] -> AccountName
- accountNameApplyAliases :: [AccountAlias] -> AccountName -> Either RegexError AccountName
- accountNameApplyAliasesMemo :: [AccountAlias] -> AccountName -> Either RegexError AccountName
- accountNameDrop :: Int -> AccountName -> AccountName
- expandAccountNames :: [AccountName] -> [AccountName]
- expandAccountName :: AccountName -> [AccountName]
- topAccountNames :: [AccountName] -> [AccountName]
- parentAccountName :: AccountName -> AccountName
- parentAccountNames :: AccountName -> [AccountName]
- isAccountNamePrefixOf :: AccountName -> AccountName -> Bool
- isSubAccountNameOf :: AccountName -> AccountName -> Bool
- subAccountNamesFrom :: [AccountName] -> AccountName -> [AccountName]
- accountNameTreeFrom :: [AccountName] -> Tree AccountName
- elideAccountName :: Int -> AccountName -> AccountName
- clipAccountName :: Maybe Int -> AccountName -> AccountName
- clipOrEllipsifyAccountName :: Maybe Int -> AccountName -> AccountName
- escapeName :: AccountName -> Text
- accountNameToAccountRegex :: AccountName -> Regexp
- accountNameToAccountRegexCI :: AccountName -> Regexp
- accountNameToAccountOnlyRegex :: AccountName -> Regexp
- accountNameToAccountOnlyRegexCI :: AccountName -> Regexp
- tests_AccountName :: TestTree
- defaultBalanceLineFormat :: StringFormat
- parseStringFormat :: Text -> Either String StringFormat
- defaultStringFormatStyle :: [StringFormatComponent] -> StringFormat
- tests_StringFormat :: TestTree
- showCommoditySymbol :: Text -> Text
- isNonsimpleCommodityChar :: Char -> Bool
- quoteCommoditySymbolIfNeeded :: Text -> Text
- noColour :: AmountDisplayOpts
- noPrice :: AmountDisplayOpts
- csvDisplay :: AmountDisplayOpts
- amountstyle :: AmountStyle
- nullamt :: Amount
- missingamt :: Amount
- num :: Quantity -> Amount
- hrs :: Quantity -> Amount
- usd :: DecimalRaw Integer -> Amount
- eur :: DecimalRaw Integer -> Amount
- gbp :: DecimalRaw Integer -> Amount
- per :: Quantity -> Amount
- at :: Amount -> Amount -> Amount
- (@@) :: Amount -> Amount -> Amount
- amountWithCommodity :: CommoditySymbol -> Amount -> Amount
- amountCost :: Amount -> Amount
- divideAmount :: Quantity -> Amount -> Amount
- multiplyAmount :: Quantity -> Amount -> Amount
- isNegativeAmount :: Amount -> Bool
- amountLooksZero :: Amount -> Bool
- amountIsZero :: Amount -> Bool
- withPrecision :: Amount -> AmountPrecision -> Amount
- amountSetPrecision :: AmountPrecision -> Amount -> Amount
- amountSetFullPrecision :: Amount -> Amount
- setAmountInternalPrecision :: Word8 -> Amount -> Amount
- withInternalPrecision :: Amount -> Word8 -> Amount
- setAmountDecimalPoint :: Maybe Char -> Amount -> Amount
- withDecimalPoint :: Amount -> Maybe Char -> Amount
- amountStripPrices :: Amount -> Amount
- showAmountPrice :: Amount -> WideBuilder
- canonicaliseAmount :: Map CommoditySymbol AmountStyle -> Amount -> Amount
- styleAmount :: Map CommoditySymbol AmountStyle -> Amount -> Amount
- amountSetStyles :: Map CommoditySymbol AmountStyle -> Amount -> Amount
- amountSetStylesExceptPrecision :: Map CommoditySymbol AmountStyle -> Amount -> Amount
- amountStyleUnsetPrecision :: AmountStyle -> AmountStyle
- amountSetMainStyle :: Map CommoditySymbol AmountStyle -> Amount -> Amount
- amountSetCostStyle :: Map CommoditySymbol AmountStyle -> Amount -> Amount
- amountUnstyled :: Amount -> Amount
- showAmount :: Amount -> String
- showAmountB :: AmountDisplayOpts -> Amount -> WideBuilder
- cshowAmount :: Amount -> String
- showAmountWithoutPrice :: Amount -> String
- showAmountWithZeroCommodity :: Amount -> String
- showAmountDebug :: Amount -> String
- nullmixedamt :: MixedAmount
- missingmixedamt :: MixedAmount
- isMissingMixedAmount :: MixedAmount -> Bool
- mixed :: Foldable t => t Amount -> MixedAmount
- mixedAmount :: Amount -> MixedAmount
- maAddAmount :: MixedAmount -> Amount -> MixedAmount
- maAddAmounts :: Foldable t => MixedAmount -> t Amount -> MixedAmount
- maNegate :: MixedAmount -> MixedAmount
- maPlus :: MixedAmount -> MixedAmount -> MixedAmount
- maMinus :: MixedAmount -> MixedAmount -> MixedAmount
- maSum :: Foldable t => t MixedAmount -> MixedAmount
- divideMixedAmount :: Quantity -> MixedAmount -> MixedAmount
- multiplyMixedAmount :: Quantity -> MixedAmount -> MixedAmount
- averageMixedAmounts :: [MixedAmount] -> MixedAmount
- isNegativeMixedAmount :: MixedAmount -> Maybe Bool
- mixedAmountLooksZero :: MixedAmount -> Bool
- mixedAmountIsZero :: MixedAmount -> Bool
- maIsZero :: MixedAmount -> Bool
- maIsNonZero :: MixedAmount -> Bool
- amounts :: MixedAmount -> [Amount]
- amountsPreservingZeros :: MixedAmount -> [Amount]
- amountsRaw :: MixedAmount -> [Amount]
- maCommodities :: MixedAmount -> Set CommoditySymbol
- unifyMixedAmount :: MixedAmount -> Maybe Amount
- filterMixedAmount :: (Amount -> Bool) -> MixedAmount -> MixedAmount
- filterMixedAmountByCommodity :: CommoditySymbol -> MixedAmount -> MixedAmount
- mapMixedAmount :: (Amount -> Amount) -> MixedAmount -> MixedAmount
- mixedAmountCost :: MixedAmount -> MixedAmount
- canonicaliseMixedAmount :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount
- styleMixedAmount :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount
- mixedAmountSetStyles :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount
- mixedAmountSetStylesExceptPrecision :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount
- mixedAmountUnstyled :: MixedAmount -> MixedAmount
- showMixedAmount :: MixedAmount -> String
- showMixedAmountOneLine :: MixedAmount -> String
- showMixedAmountWithZeroCommodity :: MixedAmount -> String
- showMixedAmountWithoutPrice :: Bool -> MixedAmount -> String
- showMixedAmountOneLineWithoutPrice :: Bool -> MixedAmount -> String
- showMixedAmountElided :: Int -> Bool -> MixedAmount -> String
- showMixedAmountDebug :: MixedAmount -> String
- showMixedAmountB :: AmountDisplayOpts -> MixedAmount -> WideBuilder
- showMixedAmountLinesB :: AmountDisplayOpts -> MixedAmount -> [WideBuilder]
- mixedAmountSetPrecision :: AmountPrecision -> MixedAmount -> MixedAmount
- mixedAmountSetFullPrecision :: MixedAmount -> MixedAmount
- mixedAmountStripPrices :: MixedAmount -> MixedAmount
- tests_Amount :: TestTree
- journalPriceOracle :: Bool -> Journal -> PriceOracle
- priceDirectiveToMarketPrice :: PriceDirective -> MarketPrice
- amountPriceDirectiveFromCost :: Day -> Amount -> Maybe PriceDirective
- mixedAmountToCost :: Map CommoditySymbol AmountStyle -> ConversionOp -> MixedAmount -> MixedAmount
- mixedAmountApplyValuation :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> Day -> ValuationType -> MixedAmount -> MixedAmount
- mixedAmountValueAtDate :: PriceOracle -> Map CommoditySymbol AmountStyle -> Maybe CommoditySymbol -> Day -> MixedAmount -> MixedAmount
- mixedAmountApplyGain :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> Day -> ValuationType -> MixedAmount -> MixedAmount
- mixedAmountGainAtDate :: PriceOracle -> Map CommoditySymbol AmountStyle -> Maybe CommoditySymbol -> Day -> MixedAmount -> MixedAmount
- marketPriceReverse :: MarketPrice -> MarketPrice
- tests_Valuation :: TestTree
- nullposting :: Posting
- posting :: Posting
- post :: AccountName -> Amount -> Posting
- vpost :: AccountName -> Amount -> Posting
- post' :: AccountName -> Amount -> Maybe BalanceAssertion -> Posting
- vpost' :: AccountName -> Amount -> Maybe BalanceAssertion -> Posting
- nullsourcepos :: (SourcePos, SourcePos)
- nullassertion :: BalanceAssertion
- balassert :: Amount -> Maybe BalanceAssertion
- balassertTot :: Amount -> Maybe BalanceAssertion
- balassertParInc :: Amount -> Maybe BalanceAssertion
- balassertTotInc :: Amount -> Maybe BalanceAssertion
- showBalanceAssertion :: BalanceAssertion -> WideBuilder
- originalPosting :: Posting -> Posting
- showPosting :: Posting -> String
- showPostingLines :: Posting -> [Text]
- postingsAsLines :: Bool -> [Posting] -> [Text]
- postingAsLines :: Bool -> Bool -> Int -> Int -> Posting -> ([Text], Int, Int)
- showAccountName :: Maybe Int -> PostingType -> AccountName -> Text
- renderCommentLines :: Text -> [Text]
- isReal :: Posting -> Bool
- isVirtual :: Posting -> Bool
- isBalancedVirtual :: Posting -> Bool
- hasAmount :: Posting -> Bool
- hasBalanceAssignment :: Posting -> Bool
- accountNamesFromPostings :: [Posting] -> [AccountName]
- sumPostings :: [Posting] -> MixedAmount
- postingStripPrices :: Posting -> Posting
- postingDate :: Posting -> Day
- postingDate2 :: Posting -> Day
- postingDateOrDate2 :: WhichDate -> Posting -> Day
- postingStatus :: Posting -> Status
- postingAllTags :: Posting -> [Tag]
- transactionAllTags :: Transaction -> [Tag]
- relatedPostings :: Posting -> [Posting]
- isPostingInDateSpan :: DateSpan -> Posting -> Bool
- isPostingInDateSpan' :: WhichDate -> DateSpan -> Posting -> Bool
- isEmptyPosting :: Posting -> Bool
- postingApplyAliases :: [AccountAlias] -> Posting -> Either RegexError Posting
- postingApplyCommodityStyles :: Map CommoditySymbol AmountStyle -> Posting -> Posting
- postingApplyCommodityStylesExceptPrecision :: Map CommoditySymbol AmountStyle -> Posting -> Posting
- postingAddTags :: Posting -> [Tag] -> Posting
- postingApplyValuation :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> ValuationType -> Posting -> Posting
- postingToCost :: ConversionOp -> Posting -> Maybe Posting
- postingAddInferredEquityPostings :: Bool -> Text -> Posting -> [Posting]
- postingPriceDirectivesFromCost :: Posting -> [PriceDirective]
- postingTransformAmount :: (MixedAmount -> MixedAmount) -> Posting -> Posting
- commentJoin :: Text -> Text -> Text
- commentAddTag :: Text -> Tag -> Text
- commentAddTagNextLine :: Text -> Tag -> Text
- tests_Posting :: TestTree
- nulltransaction :: Transaction
- transaction :: Day -> [Posting] -> Transaction
- transactionPayee :: Transaction -> Text
- transactionNote :: Transaction -> Text
- showTransaction :: Transaction -> Text
- showTransactionOneLineAmounts :: Transaction -> Text
- showTransactionLineFirstPart :: Transaction -> Text
- hasRealPostings :: Transaction -> Bool
- realPostings :: Transaction -> [Posting]
- assignmentPostings :: Transaction -> [Posting]
- virtualPostings :: Transaction -> [Posting]
- balancedVirtualPostings :: Transaction -> [Posting]
- transactionsPostings :: [Transaction] -> [Posting]
- transactionDate2 :: Transaction -> Day
- transactionDateOrDate2 :: WhichDate -> Transaction -> Day
- txnTieKnot :: Transaction -> Transaction
- txnUntieKnot :: Transaction -> Transaction
- transactionTransformPostings :: (Posting -> Posting) -> Transaction -> Transaction
- transactionApplyValuation :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> ValuationType -> Transaction -> Transaction
- transactionToCost :: ConversionOp -> Transaction -> Transaction
- transactionAddInferredEquityPostings :: Bool -> AccountName -> Transaction -> Transaction
- transactionInferCostsFromEquity :: Bool -> Map AccountName AccountType -> Transaction -> Either String Transaction
- partitionAndCheckConversionPostings :: Bool -> Map AccountName AccountType -> [IdxPosting] -> Either Text ([(IdxPosting, IdxPosting)], ([IdxPosting], [IdxPosting]))
- transactionApplyAliases :: [AccountAlias] -> Transaction -> Either RegexError Transaction
- transactionMapPostings :: (Posting -> Posting) -> Transaction -> Transaction
- transactionMapPostingAmounts :: (MixedAmount -> MixedAmount) -> Transaction -> Transaction
- transactionFile :: Transaction -> FilePath
- annotateErrorWithTransaction :: Transaction -> String -> String
- tests_Transaction :: TestTree
- payeeTag :: Maybe Text -> Either RegexError Query
- noteTag :: Maybe Text -> Either RegexError Query
- generatedTransactionTag :: Query
- parseQuery :: Day -> Text -> Either String (Query, [QueryOpt])
- parseQueryList :: Day -> [Text] -> Either String (Query, [QueryOpt])
- words'' :: [Text] -> Text -> [Text]
- queryprefixes :: [Text]
- parseQueryTerm :: Day -> Text -> Either String (Query, [QueryOpt])
- parseAccountType :: Bool -> Text -> Either String AccountType
- simplifyQuery :: Query -> Query
- filterQuery :: (Query -> Bool) -> Query -> Query
- filterQueryOrNotQuery :: (Query -> Bool) -> Query -> Query
- matchesQuery :: (Query -> Bool) -> Query -> Bool
- queryIsNull :: Query -> Bool
- queryIsDate :: Query -> Bool
- queryIsDate2 :: Query -> Bool
- queryIsDateOrDate2 :: Query -> Bool
- queryIsStatus :: Query -> Bool
- queryIsCode :: Query -> Bool
- queryIsDesc :: Query -> Bool
- queryIsTag :: Query -> Bool
- queryIsAcct :: Query -> Bool
- queryIsType :: Query -> Bool
- queryIsDepth :: Query -> Bool
- queryIsReal :: Query -> Bool
- queryIsAmt :: Query -> Bool
- queryIsSym :: Query -> Bool
- queryIsStartDateOnly :: Bool -> Query -> Bool
- queryIsTransactionRelated :: Query -> Bool
- queryStartDate :: Bool -> Query -> Maybe Day
- queryEndDate :: Bool -> Query -> Maybe Day
- queryDateSpan :: Bool -> Query -> DateSpan
- queryDateSpan' :: Query -> DateSpan
- queryDepth :: Query -> Maybe Int
- inAccount :: [QueryOpt] -> Maybe (AccountName, Bool)
- inAccountQuery :: [QueryOpt] -> Maybe Query
- matchesCommodity :: Query -> CommoditySymbol -> Bool
- matchesAmount :: Query -> Amount -> Bool
- matchesMixedAmount :: Query -> MixedAmount -> Bool
- matchesAccount :: Query -> AccountName -> Bool
- matchesAccountExtra :: (AccountName -> Maybe AccountType) -> (AccountName -> [Tag]) -> Query -> AccountName -> Bool
- matchesPosting :: Query -> Posting -> Bool
- matchesPostingExtra :: (AccountName -> Maybe AccountType) -> Query -> Posting -> Bool
- matchesTransaction :: Query -> Transaction -> Bool
- matchesTransactionExtra :: (AccountName -> Maybe AccountType) -> Query -> Transaction -> Bool
- matchesDescription :: Query -> Text -> Bool
- matchesPayeeWIP :: Query -> Payee -> Bool
- matchesTags :: Regexp -> Maybe Regexp -> [Tag] -> Bool
- matchesPriceDirective :: Query -> PriceDirective -> Bool
- tests_Query :: TestTree
- modifyTransactions :: (AccountName -> Maybe AccountType) -> (AccountName -> [Tag]) -> Map CommoditySymbol AmountStyle -> Day -> Bool -> [TransactionModifier] -> [Transaction] -> Either String [Transaction]
- timeclockEntriesToTransactions :: LocalTime -> [TimeclockEntry] -> [Transaction]
- tests_Timeclock :: TestTree
- makeAccountTagErrorExcerpt :: (AccountName, AccountDeclarationInfo) -> TagName -> (FilePath, Int, Maybe (Int, Maybe Int), Text)
- makeTransactionErrorExcerpt :: Transaction -> (Transaction -> Maybe (Int, Maybe Int)) -> (FilePath, Int, Maybe (Int, Maybe Int), Text)
- makePostingErrorExcerpt :: Posting -> (Posting -> Transaction -> Text -> Maybe (Int, Maybe Int)) -> (FilePath, Int, Maybe (Int, Maybe Int), Text)
- transactionFindPostingIndex :: (Posting -> Bool) -> Transaction -> Maybe Int
- makePostingAccountErrorExcerpt :: Posting -> (FilePath, Int, Maybe (Int, Maybe Int), Text)
- makeBalanceAssertionErrorExcerpt :: Posting -> (FilePath, Int, Maybe (Int, Maybe Int), Text)
- journalCheckOrdereddates :: WhichDate -> Journal -> Either String ()
- runPeriodicTransaction :: Bool -> PeriodicTransaction -> DateSpan -> [Transaction]
- checkPeriodicTransactionStartDate :: Interval -> DateSpan -> Text -> Maybe String
- toJsonText :: ToJSON a => a -> Text
- writeJsonFile :: ToJSON a => FilePath -> a -> IO ()
- readJsonFile :: FromJSON a => FilePath -> IO a
- journalConcat :: Journal -> Journal -> Journal
- journalRenumberAccountDeclarations :: Journal -> Journal
- dbgJournalAcctDeclOrder :: String -> Journal -> Journal
- nulljournal :: Journal
- journalFilePath :: Journal -> FilePath
- journalFilePaths :: Journal -> [FilePath]
- addTransaction :: Transaction -> Journal -> Journal
- addTransactionModifier :: TransactionModifier -> Journal -> Journal
- addPeriodicTransaction :: PeriodicTransaction -> Journal -> Journal
- addPriceDirective :: PriceDirective -> Journal -> Journal
- journalTransactionAt :: Journal -> Integer -> Maybe Transaction
- journalNextTransaction :: Journal -> Transaction -> Maybe Transaction
- journalPrevTransaction :: Journal -> Transaction -> Maybe Transaction
- journalPostings :: Journal -> [Posting]
- journalCommoditiesDeclared :: Journal -> [CommoditySymbol]
- journalCommodities :: Journal -> Set CommoditySymbol
- journalDescriptions :: Journal -> [Text]
- journalPayeesDeclared :: Journal -> [Payee]
- journalPayeesUsed :: Journal -> [Payee]
- journalPayeesDeclaredOrUsed :: Journal -> [Payee]
- journalTagsDeclared :: Journal -> [TagName]
- journalTagsUsed :: Journal -> [TagName]
- journalTagsDeclaredOrUsed :: Journal -> [TagName]
- journalAccountNamesUsed :: Journal -> [AccountName]
- journalAccountNamesImplied :: Journal -> [AccountName]
- journalAccountNamesDeclared :: Journal -> [AccountName]
- journalLeafAccountNamesDeclared :: Journal -> [AccountName]
- journalAccountNamesDeclaredOrUsed :: Journal -> [AccountName]
- journalAccountNamesDeclaredOrImplied :: Journal -> [AccountName]
- journalAccountNames :: Journal -> [AccountName]
- journalLeafAccountNames :: Journal -> [AccountName]
- journalAccountNameTree :: Journal -> Tree AccountName
- journalAccountTags :: Journal -> AccountName -> [Tag]
- journalInheritedAccountTags :: Journal -> AccountName -> [Tag]
- journalTransactionsSimilarTo :: Journal -> Text -> Query -> SimilarityScore -> Int -> [(DateWeightedSimilarityScore, Age, SimilarityScore, Transaction)]
- journalConversionAccount :: Journal -> AccountName
- journalAccountType :: Journal -> AccountName -> Maybe AccountType
- journalAddAccountTypes :: Journal -> Journal
- journalAccountTypes :: Journal -> Map AccountName AccountType
- journalPostingsAddAccountTags :: Journal -> Journal
- filterJournalTransactions :: Query -> Journal -> Journal
- filterJournalPostings :: Query -> Journal -> Journal
- filterJournalRelatedPostings :: Query -> Journal -> Journal
- filterJournalAmounts :: Query -> Journal -> Journal
- filterTransactionAmounts :: Query -> Transaction -> Transaction
- filterPostingAmount :: Query -> Posting -> Maybe Posting
- filterTransactionPostings :: Query -> Transaction -> Transaction
- filterTransactionPostingsExtra :: (AccountName -> Maybe AccountType) -> Query -> Transaction -> Transaction
- filterTransactionRelatedPostings :: Query -> Transaction -> Transaction
- journalMapTransactions :: (Transaction -> Transaction) -> Journal -> Journal
- journalMapPostings :: (Posting -> Posting) -> Journal -> Journal
- journalMapPostingAmounts :: (MixedAmount -> MixedAmount) -> Journal -> Journal
- journalReverse :: Journal -> Journal
- journalSetLastReadTime :: POSIXTime -> Journal -> Journal
- journalNumberAndTieTransactions :: Journal -> Journal
- journalNumberTransactions :: Journal -> Journal
- journalUntieTransactions :: Transaction -> Transaction
- journalModifyTransactions :: Bool -> Day -> Journal -> Either String Journal
- journalApplyCommodityStyles :: Journal -> Either String Journal
- journalCommodityStyles :: Journal -> Map CommoditySymbol AmountStyle
- commodityStylesFromAmounts :: [Amount] -> Either String (Map CommoditySymbol AmountStyle)
- canonicalStyleFrom :: [AmountStyle] -> AmountStyle
- journalInferMarketPricesFromTransactions :: Journal -> Journal
- journalToCost :: ConversionOp -> Journal -> Journal
- journalInferEquityFromCosts :: Bool -> Journal -> Journal
- journalInferCostsFromEquity :: Journal -> Either String Journal
- journalMarkRedundantCosts :: Journal -> Either String Journal
- journalDateSpan :: Bool -> Journal -> DateSpan
- journalDateSpanBothDates :: Journal -> DateSpan
- journalStartDate :: Bool -> Journal -> Maybe Day
- journalEndDate :: Bool -> Journal -> Maybe Day
- journalLastDay :: Bool -> Journal -> Maybe Day
- journalPivot :: Text -> Journal -> Journal
- journalApplyAliases :: [AccountAlias] -> Journal -> Either RegexError Journal
- samplejournal :: Journal
- samplejournalMaybeExplicit :: Bool -> Journal
- tests_Journal :: TestTree
- journalCheckUniqueleafnames :: Journal -> Either String ()
- journalCheckAccounts :: Journal -> Either String ()
- journalCheckCommodities :: Journal -> Either String ()
- journalCheckPayees :: Journal -> Either String ()
- journalCheckTags :: Journal -> Either String ()
- journalCheckPairedConversionPostings :: Journal -> Either String ()
- journalCheckRecentAssertions :: Day -> Journal -> Either String ()
- defbalancingopts :: BalancingOpts
- isTransactionBalanced :: BalancingOpts -> Transaction -> Bool
- balanceTransaction :: BalancingOpts -> Transaction -> Either String Transaction
- balanceTransactionHelper :: BalancingOpts -> Transaction -> Either String (Transaction, [(AccountName, MixedAmount)])
- journalCheckBalanceAssertions :: Journal -> Maybe String
- journalBalanceTransactions :: BalancingOpts -> Journal -> Either String Journal
- tests_Balancing :: TestTree
- definputopts :: InputOpts
- forecastPeriod :: InputOpts -> Journal -> Maybe DateSpan
- nullacct :: Account
- accountsFromPostings :: [Posting] -> [Account]
- accountTree :: AccountName -> [AccountName] -> Account
- parentAccounts :: Account -> [Account]
- accountsLevels :: Account -> [[Account]]
- mapAccounts :: (Account -> Account) -> Account -> Account
- anyAccounts :: (Account -> Bool) -> Account -> Bool
- sumAccounts :: Account -> Account
- clipAccounts :: Int -> Account -> Account
- clipAccountsAndAggregate :: Maybe Int -> [Account] -> [Account]
- pruneAccounts :: (Account -> Bool) -> Account -> Maybe Account
- flattenAccounts :: Account -> [Account]
- filterAccounts :: (Account -> Bool) -> Account -> [Account]
- sortAccountTreeByAmount :: NormalSign -> Account -> Account
- accountSetDeclarationInfo :: Journal -> Account -> Account
- sortAccountNamesByDeclaration :: Journal -> Bool -> [AccountName] -> [AccountName]
- lookupAccount :: AccountName -> [Account] -> Maybe Account
- printAccounts :: Account -> IO ()
- showAccounts :: Account -> String
- showAccountsBoringFlag :: Account -> String
- nullledger :: Ledger
- ledgerFromJournal :: Query -> Journal -> Ledger
- ledgerAccountNames :: Ledger -> [AccountName]
- ledgerAccount :: Ledger -> AccountName -> Maybe Account
- ledgerRootAccount :: Ledger -> Account
- ledgerTopAccounts :: Ledger -> [Account]
- ledgerLeafAccounts :: Ledger -> [Account]
- ledgerPostings :: Ledger -> [Posting]
- ledgerDateSpan :: Ledger -> DateSpan
- ledgerCommodities :: Ledger -> [CommoditySymbol]
- tests_Ledger :: TestTree
- tests_Data :: TestTree
- defreportopts :: ReportOpts
- rawOptsToReportOpts :: Day -> RawOpts -> ReportOpts
- defreportspec :: ReportSpec
- setDefaultConversionOp :: ConversionOp -> ReportSpec -> ReportSpec
- balanceAccumulationOverride :: RawOpts -> Maybe BalanceAccumulation
- intervalFromRawOpts :: RawOpts -> Interval
- simplifyStatuses :: Ord a => [a] -> [a]
- reportOptsToggleStatus :: Status -> ReportOpts -> ReportOpts
- transactionDateFn :: ReportOpts -> Transaction -> Day
- postingDateFn :: ReportOpts -> Posting -> Day
- whichDate :: ReportOpts -> WhichDate
- tree_ :: ReportOpts -> Bool
- flat_ :: ReportOpts -> Bool
- journalValueAndFilterPostings :: ReportSpec -> Journal -> Journal
- journalValueAndFilterPostingsWith :: ReportSpec -> Journal -> PriceOracle -> Journal
- journalApplyValuationFromOpts :: ReportSpec -> Journal -> Journal
- journalApplyValuationFromOptsWith :: ReportSpec -> Journal -> PriceOracle -> Journal
- mixedAmountApplyValuationAfterSumFromOptsWith :: ReportOpts -> Journal -> PriceOracle -> DateSpan -> MixedAmount -> MixedAmount
- valuationAfterSum :: ReportOpts -> Maybe (Maybe CommoditySymbol)
- queryFromFlags :: ReportOpts -> Query
- reportSpan :: Journal -> ReportSpec -> (DateSpan, [DateSpan])
- reportSpanBothDates :: Journal -> ReportSpec -> (DateSpan, [DateSpan])
- reportStartDate :: Journal -> ReportSpec -> Maybe Day
- reportEndDate :: Journal -> ReportSpec -> Maybe Day
- reportPeriodStart :: ReportSpec -> Maybe Day
- reportPeriodOrJournalStart :: ReportSpec -> Journal -> Maybe Day
- reportPeriodLastDay :: ReportSpec -> Maybe Day
- reportPeriodOrJournalLastDay :: ReportSpec -> Journal -> Maybe Day
- reportPeriodName :: BalanceAccumulation -> [DateSpan] -> DateSpan -> Text
- overEither :: ((a -> Either e b) -> s -> Either e t) -> (a -> b) -> s -> Either e t
- setEither :: ((a -> Either e b) -> s -> Either e t) -> b -> s -> Either e t
- reportOptsToSpec :: Day -> ReportOpts -> Either String ReportSpec
- updateReportSpec :: ReportOpts -> ReportSpec -> Either String ReportSpec
- updateReportSpecWith :: (ReportOpts -> ReportOpts) -> ReportSpec -> Either String ReportSpec
- rawOptsToReportSpec :: Day -> RawOpts -> Either String ReportSpec
- prrAdd :: Semigroup b => PeriodicReportRow a b -> PeriodicReportRow a b -> PeriodicReportRow a b
- periodicReportSpan :: PeriodicReport a b -> DateSpan
- prMapName :: (a -> b) -> PeriodicReport a c -> PeriodicReport b c
- prMapMaybeName :: (a -> Maybe b) -> PeriodicReport a c -> PeriodicReport b c
- flatDisplayName :: AccountName -> DisplayName
- treeDisplayName :: AccountName -> DisplayName
- prrFullName :: PeriodicReportRow DisplayName a -> AccountName
- prrDisplayName :: PeriodicReportRow DisplayName a -> AccountName
- prrDepth :: PeriodicReportRow DisplayName a -> Int
- postingsReport :: ReportSpec -> Journal -> PostingsReport
- mkpostingsReportItem :: Bool -> Bool -> WhichDate -> Maybe Period -> Posting -> MixedAmount -> PostingsReportItem
- tests_PostingsReport :: TestTree
- multiBalanceReport :: ReportSpec -> Journal -> MultiBalanceReport
- multiBalanceReportWith :: ReportSpec -> Journal -> PriceOracle -> Set AccountName -> MultiBalanceReport
- compoundBalanceReport :: ReportSpec -> Journal -> [CBCSubreportSpec a] -> CompoundPeriodicReport a MixedAmount
- compoundBalanceReportWith :: ReportSpec -> Journal -> PriceOracle -> [CBCSubreportSpec a] -> CompoundPeriodicReport a MixedAmount
- startingPostings :: ReportSpec -> Journal -> PriceOracle -> DateSpan -> [Posting]
- makeReportQuery :: ReportSpec -> DateSpan -> ReportSpec
- getPostingsByColumn :: ReportSpec -> Journal -> PriceOracle -> [DateSpan] -> [(DateSpan, [Posting])]
- getPostings :: ReportSpec -> Journal -> PriceOracle -> [Posting]
- generateMultiBalanceReport :: ReportSpec -> Journal -> PriceOracle -> Set AccountName -> [(DateSpan, [Posting])] -> HashMap AccountName Account -> MultiBalanceReport
- sortRows :: ReportOpts -> Journal -> [MultiBalanceReportRow] -> [MultiBalanceReportRow]
- sortRowsLike :: [AccountName] -> [PeriodicReportRow DisplayName b] -> [PeriodicReportRow DisplayName b]
- balanceReportTableAsText :: ReportOpts -> Table Text Text WideBuilder -> Builder
- tests_MultiBalanceReport :: TestTree
- entriesReport :: ReportSpec -> Journal -> EntriesReport
- tests_EntriesReport :: TestTree
- budgetReport :: ReportSpec -> BalancingOpts -> DateSpan -> Journal -> BudgetReport
- combineBudgetAndActual :: ReportOpts -> Journal -> MultiBalanceReport -> MultiBalanceReport -> BudgetReport
- budgetReportAsText :: ReportOpts -> BudgetReport -> Text
- budgetReportAsTable :: ReportOpts -> BudgetReport -> Table Text Text WideBuilder
- budgetReportAsCsv :: ReportOpts -> BudgetReport -> [[Text]]
- tests_BudgetReport :: TestTree
- flatShowsExclusiveBalance :: Bool
- balanceReport :: ReportSpec -> Journal -> BalanceReport
- tests_BalanceReport :: TestTree
- triOrigTransaction :: (a, b, c, d, e, f) -> a
- triDate :: (a, Transaction, c, d, e, f) -> Day
- triAmount :: (a, b, c, d, e, f) -> e
- triBalance :: (a, b, c, d, e, f) -> f
- triCommodityAmount :: CommoditySymbol -> (a, b, c, d, MixedAmount, f) -> MixedAmount
- triCommodityBalance :: CommoditySymbol -> (a, b, c, d, e, MixedAmount) -> MixedAmount
- accountTransactionsReport :: ReportSpec -> Journal -> Query -> AccountTransactionsReport
- accountTransactionsReportItems :: Query -> Query -> MixedAmount -> (MixedAmount -> MixedAmount) -> (AccountName -> Maybe AccountType) -> [(Day, Transaction)] -> [AccountTransactionsReportItem]
- transactionRegisterDate :: WhichDate -> Query -> Query -> Transaction -> Day
- accountTransactionsReportByCommodity :: AccountTransactionsReport -> [(CommoditySymbol, AccountTransactionsReport)]
- tests_AccountTransactionsReport :: TestTree
- tests_Reports :: TestTree
- rawOptsToInputOpts :: Day -> RawOpts -> InputOpts
- parseAndFinaliseJournal :: ErroringJournalParser IO ParsedJournal -> InputOpts -> FilePath -> Text -> ExceptT String IO Journal
- initialiseAndParseJournal :: ErroringJournalParser IO ParsedJournal -> InputOpts -> FilePath -> Text -> ExceptT String IO Journal
- journalFinalise :: InputOpts -> FilePath -> Text -> ParsedJournal -> ExceptT String IO Journal
- journalAddAutoPostings :: Bool -> Day -> BalancingOpts -> Journal -> Either String Journal
- journalAddForecast :: Bool -> Maybe DateSpan -> Journal -> Journal
- setYear :: forall (m :: Type -> Type). Year -> JournalParser m ()
- getYear :: forall (m :: Type -> Type). JournalParser m (Maybe Year)
- setDefaultCommodityAndStyle :: forall (m :: Type -> Type). (CommoditySymbol, AmountStyle) -> JournalParser m ()
- getDefaultCommodityAndStyle :: forall (m :: Type -> Type). JournalParser m (Maybe (CommoditySymbol, AmountStyle))
- getDefaultAmountStyle :: forall (m :: Type -> Type). JournalParser m (Maybe AmountStyle)
- getAmountStyle :: forall (m :: Type -> Type). CommoditySymbol -> JournalParser m (Maybe AmountStyle)
- addDeclaredAccountTags :: forall (m :: Type -> Type). AccountName -> [Tag] -> JournalParser m ()
- addDeclaredAccountType :: forall (m :: Type -> Type). AccountName -> AccountType -> JournalParser m ()
- pushParentAccount :: forall (m :: Type -> Type). AccountName -> JournalParser m ()
- popParentAccount :: forall (m :: Type -> Type). JournalParser m ()
- getParentAccount :: forall (m :: Type -> Type). JournalParser m AccountName
- addAccountAlias :: MonadState Journal m => AccountAlias -> m ()
- getAccountAliases :: MonadState Journal m => m [AccountAlias]
- clearAccountAliases :: MonadState Journal m => m ()
- journalAddFile :: (FilePath, Text) -> Journal -> Journal
- statusp :: forall (m :: Type -> Type). TextParser m Status
- codep :: forall (m :: Type -> Type). TextParser m Text
- descriptionp :: forall (m :: Type -> Type). TextParser m Text
- datep :: forall (m :: Type -> Type). JournalParser m Day
- datetimep :: forall (m :: Type -> Type). JournalParser m LocalTime
- secondarydatep :: forall (m :: Type -> Type). Day -> TextParser m Day
- modifiedaccountnamep :: forall (m :: Type -> Type). JournalParser m AccountName
- accountnamep :: forall (m :: Type -> Type). TextParser m AccountName
- noncommenttextp :: forall (m :: Type -> Type). TextParser m Text
- noncommenttext1p :: forall (m :: Type -> Type). TextParser m Text
- singlespacedtext1p :: forall (m :: Type -> Type). TextParser m Text
- singlespacednoncommenttext1p :: forall (m :: Type -> Type). TextParser m Text
- singlespacedtextsatisfying1p :: forall (m :: Type -> Type). (Char -> Bool) -> TextParser m Text
- singlespacep :: forall (m :: Type -> Type). TextParser m ()
- spaceandamountormissingp :: forall (m :: Type -> Type). JournalParser m MixedAmount
- amountp :: forall (m :: Type -> Type). JournalParser m Amount
- amountp' :: forall (m :: Type -> Type). Bool -> JournalParser m Amount
- parseamount :: String -> Either HledgerParseErrors Amount
- parseamount' :: String -> Amount
- parsemixedamount :: String -> Either HledgerParseErrors MixedAmount
- parsemixedamount' :: String -> MixedAmount
- commoditysymbolp :: forall (m :: Type -> Type). TextParser m CommoditySymbol
- costp :: forall (m :: Type -> Type). Amount -> JournalParser m AmountPrice
- balanceassertionp :: forall (m :: Type -> Type). JournalParser m BalanceAssertion
- lotcostp :: forall (m :: Type -> Type). JournalParser m ()
- numberp :: forall (m :: Type -> Type). Maybe AmountStyle -> TextParser m (Quantity, Word8, Maybe Char, Maybe DigitGroupStyle)
- fromRawNumber :: RawNumber -> Maybe Integer -> Either String (Quantity, Word8, Maybe Char, Maybe DigitGroupStyle)
- rawnumberp :: forall (m :: Type -> Type). TextParser m (Either AmbiguousNumber RawNumber)
- multilinecommentp :: forall (m :: Type -> Type). TextParser m ()
- emptyorcommentlinep :: forall (m :: Type -> Type). TextParser m ()
- isLineCommentStart :: Char -> Bool
- isSameLineCommentStart :: Char -> Bool
- followingcommentp :: forall (m :: Type -> Type). TextParser m Text
- transactioncommentp :: forall (m :: Type -> Type). TextParser m (Text, [Tag])
- postingcommentp :: forall (m :: Type -> Type). Maybe Year -> TextParser m (Text, [Tag], Maybe Day, Maybe Day)
- bracketeddatetagsp :: forall (m :: Type -> Type). Maybe Year -> TextParser m [(TagName, Day)]
- aliasesFromOpts :: InputOpts -> [AccountAlias]
- accountaliasp :: forall (m :: Type -> Type). TextParser m AccountAlias
- tests_Common :: TestTree
- runJournalParser :: Monad m => JournalParser m a -> Text -> m (Either HledgerParseErrors a)
- findReader :: forall (m :: Type -> Type). MonadIO m => Maybe StorageFormat -> Maybe FilePath -> Maybe (Reader m)
- splitReaderPrefix :: PrefixedFilePath -> (Maybe String, FilePath)
- tmpostingrulep :: forall (m :: Type -> Type). Maybe Year -> JournalParser m TMPostingRule
- defaultJournal :: IO Journal
- defaultJournalPath :: IO String
- readJournal :: InputOpts -> Maybe FilePath -> Text -> ExceptT String IO Journal
- readJournalFile :: InputOpts -> PrefixedFilePath -> ExceptT String IO Journal
- readJournalFiles :: InputOpts -> [PrefixedFilePath] -> ExceptT String IO Journal
- readJournal' :: Text -> IO Journal
- readJournalFile' :: PrefixedFilePath -> IO Journal
- readJournalFiles' :: [PrefixedFilePath] -> IO Journal
- orDieTrying :: MonadIO m => ExceptT String m a -> m a
- requireJournalFileExists :: FilePath -> IO ()
- ensureJournalFileExists :: FilePath -> IO ()
- tests_Read :: TestTree
- tests_Hledger :: TestTree
- assertFailure :: HasCallStack => String -> IO a
- assertBool :: HasCallStack => String -> Bool -> Assertion
- assertEqual :: (Eq a, Show a, HasCallStack) => String -> a -> a -> Assertion
- (@=?) :: (Eq a, Show a, HasCallStack) => a -> a -> Assertion
- (@?=) :: (Eq a, Show a, HasCallStack) => a -> a -> Assertion
- (@?) :: (AssertionPredicable t, HasCallStack) => t -> String -> Assertion
- assertString :: HasCallStack => String -> Assertion
- testCaseSteps :: TestName -> ((String -> IO ()) -> Assertion) -> TestTree
- testCaseInfo :: TestName -> IO String -> TestTree
- (</>) :: FilePath -> FilePath -> FilePath
- combine :: FilePath -> FilePath -> FilePath
- isNothing :: Maybe a -> Bool
- isJust :: Maybe a -> Bool
- fromJust :: HasCallStack => Maybe a -> a
- maybeToList :: Maybe a -> [a]
- headMay :: [a] -> Maybe a
- lastMay :: [a] -> Maybe a
- maximumMay :: Ord a => [a] -> Maybe a
- maximumByMay :: (a -> a -> Ordering) -> [a] -> Maybe a
- minimumMay :: Ord a => [a] -> Maybe a
- minimumByMay :: (a -> a -> Ordering) -> [a] -> Maybe a
- tailMay :: [a] -> Maybe [a]
- initMay :: [a] -> Maybe [a]
- tailDef :: [a] -> [a] -> [a]
- initDef :: [a] -> [a] -> [a]
- pack :: String -> Text
- unpack :: Text -> String
- listToMaybe :: [a] -> Maybe a
- clamp :: Ord a => (a, a) -> a -> a
- comparing :: Ord a => (b -> a) -> b -> b -> Ordering
- defaultTimeLocale :: TimeLocale
- iso8601DateFormat :: Maybe String -> String
- rfc822DateFormat :: String
- writeOutput :: CliOpts -> String -> IO ()
- register :: CliOpts -> Journal -> IO ()
- foldl1May :: (a -> a -> a) -> [a] -> Maybe a
- foldr1May :: (a -> a -> a) -> [a] -> Maybe a
- foldl1Note :: Partial => String -> (a -> a -> a) -> [a] -> a
- foldr1Note :: Partial => String -> (a -> a -> a) -> [a] -> a
- minimumNote :: (Partial, Ord a) => String -> [a] -> a
- maximumNote :: (Partial, Ord a) => String -> [a] -> a
- minimumByNote :: Partial => String -> (a -> a -> Ordering) -> [a] -> a
- maximumByNote :: Partial => String -> (a -> a -> Ordering) -> [a] -> a
- maximumBoundBy :: a -> (a -> a -> Ordering) -> [a] -> a
- minimumBoundBy :: a -> (a -> a -> Ordering) -> [a] -> a
- maximumBound :: Ord a => a -> [a] -> a
- minimumBound :: Ord a => a -> [a] -> a
- maximumBounded :: (Ord a, Bounded a) => [a] -> a
- minimumBounded :: (Ord a, Bounded a) => [a] -> a
- findJust :: (a -> Bool) -> [a] -> a
- findJustDef :: a -> (a -> Bool) -> [a] -> a
- findJustNote :: Partial => String -> (a -> Bool) -> [a] -> a
- minimumDef :: Ord a => a -> [a] -> a
- maximumDef :: Ord a => a -> [a] -> a
- minimumByDef :: a -> (a -> a -> Ordering) -> [a] -> a
- maximumByDef :: a -> (a -> a -> Ordering) -> [a] -> a
- foldl1Def :: a -> (a -> a -> a) -> [a] -> a
- foldr1Def :: a -> (a -> a -> a) -> [a] -> a
- tailNote :: Partial => String -> [a] -> [a]
- tailSafe :: [a] -> [a]
- initNote :: Partial => String -> [a] -> [a]
- initSafe :: [a] -> [a]
- headNote :: Partial => String -> [a] -> a
- lastNote :: Partial => String -> [a] -> a
- foldl1May' :: (a -> a -> a) -> [a] -> Maybe a
- foldl1Note' :: Partial => String -> (a -> a -> a) -> [a] -> a
- scanr1May :: (a -> a -> a) -> [a] -> Maybe [a]
- scanl1May :: (a -> a -> a) -> [a] -> Maybe [a]
- scanr1Def :: [a] -> (a -> a -> a) -> [a] -> [a]
- scanl1Def :: [a] -> (a -> a -> a) -> [a] -> [a]
- scanr1Note :: Partial => String -> (a -> a -> a) -> [a] -> [a]
- scanl1Note :: Partial => String -> (a -> a -> a) -> [a] -> [a]
- cycleMay :: [a] -> Maybe [a]
- cycleDef :: [a] -> [a] -> [a]
- cycleNote :: Partial => String -> [a] -> [a]
- fromJustDef :: a -> Maybe a -> a
- fromJustNote :: Partial => String -> Maybe a -> a
- assertNote :: Partial => String -> Bool -> a -> a
- atMay :: [a] -> Int -> Maybe a
- atDef :: a -> [a] -> Int -> a
- atNote :: Partial => String -> [a] -> Int -> a
- readEitherSafe :: Read a => String -> Either String a
- readMay :: Read a => String -> Maybe a
- readDef :: Read a => a -> String -> a
- readNote :: (Partial, Read a) => String -> String -> a
- lookupJust :: (Eq a, Partial) => a -> [(a, b)] -> b
- lookupJustDef :: Eq a => b -> a -> [(a, b)] -> b
- lookupJustNote :: (Partial, Eq a) => String -> a -> [(a, b)] -> b
- elemIndexJust :: (Partial, Eq a) => a -> [a] -> Int
- elemIndexJustDef :: Eq a => Int -> a -> [a] -> Int
- elemIndexJustNote :: (Partial, Eq a) => String -> a -> [a] -> Int
- findIndexJust :: (a -> Bool) -> [a] -> Int
- findIndexJustDef :: Int -> (a -> Bool) -> [a] -> Int
- findIndexJustNote :: Partial => String -> (a -> Bool) -> [a] -> Int
- toEnumMay :: (Enum a, Bounded a) => Int -> Maybe a
- toEnumDef :: (Enum a, Bounded a) => a -> Int -> a
- toEnumNote :: (Partial, Enum a, Bounded a) => String -> Int -> a
- toEnumSafe :: (Enum a, Bounded a) => Int -> a
- succMay :: (Enum a, Eq a, Bounded a) => a -> Maybe a
- succDef :: (Enum a, Eq a, Bounded a) => a -> a -> a
- succNote :: (Partial, Enum a, Eq a, Bounded a) => String -> a -> a
- succSafe :: (Enum a, Eq a, Bounded a) => a -> a
- predMay :: (Enum a, Eq a, Bounded a) => a -> Maybe a
- predDef :: (Enum a, Eq a, Bounded a) => a -> a -> a
- predNote :: (Partial, Enum a, Eq a, Bounded a) => String -> a -> a
- predSafe :: (Enum a, Eq a, Bounded a) => a -> a
- indexMay :: Ix a => (a, a) -> a -> Maybe Int
- indexDef :: Ix a => Int -> (a, a) -> a -> Int
- indexNote :: (Partial, Ix a) => String -> (a, a) -> a -> Int
- foldl1Def' :: a -> (a -> a -> a) -> [a] -> a
- (<.>) :: FilePath -> String -> FilePath
- calendarDay :: CalendarDiffDays
- calendarMonth :: CalendarDiffDays
- calendarWeek :: CalendarDiffDays
- calendarYear :: CalendarDiffDays
- scaleCalendarDiffDays :: Integer -> CalendarDiffDays -> CalendarDiffDays
- addDays :: Integer -> Day -> Day
- diffDays :: Day -> Day -> Integer
- addGregorianDurationClip :: CalendarDiffDays -> Day -> Day
- addGregorianDurationRollOver :: CalendarDiffDays -> Day -> Day
- addGregorianMonthsClip :: Integer -> Day -> Day
- addGregorianMonthsRollOver :: Integer -> Day -> Day
- addGregorianYearsClip :: Integer -> Day -> Day
- addGregorianYearsRollOver :: Integer -> Day -> Day
- diffGregorianDurationClip :: Day -> Day -> CalendarDiffDays
- diffGregorianDurationRollOver :: Day -> Day -> CalendarDiffDays
- fromGregorian :: Year -> MonthOfYear -> DayOfMonth -> Day
- fromGregorianValid :: Year -> MonthOfYear -> DayOfMonth -> Maybe Day
- gregorianMonthLength :: Year -> MonthOfYear -> DayOfMonth
- showGregorian :: Day -> String
- toGregorian :: Day -> (Year, MonthOfYear, DayOfMonth)
- isLeapYear :: Year -> Bool
- dayOfWeek :: Day -> DayOfWeek
- dayOfWeekDiff :: DayOfWeek -> DayOfWeek -> Int
- firstDayOfWeekOnAfter :: DayOfWeek -> Day -> Day
- utc :: TimeZone
- parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t
- parseTimeOrError :: ParseTime t => Bool -> TimeLocale -> String -> String -> t
- readPTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadP t
- readSTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadS t
- zonedTimeToUTC :: ZonedTime -> UTCTime
- addLocalTime :: NominalDiffTime -> LocalTime -> LocalTime
- diffLocalTime :: LocalTime -> LocalTime -> NominalDiffTime
- localTimeToUT1 :: Rational -> LocalTime -> UniversalTime
- localTimeToUTC :: TimeZone -> LocalTime -> UTCTime
- ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime
- utcToLocalTime :: TimeZone -> UTCTime -> LocalTime
- getZonedTime :: IO ZonedTime
- utcToLocalZonedTime :: UTCTime -> IO ZonedTime
- utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime
- diffTimeToPicoseconds :: DiffTime -> Integer
- picosecondsToDiffTime :: Integer -> DiffTime
- secondsToDiffTime :: Integer -> DiffTime
- nominalDay :: NominalDiffTime
- nominalDiffTimeToSeconds :: NominalDiffTime -> Pico
- secondsToNominalDiffTime :: Pico -> NominalDiffTime
- getTime_resolution :: DiffTime
- addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime
- diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime
- getCurrentTime :: IO UTCTime
- formatTime :: FormatTime t => TimeLocale -> String -> t -> String
- calendarTimeDays :: CalendarDiffDays -> CalendarDiffTime
- calendarTimeTime :: NominalDiffTime -> CalendarDiffTime
- scaleCalendarDiffTime :: Integer -> CalendarDiffTime -> CalendarDiffTime
- dayFractionToTimeOfDay :: Rational -> TimeOfDay
- daysAndTimeOfDayToTime :: Integer -> TimeOfDay -> NominalDiffTime
- localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
- makeTimeOfDayValid :: Int -> Int -> Pico -> Maybe TimeOfDay
- midday :: TimeOfDay
- midnight :: TimeOfDay
- pastMidnight :: DiffTime -> TimeOfDay
- sinceMidnight :: TimeOfDay -> DiffTime
- timeOfDayToDayFraction :: TimeOfDay -> Rational
- timeOfDayToTime :: TimeOfDay -> DiffTime
- timeToDaysAndTimeOfDay :: NominalDiffTime -> (Integer, TimeOfDay)
- timeToTimeOfDay :: DiffTime -> TimeOfDay
- utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
- getCurrentTimeZone :: IO TimeZone
- getTimeZone :: UTCTime -> IO TimeZone
- hoursToTimeZone :: Int -> TimeZone
- minutesToTimeZone :: Int -> TimeZone
- timeZoneOffsetString :: TimeZone -> String
- timeZoneOffsetString' :: Maybe Char -> TimeZone -> String
- prognameandversion :: String
- versionString :: ProgramName -> PackageVersion -> String
- helpflags :: [Flag RawOpts]
- detailedversionflag :: Flag RawOpts
- flattreeflags :: Bool -> [Flag RawOpts]
- hiddenflags :: [Flag RawOpts]
- inputflags :: [Flag RawOpts]
- reportflags :: [Flag RawOpts]
- outputFormatFlag :: [String] -> Flag RawOpts
- outputFileFlag :: Flag RawOpts
- generalflagsgroup1 :: (String, [Flag RawOpts])
- generalflagsgroup2 :: (String, [Flag RawOpts])
- generalflagsgroup3 :: (String, [Flag RawOpts])
- defMode :: Mode RawOpts
- defCommandMode :: [Name] -> Mode RawOpts
- addonCommandMode :: Name -> Mode RawOpts
- hledgerCommandMode :: CommandDoc -> [Flag RawOpts] -> [(String, [Flag RawOpts])] -> [Flag RawOpts] -> ([Arg RawOpts], Maybe (Arg RawOpts)) -> Mode RawOpts
- argsFlag :: FlagHelp -> Arg RawOpts
- showModeUsage :: Mode a -> String
- withAliases :: String -> [String] -> String
- likelyExecutablesInPath :: IO [String]
- hledgerExecutablesInPath :: IO [String]
- ensureDebugHasArg :: (Eq (t Char), IsString (t Char), Foldable t) => [t Char] -> [t Char]
- defcliopts :: CliOpts
- getHledgerCliOpts :: Mode RawOpts -> IO CliOpts
- getHledgerCliOpts' :: Mode RawOpts -> [String] -> IO CliOpts
- rawOptsToCliOpts :: RawOpts -> IO CliOpts
- outputFormats :: [String]
- defaultOutputFormat :: String
- journalFilePathFromOpts :: CliOpts -> IO [String]
- rulesFilePathFromOpts :: CliOpts -> IO (Maybe FilePath)
- outputFileFromOpts :: CliOpts -> IO (Maybe FilePath)
- outputFormatFromOpts :: CliOpts -> String
- defaultWidth :: Int
- replaceNumericFlags :: [String] -> [String]
- registerWidthsFromOpts :: CliOpts -> (Int, Maybe Int)
- hledgerAddons :: IO [String]
- topicForMode :: Mode a -> Topic
- printHelpForTopic :: Tool -> Maybe Topic -> IO ()
- runManForTopic :: Tool -> Maybe Topic -> IO ()
- runInfoForTopic :: Tool -> Maybe Topic -> IO ()
- runPagerForTopic :: Tool -> Maybe Topic -> IO ()
- unsupportedOutputFormatError :: String -> String
- withJournalDo :: CliOpts -> (Journal -> IO a) -> IO a
- writeOutputLazyText :: CliOpts -> Text -> IO ()
- journalTransform :: CliOpts -> Journal -> Journal
- journalReload :: CliOpts -> ExceptT String IO Journal
- journalReloadIfChanged :: CliOpts -> Day -> Journal -> ExceptT String IO (Journal, Bool)
- journalFileIsNewer :: Journal -> FilePath -> IO Bool
- openBrowserOn :: String -> IO ExitCode
- writeFileWithBackup :: FilePath -> String -> IO ()
- writeFileWithBackupIfChanged :: FilePath -> Text -> IO Bool
- readFileStrictly :: FilePath -> IO Text
- pivotByOpts :: CliOpts -> Journal -> Journal
- anonymiseByOpts :: CliOpts -> Journal -> Journal
- journalSimilarTransaction :: CliOpts -> Journal -> Text -> Maybe Transaction
- postingsOrTransactionsReportAsText :: Bool -> CliOpts -> (Int -> Int -> (a, [WideBuilder], [WideBuilder]) -> Builder) -> (a -> MixedAmount) -> (a -> MixedAmount) -> [a] -> Builder
- tests_Cli_Utils :: TestTree
- splitFileName :: FilePath -> (String, String)
- takeDirectory :: FilePath -> FilePath
- argsToCliOpts :: [String] -> [String] -> IO CliOpts
- packageversion :: PackageVersion
- progname :: ProgramName
- versionStringWith :: Either String GitInfo -> ProgramName -> PackageVersion -> VersionString
- testcmd :: CliOpts -> Journal -> IO ()
- builtinCommands :: [(Mode RawOpts, CliOpts -> Journal -> IO ())]
- builtinCommandNames :: [String]
- findBuiltinCommand :: String -> Maybe (Mode RawOpts, CliOpts -> Journal -> IO ())
- knownAddonCommands :: [String]
- knownCommands :: [String]
- printCommandsList :: String -> [String] -> IO ()
- tests_Hledger_Cli :: TestTree
- accountsmode :: Mode RawOpts
- accounts :: CliOpts -> Journal -> IO ()
- activitymode :: Mode RawOpts
- addmode :: Mode RawOpts
- appendToJournalFileOrStdout :: FilePath -> Text -> IO ()
- journalAddTransaction :: Journal -> CliOpts -> Transaction -> IO Journal
- postingsReportAsText :: CliOpts -> PostingsReport -> Text
- aregistermode :: Mode RawOpts
- aregister :: CliOpts -> Journal -> IO ()
- tests_Aregister :: TestTree
- balancemode :: Mode RawOpts
- balance :: CliOpts -> Journal -> IO ()
- balanceReportAsText :: ReportOpts -> BalanceReport -> Builder
- balanceReportAsCsv :: ReportOpts -> BalanceReport -> CSV
- balanceReportItemAsText :: ReportOpts -> BalanceReportItem -> (Builder, [Int])
- multiBalanceRowAsCsvText :: ReportOpts -> [DateSpan] -> PeriodicReportRow a MixedAmount -> [[Text]]
- multiBalanceRowAsTableText :: ReportOpts -> PeriodicReportRow a MixedAmount -> [[WideBuilder]]
- multiBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> Text
- multiBalanceReportAsCsv :: ReportOpts -> MultiBalanceReport -> CSV
- multiBalanceReportAsHtml :: ReportOpts -> MultiBalanceReport -> Html ()
- multiBalanceReportHtmlRows :: ReportOpts -> MultiBalanceReport -> (Html (), [Html ()], [Html ()])
- multiBalanceReportHtmlFootRow :: ReportOpts -> [Text] -> Html ()
- balanceReportAsTable :: ReportOpts -> MultiBalanceReport -> Table Text Text WideBuilder
- tests_Balance :: TestTree
- balancesheetmode :: Mode RawOpts
- balancesheet :: CliOpts -> Journal -> IO ()
- balancesheetequitymode :: Mode RawOpts
- balancesheetequity :: CliOpts -> Journal -> IO ()
- cashflowmode :: Mode RawOpts
- cashflow :: CliOpts -> Journal -> IO ()
- closemode :: Mode RawOpts
- codesmode :: Mode RawOpts
- codes :: CliOpts -> Journal -> IO ()
- commoditiesmode :: Mode RawOpts
- commodities :: CliOpts -> Journal -> IO ()
- demomode :: Mode RawOpts
- demo :: CliOpts -> Journal -> IO ()
- descriptionsmode :: Mode RawOpts
- descriptions :: CliOpts -> Journal -> IO ()
- diffmode :: Mode RawOpts
- helpmode :: Mode RawOpts
- help' :: CliOpts -> Journal -> IO ()
- importmode :: Mode RawOpts
- importcmd :: CliOpts -> Journal -> IO ()
- incomestatementmode :: Mode RawOpts
- incomestatement :: CliOpts -> Journal -> IO ()
- notesmode :: Mode RawOpts
- notes :: CliOpts -> Journal -> IO ()
- payeesmode :: Mode RawOpts
- payees :: CliOpts -> Journal -> IO ()
- pricesmode :: Mode RawOpts
- prices :: CliOpts -> Journal -> IO ()
- printmode :: Mode RawOpts
- print' :: CliOpts -> Journal -> IO ()
- transactionWithMostlyOriginalPostings :: Transaction -> Transaction
- registermode :: Mode RawOpts
- postingsReportItemAsText :: CliOpts -> Int -> Int -> (PostingsReportItem, [WideBuilder], [WideBuilder]) -> Builder
- tests_Register :: TestTree
- rewritemode :: Mode RawOpts
- rewrite :: CliOpts -> Journal -> IO ()
- statsmode :: Mode RawOpts
- stats :: CliOpts -> Journal -> IO ()
- tagsmode :: Mode RawOpts
- tags :: CliOpts -> Journal -> IO ()
- parseTimeMultipleM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> [(String, String)] -> m t
- periodAllDays :: DayPeriod p => p -> [Day]
- periodFromDay :: DayPeriod p => Day -> (p, Int)
- periodLength :: DayPeriod p => p -> Int
- periodToDay :: DayPeriod p => p -> Int -> Day
- periodToDayValid :: DayPeriod p => p -> Int -> Maybe Day
- isPathSeparator :: Char -> Bool
- isRelative :: FilePath -> Bool
- normalise :: FilePath -> FilePath
- splitExtension :: FilePath -> (String, String)
- takeBaseName :: FilePath -> String
- takeExtension :: FilePath -> String
- addExtension :: FilePath -> String -> FilePath
- makeRelative :: FilePath -> FilePath -> FilePath
- (-<.>) :: FilePath -> String -> FilePath
- addTrailingPathSeparator :: FilePath -> FilePath
- dropDrive :: FilePath -> FilePath
- dropExtension :: FilePath -> FilePath
- dropExtensions :: FilePath -> FilePath
- dropFileName :: FilePath -> FilePath
- dropTrailingPathSeparator :: FilePath -> FilePath
- equalFilePath :: FilePath -> FilePath -> Bool
- extSeparator :: Char
- getSearchPath :: IO [FilePath]
- hasDrive :: FilePath -> Bool
- hasExtension :: FilePath -> Bool
- hasTrailingPathSeparator :: FilePath -> Bool
- isAbsolute :: FilePath -> Bool
- isDrive :: FilePath -> Bool
- isExtSeparator :: Char -> Bool
- isExtensionOf :: String -> FilePath -> Bool
- isSearchPathSeparator :: Char -> Bool
- isValid :: FilePath -> Bool
- joinDrive :: FilePath -> FilePath -> FilePath
- joinPath :: [FilePath] -> FilePath
- makeValid :: FilePath -> FilePath
- pathSeparator :: Char
- pathSeparators :: [Char]
- replaceBaseName :: FilePath -> String -> FilePath
- replaceDirectory :: FilePath -> String -> FilePath
- replaceExtension :: FilePath -> String -> FilePath
- replaceExtensions :: FilePath -> String -> FilePath
- replaceFileName :: FilePath -> String -> FilePath
- searchPathSeparator :: Char
- splitDirectories :: FilePath -> [FilePath]
- splitDrive :: FilePath -> (FilePath, FilePath)
- splitExtensions :: FilePath -> (FilePath, String)
- splitPath :: FilePath -> [FilePath]
- splitSearchPath :: String -> [FilePath]
- stripExtension :: String -> FilePath -> Maybe FilePath
- takeDrive :: FilePath -> FilePath
- takeExtensions :: FilePath -> String
- takeFileName :: FilePath -> FilePath
- weekAllDays :: DayOfWeek -> Day -> [Day]
- weekFirstDay :: DayOfWeek -> Day -> Day
- weekLastDay :: DayOfWeek -> Day -> Day
- barchar :: Char
- activity :: CliOpts -> Journal -> IO ()
- showHistogram :: ReportSpec -> Journal -> String
- printDayWith :: (PrintfArg t1, PrintfType t2) => (t3 -> t1) -> (DateSpan, t3) -> t2
- countBar :: Foldable t => t a -> [Char]
Documentation
Instances
FromJSON Char | |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey Char | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON Char | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey Char | |
Defined in Data.Aeson.Types.ToJSON | |
Data Char | |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char dataTypeOf :: Char -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Char) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) gmapT :: (forall b. Data b => b -> b) -> Char -> Char gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char | |
Bounded Char | |
Enum Char | |
Ix Char | |
Read Char | |
Show Char | |
IsChar Char | |
PrintfArg Char | |
Defined in Text.Printf | |
NFData Char | |
Defined in Control.DeepSeq | |
HasChars String | |
Eq Char | |
Ord Char | |
Hashable Char | |
Defined in Data.Hashable.Class | |
ToHtml String | |
TraversableStream String | |
Defined in Text.Megaparsec.Stream | |
VisualStream String | |
Defined in Text.Megaparsec.Stream | |
Pretty Char | Instead of
|
Defined in Prettyprinter.Internal | |
Uniform Char | |
Defined in System.Random.Internal Methods uniformM :: StatefulGen g m => g -> m Char # | |
UniformRange Char | |
Defined in System.Random.Internal | |
Extract String | |
Assertable String | |
Defined in Test.Tasty.HUnit.Orig | |
Unbox Char | |
Defined in Data.Vector.Unboxed.Base | |
TestCoercion SChar | |
Defined in GHC.TypeLits Methods testCoercion :: forall (a :: k) (b :: k). SChar a -> SChar b -> Maybe (Coercion a b) | |
TestEquality SChar | |
Defined in GHC.TypeLits Methods testEquality :: forall (a :: k) (b :: k). SChar a -> SChar b -> Maybe (a :~: b) | |
RegexLike Regexp String | |
Defined in Hledger.Utils.Regex Methods matchOnce :: Regexp -> String -> Maybe MatchArray # matchAll :: Regexp -> String -> [MatchArray] # matchCount :: Regexp -> String -> Int # matchTest :: Regexp -> String -> Bool # matchAllText :: Regexp -> String -> [MatchText String] # matchOnceText :: Regexp -> String -> Maybe (String, MatchText String, String) # | |
Lift Char | |
Vector Vector Char | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: Mutable Vector s Char -> ST s (Vector Char) # basicUnsafeThaw :: Vector Char -> ST s (Mutable Vector s Char) # basicLength :: Vector Char -> Int # basicUnsafeSlice :: Int -> Int -> Vector Char -> Vector Char # basicUnsafeIndexM :: Vector Char -> Int -> Box Char # basicUnsafeCopy :: Mutable Vector s Char -> Vector Char -> ST s () # | |
MVector MVector Char | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Char -> Int # basicUnsafeSlice :: Int -> Int -> MVector s Char -> MVector s Char # basicOverlaps :: MVector s Char -> MVector s Char -> Bool # basicUnsafeNew :: Int -> ST s (MVector s Char) # basicInitialize :: MVector s Char -> ST s () # basicUnsafeReplicate :: Int -> Char -> ST s (MVector s Char) # basicUnsafeRead :: MVector s Char -> Int -> ST s Char # basicUnsafeWrite :: MVector s Char -> Int -> Char -> ST s () # basicClear :: MVector s Char -> ST s () # basicSet :: MVector s Char -> Char -> ST s () # basicUnsafeCopy :: MVector s Char -> MVector s Char -> ST s () # basicUnsafeMove :: MVector s Char -> MVector s Char -> ST s () # basicUnsafeGrow :: MVector s Char -> Int -> ST s (MVector s Char) # | |
RegexContext Regexp String String | |
Generic1 (URec Char :: k -> Type) | |
Foldable (UChar :: Type -> Type) | |
Defined in Data.Foldable Methods fold :: Monoid m => UChar m -> m foldMap :: Monoid m => (a -> m) -> UChar a -> m foldMap' :: Monoid m => (a -> m) -> UChar a -> m foldr :: (a -> b -> b) -> b -> UChar a -> b # foldr' :: (a -> b -> b) -> b -> UChar a -> b foldl :: (b -> a -> b) -> b -> UChar a -> b # foldl' :: (b -> a -> b) -> b -> UChar a -> b # foldr1 :: (a -> a -> a) -> UChar a -> a # foldl1 :: (a -> a -> a) -> UChar a -> a # toList :: UChar a -> [a] elem :: Eq a => a -> UChar a -> Bool # maximum :: Ord a => UChar a -> a # minimum :: Ord a => UChar a -> a # | |
Traversable (UChar :: Type -> Type) | |
Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) sequenceA :: Applicative f => UChar (f a) -> f (UChar a) | |
OutputCap [Char] | |
Defined in System.Console.Terminfo.Base | |
TermStr [Char] | |
Defined in System.Console.Terminfo.Base | |
Functor (URec Char :: Type -> Type) | |
Generic (URec Char p) | |
Show (URec Char p) | |
Eq (URec Char p) | |
Ord (URec Char p) | |
Defined in GHC.Generics | |
newtype Vector Char | |
data URec Char (p :: k) | |
Defined in GHC.Generics | |
newtype MVector s Char | |
type Rep1 (URec Char :: k -> Type) | |
Defined in GHC.Generics | |
type Rep (URec Char p) | |
Defined in GHC.Generics |
Instances
FromJSON Ordering | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON Ordering | |
Defined in Data.Aeson.Types.ToJSON | |
Data Ordering | |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering toConstr :: Ordering -> Constr dataTypeOf :: Ordering -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering | |
Monoid Ordering | |
Semigroup Ordering | |
Bounded Ordering | |
Enum Ordering | |
Generic Ordering | |
Ix Ordering | |
Defined in GHC.Ix | |
Read Ordering | |
Show Ordering | |
Default Ordering | |
Defined in Data.Default.Class | |
NFData Ordering | |
Defined in Control.DeepSeq | |
Eq Ordering | |
Ord Ordering | |
Defined in GHC.Classes | |
Hashable Ordering | |
Defined in Data.Hashable.Class | |
type Rep Ordering | |
Defined in GHC.Generics type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1 :: Type -> Type))) |
Instances
FromJSON1 Maybe | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON1 Maybe | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Maybe a -> Value # liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Maybe a] -> Value # liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Maybe a -> Encoding # liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Maybe a] -> Encoding # liftOmitField :: (a -> Bool) -> Maybe a -> Bool # | |
MonadFail Maybe | |
Defined in Control.Monad.Fail | |
Foldable Maybe | |
Defined in Data.Foldable Methods fold :: Monoid m => Maybe m -> m foldMap :: Monoid m => (a -> m) -> Maybe a -> m foldMap' :: Monoid m => (a -> m) -> Maybe a -> m foldr :: (a -> b -> b) -> b -> Maybe a -> b # foldr' :: (a -> b -> b) -> b -> Maybe a -> b foldl :: (b -> a -> b) -> b -> Maybe a -> b # foldl' :: (b -> a -> b) -> b -> Maybe a -> b # foldr1 :: (a -> a -> a) -> Maybe a -> a # foldl1 :: (a -> a -> a) -> Maybe a -> a # elem :: Eq a => a -> Maybe a -> Bool # maximum :: Ord a => Maybe a -> a # minimum :: Ord a => Maybe a -> a # | |
Traversable Maybe | |
Alternative Maybe | |
Applicative Maybe | |
Functor Maybe | |
Monad Maybe | |
MonadPlus Maybe | |
NFData1 Maybe | |
Defined in Control.DeepSeq | |
MonadThrow Maybe | |
Defined in Control.Monad.Catch Methods throwM :: (HasCallStack, Exception e) => e -> Maybe a # | |
Hashable1 Maybe | |
Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> Maybe a -> Int # | |
Generic1 Maybe | |
Reportable Maybe e | |
Defined in Hledger.Reports.ReportOptions | |
Lift a => Lift (Maybe a :: Type) | |
FromJSON a => FromJSON (Maybe a) | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON a => ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON | |
Data a => Data (Maybe a) | |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) dataTypeOf :: Maybe a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) | |
Semigroup a => Monoid (Maybe a) | |
Semigroup a => Semigroup (Maybe a) | |
Generic (Maybe a) | |
SingKind a => SingKind (Maybe a) | |
Defined in GHC.Generics Associated Types type DemoteRep (Maybe a) | |
Read a => Read (Maybe a) | |
Show a => Show (Maybe a) | |
Default (Maybe a) | |
Defined in System.Console.CmdArgs.Default | |
Default (Maybe a) | |
Defined in Data.Default.Class | |
NFData a => NFData (Maybe a) | |
Defined in Control.DeepSeq | |
Eq a => Eq (Maybe a) | |
Ord a => Ord (Maybe a) | |
Hashable a => Hashable (Maybe a) | |
Defined in Data.Hashable.Class | |
HasAmounts a => HasAmounts (Maybe a) | |
Defined in Hledger.Data.Types Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Maybe a -> Maybe a # | |
MonoFoldable (Maybe a) | |
Defined in Data.MonoTraversable Methods ofoldMap :: Monoid m => (Element (Maybe a) -> m) -> Maybe a -> m # ofoldr :: (Element (Maybe a) -> b -> b) -> b -> Maybe a -> b # ofoldl' :: (a0 -> Element (Maybe a) -> a0) -> a0 -> Maybe a -> a0 # otoList :: Maybe a -> [Element (Maybe a)] # oall :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool # oany :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool # olength64 :: Maybe a -> Int64 # ocompareLength :: Integral i => Maybe a -> i -> Ordering # otraverse_ :: Applicative f => (Element (Maybe a) -> f b) -> Maybe a -> f () # ofor_ :: Applicative f => Maybe a -> (Element (Maybe a) -> f b) -> f () # omapM_ :: Applicative m => (Element (Maybe a) -> m ()) -> Maybe a -> m () # oforM_ :: Applicative m => Maybe a -> (Element (Maybe a) -> m ()) -> m () # ofoldlM :: Monad m => (a0 -> Element (Maybe a) -> m a0) -> a0 -> Maybe a -> m a0 # ofoldMap1Ex :: Semigroup m => (Element (Maybe a) -> m) -> Maybe a -> m # ofoldr1Ex :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) # ofoldl1Ex' :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) # headEx :: Maybe a -> Element (Maybe a) # lastEx :: Maybe a -> Element (Maybe a) # unsafeHead :: Maybe a -> Element (Maybe a) # unsafeLast :: Maybe a -> Element (Maybe a) # maximumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) # minimumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) # | |
MonoFunctor (Maybe a) | |
MonoPointed (Maybe a) | |
MonoTraversable (Maybe a) | |
Pretty a => Pretty (Maybe a) | Ignore
|
Defined in Prettyprinter.Internal | |
SingI ('Nothing :: Maybe a) | |
Defined in GHC.Generics | |
Each (Maybe a) (Maybe b) a b | |
SingI a2 => SingI ('Just a2 :: Maybe a1) | |
Defined in GHC.Generics | |
type Rep1 Maybe | |
Defined in GHC.Generics | |
type DemoteRep (Maybe a) | |
Defined in GHC.Generics | |
type Rep (Maybe a) | |
Defined in GHC.Generics | |
data Sing (b :: Maybe a) | |
type Element (Maybe a) | |
Defined in Data.MonoTraversable |
Arguments
= MixedAmount | A change in balance during a certain period. |
Instances
Ord DL | |
Ord DotNetTime | |
Defined in Data.Aeson.Types.Internal Methods compare :: DotNetTime -> DotNetTime -> Ordering # (<) :: DotNetTime -> DotNetTime -> Bool # (<=) :: DotNetTime -> DotNetTime -> Bool # (>) :: DotNetTime -> DotNetTime -> Bool # (>=) :: DotNetTime -> DotNetTime -> Bool # max :: DotNetTime -> DotNetTime -> DotNetTime # min :: DotNetTime -> DotNetTime -> DotNetTime # | |
Ord JSONPathElement | |
Defined in Data.Aeson.Types.Internal Methods compare :: JSONPathElement -> JSONPathElement -> Ordering # (<) :: JSONPathElement -> JSONPathElement -> Bool # (<=) :: JSONPathElement -> JSONPathElement -> Bool # (>) :: JSONPathElement -> JSONPathElement -> Bool # (>=) :: JSONPathElement -> JSONPathElement -> Bool # max :: JSONPathElement -> JSONPathElement -> JSONPathElement # min :: JSONPathElement -> JSONPathElement -> JSONPathElement # | |
Ord Value | The ordering is total, consistent with Since: aeson-1.5.2.0 |
Ord BlinkSpeed | |
Defined in System.Console.ANSI.Types Methods compare :: BlinkSpeed -> BlinkSpeed -> Ordering # (<) :: BlinkSpeed -> BlinkSpeed -> Bool # (<=) :: BlinkSpeed -> BlinkSpeed -> Bool # (>) :: BlinkSpeed -> BlinkSpeed -> Bool # (>=) :: BlinkSpeed -> BlinkSpeed -> Bool # max :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed # min :: BlinkSpeed -> BlinkSpeed -> BlinkSpeed # | |
Ord Color | |
Ord ColorIntensity | |
Defined in System.Console.ANSI.Types Methods compare :: ColorIntensity -> ColorIntensity -> Ordering # (<) :: ColorIntensity -> ColorIntensity -> Bool # (<=) :: ColorIntensity -> ColorIntensity -> Bool # (>) :: ColorIntensity -> ColorIntensity -> Bool # (>=) :: ColorIntensity -> ColorIntensity -> Bool # max :: ColorIntensity -> ColorIntensity -> ColorIntensity # min :: ColorIntensity -> ColorIntensity -> ColorIntensity # | |
Ord ConsoleIntensity | |
Defined in System.Console.ANSI.Types Methods compare :: ConsoleIntensity -> ConsoleIntensity -> Ordering # (<) :: ConsoleIntensity -> ConsoleIntensity -> Bool # (<=) :: ConsoleIntensity -> ConsoleIntensity -> Bool # (>) :: ConsoleIntensity -> ConsoleIntensity -> Bool # (>=) :: ConsoleIntensity -> ConsoleIntensity -> Bool # max :: ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity # min :: ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity # | |
Ord ConsoleLayer | |
Defined in System.Console.ANSI.Types Methods compare :: ConsoleLayer -> ConsoleLayer -> Ordering # (<) :: ConsoleLayer -> ConsoleLayer -> Bool # (<=) :: ConsoleLayer -> ConsoleLayer -> Bool # (>) :: ConsoleLayer -> ConsoleLayer -> Bool # (>=) :: ConsoleLayer -> ConsoleLayer -> Bool # max :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer # min :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer # | |
Ord Underlining | |
Defined in System.Console.ANSI.Types Methods compare :: Underlining -> Underlining -> Ordering # (<) :: Underlining -> Underlining -> Bool # (<=) :: Underlining -> Underlining -> Bool # (>) :: Underlining -> Underlining -> Bool # (>=) :: Underlining -> Underlining -> Bool # max :: Underlining -> Underlining -> Underlining # min :: Underlining -> Underlining -> Underlining # | |
Ord Pos | |
Ord ByteArray | |
Ord All | |
Ord Any | |
Ord SomeTypeRep | |
Defined in Data.Typeable.Internal | |
Ord Version | |
Ord Void | |
Ord BlockReason | |
Defined in GHC.Conc.Sync | |
Ord ThreadId | |
Defined in GHC.Conc.Sync | |
Ord ThreadStatus | |
Defined in GHC.Conc.Sync | |
Ord ErrorCall | |
Ord ArithException | |
Defined in GHC.Exception.Type Methods compare :: ArithException -> ArithException -> Ordering # (<) :: ArithException -> ArithException -> Bool # (<=) :: ArithException -> ArithException -> Bool # (>) :: ArithException -> ArithException -> Bool # (>=) :: ArithException -> ArithException -> Bool # | |
Ord Associativity | |
Defined in GHC.Generics Methods compare :: Associativity -> Associativity -> Ordering # (<) :: Associativity -> Associativity -> Bool # (<=) :: Associativity -> Associativity -> Bool # (>) :: Associativity -> Associativity -> Bool # (>=) :: Associativity -> Associativity -> Bool # | |
Ord DecidedStrictness | |
Defined in GHC.Generics Methods compare :: DecidedStrictness -> DecidedStrictness -> Ordering # (<) :: DecidedStrictness -> DecidedStrictness -> Bool # (<=) :: DecidedStrictness -> DecidedStrictness -> Bool # (>) :: DecidedStrictness -> DecidedStrictness -> Bool # (>=) :: DecidedStrictness -> DecidedStrictness -> Bool # max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # | |
Ord Fixity | |
Ord SourceStrictness | |
Defined in GHC.Generics Methods compare :: SourceStrictness -> SourceStrictness -> Ordering # (<) :: SourceStrictness -> SourceStrictness -> Bool # (<=) :: SourceStrictness -> SourceStrictness -> Bool # (>) :: SourceStrictness -> SourceStrictness -> Bool # (>=) :: SourceStrictness -> SourceStrictness -> Bool # max :: SourceStrictness -> SourceStrictness -> SourceStrictness # min :: SourceStrictness -> SourceStrictness -> SourceStrictness # | |
Ord SourceUnpackedness | |
Defined in GHC.Generics Methods compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering # (<) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # | |
Ord SeekMode | |
Defined in GHC.IO.Device | |
Ord ArrayException | |
Defined in GHC.IO.Exception Methods compare :: ArrayException -> ArrayException -> Ordering # (<) :: ArrayException -> ArrayException -> Bool # (<=) :: ArrayException -> ArrayException -> Bool # (>) :: ArrayException -> ArrayException -> Bool # (>=) :: ArrayException -> ArrayException -> Bool # | |
Ord AsyncException | |
Defined in GHC.IO.Exception Methods compare :: AsyncException -> AsyncException -> Ordering # (<) :: AsyncException -> AsyncException -> Bool # (<=) :: AsyncException -> AsyncException -> Bool # (>) :: AsyncException -> AsyncException -> Bool # (>=) :: AsyncException -> AsyncException -> Bool # | |
Ord ExitCode | |
Defined in GHC.IO.Exception | |
Ord BufferMode | |
Defined in GHC.IO.Handle.Types Methods compare :: BufferMode -> BufferMode -> Ordering # (<) :: BufferMode -> BufferMode -> Bool # (<=) :: BufferMode -> BufferMode -> Bool # (>) :: BufferMode -> BufferMode -> Bool # (>=) :: BufferMode -> BufferMode -> Bool # max :: BufferMode -> BufferMode -> BufferMode # min :: BufferMode -> BufferMode -> BufferMode # | |
Ord Newline | |
Ord NewlineMode | |
Defined in GHC.IO.Handle.Types Methods compare :: NewlineMode -> NewlineMode -> Ordering # (<) :: NewlineMode -> NewlineMode -> Bool # (<=) :: NewlineMode -> NewlineMode -> Bool # (>) :: NewlineMode -> NewlineMode -> Bool # (>=) :: NewlineMode -> NewlineMode -> Bool # max :: NewlineMode -> NewlineMode -> NewlineMode # min :: NewlineMode -> NewlineMode -> NewlineMode # | |
Ord IOMode | |
Ord SomeChar | |
Defined in GHC.TypeLits | |
Ord SomeSymbol | |
Ord SomeNat | |
Ord GeneralCategory | |
Defined in GHC.Unicode Methods compare :: GeneralCategory -> GeneralCategory -> Ordering # (<) :: GeneralCategory -> GeneralCategory -> Bool # (<=) :: GeneralCategory -> GeneralCategory -> Bool # (>) :: GeneralCategory -> GeneralCategory -> Bool # (>=) :: GeneralCategory -> GeneralCategory -> Bool # max :: GeneralCategory -> GeneralCategory -> GeneralCategory # min :: GeneralCategory -> GeneralCategory -> GeneralCategory # | |
Ord Word16 | |
Ord Word32 | |
Ord Word64 | |
Ord Word8 | |
Ord CBlkCnt | |
Ord CBlkSize | |
Defined in System.Posix.Types | |
Ord CCc | |
Ord CClockId | |
Defined in System.Posix.Types | |
Ord CDev | |
Ord CFsBlkCnt | |
Ord CFsFilCnt | |
Ord CGid | |
Ord CId | |
Ord CIno | |
Ord CKey | |
Ord CMode | |
Ord CNfds | |
Ord CNlink | |
Ord COff | |
Ord CPid | |
Ord CRLim | |
Ord CSocklen | |
Defined in System.Posix.Types | |
Ord CSpeed | |
Ord CSsize | |
Ord CTcflag | |
Ord CTimer | |
Ord CUid | |
Ord Fd | |
Ord ByteString | |
Defined in Data.ByteString.Internal.Type Methods compare :: ByteString -> ByteString -> Ordering # (<) :: ByteString -> ByteString -> Bool # (<=) :: ByteString -> ByteString -> Bool # (>) :: ByteString -> ByteString -> Bool # (>=) :: ByteString -> ByteString -> Bool # max :: ByteString -> ByteString -> ByteString # min :: ByteString -> ByteString -> ByteString # | |
Ord ByteString | |
Defined in Data.ByteString.Lazy.Internal Methods compare :: ByteString -> ByteString -> Ordering # (<) :: ByteString -> ByteString -> Bool # (<=) :: ByteString -> ByteString -> Bool # (>) :: ByteString -> ByteString -> Bool # (>=) :: ByteString -> ByteString -> Bool # max :: ByteString -> ByteString -> ByteString # min :: ByteString -> ByteString -> ByteString # | |
Ord ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods compare :: ShortByteString -> ShortByteString -> Ordering # (<) :: ShortByteString -> ShortByteString -> Bool # (<=) :: ShortByteString -> ShortByteString -> Bool # (>) :: ShortByteString -> ShortByteString -> Bool # (>=) :: ShortByteString -> ShortByteString -> Bool # max :: ShortByteString -> ShortByteString -> ShortByteString # min :: ShortByteString -> ShortByteString -> ShortByteString # | |
Ord Complete | |
Defined in System.Console.CmdArgs.Explicit.Complete | |
Ord HelpFormat | |
Defined in System.Console.CmdArgs.Explicit.Help Methods compare :: HelpFormat -> HelpFormat -> Ordering # (<) :: HelpFormat -> HelpFormat -> Bool # (<=) :: HelpFormat -> HelpFormat -> Bool # (>) :: HelpFormat -> HelpFormat -> Bool # (>=) :: HelpFormat -> HelpFormat -> Bool # max :: HelpFormat -> HelpFormat -> HelpFormat # min :: HelpFormat -> HelpFormat -> HelpFormat # | |
Ord FlagInfo | |
Defined in System.Console.CmdArgs.Explicit.Type | |
Ord Ann | |
Ord CmdArgsPrivate | |
Defined in System.Console.CmdArgs.Implicit.Type Methods compare :: CmdArgsPrivate -> CmdArgsPrivate -> Ordering # (<) :: CmdArgsPrivate -> CmdArgsPrivate -> Bool # (<=) :: CmdArgsPrivate -> CmdArgsPrivate -> Bool # (>) :: CmdArgsPrivate -> CmdArgsPrivate -> Bool # (>=) :: CmdArgsPrivate -> CmdArgsPrivate -> Bool # | |
Ord TextFormat | |
Defined in System.Console.CmdArgs.Text Methods compare :: TextFormat -> TextFormat -> Ordering # (<) :: TextFormat -> TextFormat -> Bool # (<=) :: TextFormat -> TextFormat -> Bool # (>) :: TextFormat -> TextFormat -> Bool # (>=) :: TextFormat -> TextFormat -> Bool # max :: TextFormat -> TextFormat -> TextFormat # min :: TextFormat -> TextFormat -> TextFormat # | |
Ord Verbosity | |
Defined in System.Console.CmdArgs.Verbosity | |
Ord IntSet | |
Ord FileType | |
Defined in System.Directory.Internal.Common | |
Ord Permissions | |
Defined in System.Directory.Internal.Common Methods compare :: Permissions -> Permissions -> Ordering # (<) :: Permissions -> Permissions -> Bool # (<=) :: Permissions -> Permissions -> Bool # (>) :: Permissions -> Permissions -> Bool # (>=) :: Permissions -> Permissions -> Bool # max :: Permissions -> Permissions -> Permissions # min :: Permissions -> Permissions -> Permissions # | |
Ord XdgDirectory | |
Defined in System.Directory.Internal.Common Methods compare :: XdgDirectory -> XdgDirectory -> Ordering # (<) :: XdgDirectory -> XdgDirectory -> Bool # (<=) :: XdgDirectory -> XdgDirectory -> Bool # (>) :: XdgDirectory -> XdgDirectory -> Bool # (>=) :: XdgDirectory -> XdgDirectory -> Bool # max :: XdgDirectory -> XdgDirectory -> XdgDirectory # min :: XdgDirectory -> XdgDirectory -> XdgDirectory # | |
Ord XdgDirectoryList | |
Defined in System.Directory.Internal.Common Methods compare :: XdgDirectoryList -> XdgDirectoryList -> Ordering # (<) :: XdgDirectoryList -> XdgDirectoryList -> Bool # (<=) :: XdgDirectoryList -> XdgDirectoryList -> Bool # (>) :: XdgDirectoryList -> XdgDirectoryList -> Bool # (>=) :: XdgDirectoryList -> XdgDirectoryList -> Bool # max :: XdgDirectoryList -> XdgDirectoryList -> XdgDirectoryList # min :: XdgDirectoryList -> XdgDirectoryList -> XdgDirectoryList # | |
Ord OsChar | |
Ord OsString | |
Defined in System.OsString.Internal.Types | |
Ord PosixChar | |
Ord PosixString | |
Defined in System.OsString.Internal.Types | |
Ord WindowsChar | |
Defined in System.OsString.Internal.Types | |
Ord WindowsString | |
Defined in System.OsString.Internal.Types Methods compare :: WindowsString -> WindowsString -> Ordering # (<) :: WindowsString -> WindowsString -> Bool # (<=) :: WindowsString -> WindowsString -> Bool # (>) :: WindowsString -> WindowsString -> Bool # (>=) :: WindowsString -> WindowsString -> Bool # | |
Ord BigNat | |
Ord Extension | |
Ord Ordering | |
Defined in GHC.Classes | |
Ord TyCon | |
Ord Completion | |
Defined in System.Console.Haskeline.Completion | |
Ord AccountAlias | |
Defined in Hledger.Data.Types Methods compare :: AccountAlias -> AccountAlias -> Ordering # (<) :: AccountAlias -> AccountAlias -> Bool # (<=) :: AccountAlias -> AccountAlias -> Bool # (>) :: AccountAlias -> AccountAlias -> Bool # (>=) :: AccountAlias -> AccountAlias -> Bool # max :: AccountAlias -> AccountAlias -> AccountAlias # min :: AccountAlias -> AccountAlias -> AccountAlias # | |
Ord AccountType | |
Defined in Hledger.Data.Types Methods compare :: AccountType -> AccountType -> Ordering # (<) :: AccountType -> AccountType -> Bool # (<=) :: AccountType -> AccountType -> Bool # (>) :: AccountType -> AccountType -> Bool # (>=) :: AccountType -> AccountType -> Bool # max :: AccountType -> AccountType -> AccountType # min :: AccountType -> AccountType -> AccountType # | |
Ord Amount | |
Ord AmountPrecision | |
Defined in Hledger.Data.Types Methods compare :: AmountPrecision -> AmountPrecision -> Ordering # (<) :: AmountPrecision -> AmountPrecision -> Bool # (<=) :: AmountPrecision -> AmountPrecision -> Bool # (>) :: AmountPrecision -> AmountPrecision -> Bool # (>=) :: AmountPrecision -> AmountPrecision -> Bool # max :: AmountPrecision -> AmountPrecision -> AmountPrecision # min :: AmountPrecision -> AmountPrecision -> AmountPrecision # | |
Ord AmountPrice | |
Defined in Hledger.Data.Types Methods compare :: AmountPrice -> AmountPrice -> Ordering # (<) :: AmountPrice -> AmountPrice -> Bool # (<=) :: AmountPrice -> AmountPrice -> Bool # (>) :: AmountPrice -> AmountPrice -> Bool # (>=) :: AmountPrice -> AmountPrice -> Bool # max :: AmountPrice -> AmountPrice -> AmountPrice # min :: AmountPrice -> AmountPrice -> AmountPrice # | |
Ord AmountStyle | |
Defined in Hledger.Data.Types Methods compare :: AmountStyle -> AmountStyle -> Ordering # (<) :: AmountStyle -> AmountStyle -> Bool # (<=) :: AmountStyle -> AmountStyle -> Bool # (>) :: AmountStyle -> AmountStyle -> Bool # (>=) :: AmountStyle -> AmountStyle -> Bool # max :: AmountStyle -> AmountStyle -> AmountStyle # min :: AmountStyle -> AmountStyle -> AmountStyle # | |
Ord DateSpan | |
Defined in Hledger.Data.Types | |
Ord DigitGroupStyle | |
Defined in Hledger.Data.Types Methods compare :: DigitGroupStyle -> DigitGroupStyle -> Ordering # (<) :: DigitGroupStyle -> DigitGroupStyle -> Bool # (<=) :: DigitGroupStyle -> DigitGroupStyle -> Bool # (>) :: DigitGroupStyle -> DigitGroupStyle -> Bool # (>=) :: DigitGroupStyle -> DigitGroupStyle -> Bool # max :: DigitGroupStyle -> DigitGroupStyle -> DigitGroupStyle # min :: DigitGroupStyle -> DigitGroupStyle -> DigitGroupStyle # | |
Ord EFDay | |
Ord Interval | |
Defined in Hledger.Data.Types | |
Ord MarketPrice | |
Defined in Hledger.Data.Types Methods compare :: MarketPrice -> MarketPrice -> Ordering # (<) :: MarketPrice -> MarketPrice -> Bool # (<=) :: MarketPrice -> MarketPrice -> Bool # (>) :: MarketPrice -> MarketPrice -> Bool # (>=) :: MarketPrice -> MarketPrice -> Bool # max :: MarketPrice -> MarketPrice -> MarketPrice # min :: MarketPrice -> MarketPrice -> MarketPrice # | |
Ord MixedAmount | |
Defined in Hledger.Data.Types Methods compare :: MixedAmount -> MixedAmount -> Ordering # (<) :: MixedAmount -> MixedAmount -> Bool # (<=) :: MixedAmount -> MixedAmount -> Bool # (>) :: MixedAmount -> MixedAmount -> Bool # (>=) :: MixedAmount -> MixedAmount -> Bool # max :: MixedAmount -> MixedAmount -> MixedAmount # min :: MixedAmount -> MixedAmount -> MixedAmount # | |
Ord MixedAmountKey | We don't auto-derive the Ord instance because it would give an undesired ordering. We want the keys to be sorted lexicographically: (1) By the primary commodity of the amount. (2) By the commodity of the price, with no price being first. (3) By the unit price, from most negative to most positive, with total prices before unit prices. For example, we would like the ordering to give MixedAmountKeyNoPrice X < MixedAmountKeyTotalPrice X Z < MixedAmountKeyNoPrice Y |
Defined in Hledger.Data.Types Methods compare :: MixedAmountKey -> MixedAmountKey -> Ordering # (<) :: MixedAmountKey -> MixedAmountKey -> Bool # (<=) :: MixedAmountKey -> MixedAmountKey -> Bool # (>) :: MixedAmountKey -> MixedAmountKey -> Bool # (>=) :: MixedAmountKey -> MixedAmountKey -> Bool # max :: MixedAmountKey -> MixedAmountKey -> MixedAmountKey # min :: MixedAmountKey -> MixedAmountKey -> MixedAmountKey # | |
Ord Period | |
Ord PriceDirective | |
Defined in Hledger.Data.Types Methods compare :: PriceDirective -> PriceDirective -> Ordering # (<) :: PriceDirective -> PriceDirective -> Bool # (<=) :: PriceDirective -> PriceDirective -> Bool # (>) :: PriceDirective -> PriceDirective -> Bool # (>=) :: PriceDirective -> PriceDirective -> Bool # max :: PriceDirective -> PriceDirective -> PriceDirective # min :: PriceDirective -> PriceDirective -> PriceDirective # | |
Ord Side | |
Ord Status | |
Ord TimeclockCode | |
Defined in Hledger.Data.Types Methods compare :: TimeclockCode -> TimeclockCode -> Ordering # (<) :: TimeclockCode -> TimeclockCode -> Bool # (<=) :: TimeclockCode -> TimeclockCode -> Bool # (>) :: TimeclockCode -> TimeclockCode -> Bool # (>=) :: TimeclockCode -> TimeclockCode -> Bool # max :: TimeclockCode -> TimeclockCode -> TimeclockCode # min :: TimeclockCode -> TimeclockCode -> TimeclockCode # | |
Ord TimeclockEntry | |
Defined in Hledger.Data.Types Methods compare :: TimeclockEntry -> TimeclockEntry -> Ordering # (<) :: TimeclockEntry -> TimeclockEntry -> Bool # (<=) :: TimeclockEntry -> TimeclockEntry -> Bool # (>) :: TimeclockEntry -> TimeclockEntry -> Bool # (>=) :: TimeclockEntry -> TimeclockEntry -> Bool # max :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry # min :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry # | |
Ord DisplayName | |
Defined in Hledger.Reports.ReportTypes Methods compare :: DisplayName -> DisplayName -> Ordering # (<) :: DisplayName -> DisplayName -> Bool # (<=) :: DisplayName -> DisplayName -> Bool # (>) :: DisplayName -> DisplayName -> Bool # (>=) :: DisplayName -> DisplayName -> Bool # max :: DisplayName -> DisplayName -> DisplayName # min :: DisplayName -> DisplayName -> DisplayName # | |
Ord Regexp | |
Ord HledgerParseErrorData | |
Defined in Text.Megaparsec.Custom Methods compare :: HledgerParseErrorData -> HledgerParseErrorData -> Ordering # (<) :: HledgerParseErrorData -> HledgerParseErrorData -> Bool # (<=) :: HledgerParseErrorData -> HledgerParseErrorData -> Bool # (>) :: HledgerParseErrorData -> HledgerParseErrorData -> Bool # (>=) :: HledgerParseErrorData -> HledgerParseErrorData -> Bool # max :: HledgerParseErrorData -> HledgerParseErrorData -> HledgerParseErrorData # min :: HledgerParseErrorData -> HledgerParseErrorData -> HledgerParseErrorData # | |
Ord Pos | |
Ord SourcePos | |
Ord URI | |
Ord URIAuth | |
Ord FusionDepth | |
Defined in Prettyprinter.Internal Methods compare :: FusionDepth -> FusionDepth -> Ordering # (<) :: FusionDepth -> FusionDepth -> Bool # (<=) :: FusionDepth -> FusionDepth -> Bool # (>) :: FusionDepth -> FusionDepth -> Bool # (>=) :: FusionDepth -> FusionDepth -> Bool # max :: FusionDepth -> FusionDepth -> FusionDepth # min :: FusionDepth -> FusionDepth -> FusionDepth # | |
Ord LayoutOptions | |
Defined in Prettyprinter.Internal Methods compare :: LayoutOptions -> LayoutOptions -> Ordering # (<) :: LayoutOptions -> LayoutOptions -> Bool # (<=) :: LayoutOptions -> LayoutOptions -> Bool # (>) :: LayoutOptions -> LayoutOptions -> Bool # (>=) :: LayoutOptions -> LayoutOptions -> Bool # max :: LayoutOptions -> LayoutOptions -> LayoutOptions # min :: LayoutOptions -> LayoutOptions -> LayoutOptions # | |
Ord PageWidth | |
Ord AnsiStyle | |
Defined in Prettyprinter.Render.Terminal.Internal | |
Ord Bold | |
Ord Color | |
Ord Intensity | |
Defined in Prettyprinter.Render.Terminal.Internal | |
Ord Italicized | |
Defined in Prettyprinter.Render.Terminal.Internal Methods compare :: Italicized -> Italicized -> Ordering # (<) :: Italicized -> Italicized -> Bool # (<=) :: Italicized -> Italicized -> Bool # (>) :: Italicized -> Italicized -> Bool # (>=) :: Italicized -> Italicized -> Bool # max :: Italicized -> Italicized -> Italicized # min :: Italicized -> Italicized -> Italicized # | |
Ord Layer | |
Ord Underlined | |
Defined in Prettyprinter.Render.Terminal.Internal Methods compare :: Underlined -> Underlined -> Ordering # (<) :: Underlined -> Underlined -> Bool # (<=) :: Underlined -> Underlined -> Bool # (>) :: Underlined -> Underlined -> Bool # (>=) :: Underlined -> Underlined -> Bool # max :: Underlined -> Underlined -> Underlined # min :: Underlined -> Underlined -> Underlined # | |
Ord DoPa | |
Ord WhichTest | |
Ord Scientific | Scientific numbers can be safely compared for ordering. No magnitude |
Defined in Data.Scientific Methods compare :: Scientific -> Scientific -> Ordering # (<) :: Scientific -> Scientific -> Bool # (<=) :: Scientific -> Scientific -> Bool # (>) :: Scientific -> Scientific -> Bool # (>=) :: Scientific -> Scientific -> Bool # max :: Scientific -> Scientific -> Scientific # min :: Scientific -> Scientific -> Scientific # | |
Ord HideProgress | |
Defined in Test.Tasty.Options.Core | |
Ord NumThreads | |
Defined in Test.Tasty.Options.Core Methods compare :: NumThreads -> NumThreads -> Ordering # (<) :: NumThreads -> NumThreads -> Bool # (<=) :: NumThreads -> NumThreads -> Bool # (>) :: NumThreads -> NumThreads -> Bool # (>=) :: NumThreads -> NumThreads -> Bool # max :: NumThreads -> NumThreads -> NumThreads # min :: NumThreads -> NumThreads -> NumThreads # | |
Ord AnnLookup | |
Ord AnnTarget | |
Ord Bang | |
Ord Body | |
Ord Bytes | |
Ord Callconv | |
Defined in Language.Haskell.TH.Syntax | |
Ord Clause | |
Ord Con | |
Ord Dec | |
Ord DecidedStrictness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: DecidedStrictness -> DecidedStrictness -> Ordering # (<) :: DecidedStrictness -> DecidedStrictness -> Bool # (<=) :: DecidedStrictness -> DecidedStrictness -> Bool # (>) :: DecidedStrictness -> DecidedStrictness -> Bool # (>=) :: DecidedStrictness -> DecidedStrictness -> Bool # max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # | |
Ord DerivClause | |
Defined in Language.Haskell.TH.Syntax | |
Ord DerivStrategy | |
Defined in Language.Haskell.TH.Syntax Methods compare :: DerivStrategy -> DerivStrategy -> Ordering # (<) :: DerivStrategy -> DerivStrategy -> Bool # (<=) :: DerivStrategy -> DerivStrategy -> Bool # (>) :: DerivStrategy -> DerivStrategy -> Bool # (>=) :: DerivStrategy -> DerivStrategy -> Bool # | |
Ord DocLoc | |
Ord Exp | |
Ord FamilyResultSig | |
Defined in Language.Haskell.TH.Syntax Methods compare :: FamilyResultSig -> FamilyResultSig -> Ordering # (<) :: FamilyResultSig -> FamilyResultSig -> Bool # (<=) :: FamilyResultSig -> FamilyResultSig -> Bool # (>) :: FamilyResultSig -> FamilyResultSig -> Bool # (>=) :: FamilyResultSig -> FamilyResultSig -> Bool # max :: FamilyResultSig -> FamilyResultSig -> FamilyResultSig # min :: FamilyResultSig -> FamilyResultSig -> FamilyResultSig # | |
Ord Fixity | |
Ord FixityDirection | |
Defined in Language.Haskell.TH.Syntax Methods compare :: FixityDirection -> FixityDirection -> Ordering # (<) :: FixityDirection -> FixityDirection -> Bool # (<=) :: FixityDirection -> FixityDirection -> Bool # (>) :: FixityDirection -> FixityDirection -> Bool # (>=) :: FixityDirection -> FixityDirection -> Bool # max :: FixityDirection -> FixityDirection -> FixityDirection # min :: FixityDirection -> FixityDirection -> FixityDirection # | |
Ord Foreign | |
Defined in Language.Haskell.TH.Syntax | |
Ord FunDep | |
Ord Guard | |
Ord Info | |
Ord InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Methods compare :: InjectivityAnn -> InjectivityAnn -> Ordering # (<) :: InjectivityAnn -> InjectivityAnn -> Bool # (<=) :: InjectivityAnn -> InjectivityAnn -> Bool # (>) :: InjectivityAnn -> InjectivityAnn -> Bool # (>=) :: InjectivityAnn -> InjectivityAnn -> Bool # | |
Ord Inline | |
Ord Lit | |
Ord Loc | |
Ord Match | |
Ord ModName | |
Defined in Language.Haskell.TH.Syntax | |
Ord Module | |
Ord ModuleInfo | |
Defined in Language.Haskell.TH.Syntax | |
Ord Name | |
Ord NameFlavour | |
Defined in Language.Haskell.TH.Syntax | |
Ord NameSpace | |
Ord OccName | |
Defined in Language.Haskell.TH.Syntax | |
Ord Overlap | |
Defined in Language.Haskell.TH.Syntax | |
Ord Pat | |
Ord PatSynArgs | |
Defined in Language.Haskell.TH.Syntax | |
Ord PatSynDir | |
Ord Phases | |
Ord PkgName | |
Defined in Language.Haskell.TH.Syntax | |
Ord Pragma | |
Ord Range | |
Ord Role | |
Ord RuleBndr | |
Defined in Language.Haskell.TH.Syntax | |
Ord RuleMatch | |
Ord Safety | |
Ord SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceStrictness -> SourceStrictness -> Ordering # (<) :: SourceStrictness -> SourceStrictness -> Bool # (<=) :: SourceStrictness -> SourceStrictness -> Bool # (>) :: SourceStrictness -> SourceStrictness -> Bool # (>=) :: SourceStrictness -> SourceStrictness -> Bool # max :: SourceStrictness -> SourceStrictness -> SourceStrictness # min :: SourceStrictness -> SourceStrictness -> SourceStrictness # | |
Ord SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering # (<) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # | |
Ord Specificity | |
Defined in Language.Haskell.TH.Syntax Methods compare :: Specificity -> Specificity -> Ordering # (<) :: Specificity -> Specificity -> Bool # (<=) :: Specificity -> Specificity -> Bool # (>) :: Specificity -> Specificity -> Bool # (>=) :: Specificity -> Specificity -> Bool # max :: Specificity -> Specificity -> Specificity # min :: Specificity -> Specificity -> Specificity # | |
Ord Stmt | |
Ord TyLit | |
Ord TySynEqn | |
Defined in Language.Haskell.TH.Syntax | |
Ord Type | |
Ord TypeFamilyHead | |
Defined in Language.Haskell.TH.Syntax Methods compare :: TypeFamilyHead -> TypeFamilyHead -> Ordering # (<) :: TypeFamilyHead -> TypeFamilyHead -> Bool # (<=) :: TypeFamilyHead -> TypeFamilyHead -> Bool # (>) :: TypeFamilyHead -> TypeFamilyHead -> Bool # (>=) :: TypeFamilyHead -> TypeFamilyHead -> Bool # | |
Ord Color | |
Ord Builder | |
Defined in Data.Text.Internal.Builder | |
Ord B | |
Ord ShortText | |
Ord ConstructorVariant | |
Defined in Language.Haskell.TH.Datatype Methods compare :: ConstructorVariant -> ConstructorVariant -> Ordering # (<) :: ConstructorVariant -> ConstructorVariant -> Bool # (<=) :: ConstructorVariant -> ConstructorVariant -> Bool # (>) :: ConstructorVariant -> ConstructorVariant -> Bool # (>=) :: ConstructorVariant -> ConstructorVariant -> Bool # max :: ConstructorVariant -> ConstructorVariant -> ConstructorVariant # min :: ConstructorVariant -> ConstructorVariant -> ConstructorVariant # | |
Ord DatatypeVariant | |
Defined in Language.Haskell.TH.Datatype Methods compare :: DatatypeVariant -> DatatypeVariant -> Ordering # (<) :: DatatypeVariant -> DatatypeVariant -> Bool # (<=) :: DatatypeVariant -> DatatypeVariant -> Bool # (>) :: DatatypeVariant -> DatatypeVariant -> Bool # (>=) :: DatatypeVariant -> DatatypeVariant -> Bool # max :: DatatypeVariant -> DatatypeVariant -> DatatypeVariant # min :: DatatypeVariant -> DatatypeVariant -> DatatypeVariant # | |
Ord FieldStrictness | |
Defined in Language.Haskell.TH.Datatype Methods compare :: FieldStrictness -> FieldStrictness -> Ordering # (<) :: FieldStrictness -> FieldStrictness -> Bool # (<=) :: FieldStrictness -> FieldStrictness -> Bool # (>) :: FieldStrictness -> FieldStrictness -> Bool # (>=) :: FieldStrictness -> FieldStrictness -> Bool # max :: FieldStrictness -> FieldStrictness -> FieldStrictness # min :: FieldStrictness -> FieldStrictness -> FieldStrictness # | |
Ord Strictness | |
Defined in Language.Haskell.TH.Datatype Methods compare :: Strictness -> Strictness -> Ordering # (<) :: Strictness -> Strictness -> Bool # (<=) :: Strictness -> Strictness -> Bool # (>) :: Strictness -> Strictness -> Bool # (>=) :: Strictness -> Strictness -> Bool # max :: Strictness -> Strictness -> Strictness # min :: Strictness -> Strictness -> Strictness # | |
Ord Unpackedness | |
Defined in Language.Haskell.TH.Datatype Methods compare :: Unpackedness -> Unpackedness -> Ordering # (<) :: Unpackedness -> Unpackedness -> Bool # (<=) :: Unpackedness -> Unpackedness -> Bool # (>) :: Unpackedness -> Unpackedness -> Bool # (>=) :: Unpackedness -> Unpackedness -> Bool # max :: Unpackedness -> Unpackedness -> Unpackedness # min :: Unpackedness -> Unpackedness -> Unpackedness # | |
Ord Day | |
Ord DayOfWeek | |
Ord DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime | |
Ord NominalDiffTime | |
Defined in Data.Time.Clock.Internal.NominalDiffTime Methods compare :: NominalDiffTime -> NominalDiffTime -> Ordering # (<) :: NominalDiffTime -> NominalDiffTime -> Bool # (<=) :: NominalDiffTime -> NominalDiffTime -> Bool # (>) :: NominalDiffTime -> NominalDiffTime -> Bool # (>=) :: NominalDiffTime -> NominalDiffTime -> Bool # max :: NominalDiffTime -> NominalDiffTime -> NominalDiffTime # min :: NominalDiffTime -> NominalDiffTime -> NominalDiffTime # | |
Ord SystemTime | |
Defined in Data.Time.Clock.Internal.SystemTime Methods compare :: SystemTime -> SystemTime -> Ordering # (<) :: SystemTime -> SystemTime -> Bool # (<=) :: SystemTime -> SystemTime -> Bool # (>) :: SystemTime -> SystemTime -> Bool # (>=) :: SystemTime -> SystemTime -> Bool # max :: SystemTime -> SystemTime -> SystemTime # min :: SystemTime -> SystemTime -> SystemTime # | |
Ord UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
Ord UniversalTime | |
Defined in Data.Time.Clock.Internal.UniversalTime Methods compare :: UniversalTime -> UniversalTime -> Ordering # (<) :: UniversalTime -> UniversalTime -> Bool # (<=) :: UniversalTime -> UniversalTime -> Bool # (>) :: UniversalTime -> UniversalTime -> Bool # (>=) :: UniversalTime -> UniversalTime -> Bool # max :: UniversalTime -> UniversalTime -> UniversalTime # min :: UniversalTime -> UniversalTime -> UniversalTime # | |
Ord TimeLocale | |
Defined in Data.Time.Format.Locale Methods compare :: TimeLocale -> TimeLocale -> Ordering # (<) :: TimeLocale -> TimeLocale -> Bool # (<=) :: TimeLocale -> TimeLocale -> Bool # (>) :: TimeLocale -> TimeLocale -> Bool # (>=) :: TimeLocale -> TimeLocale -> Bool # max :: TimeLocale -> TimeLocale -> TimeLocale # min :: TimeLocale -> TimeLocale -> TimeLocale # | |
Ord LocalTime | |
Defined in Data.Time.LocalTime.Internal.LocalTime | |
Ord TimeOfDay | |
Defined in Data.Time.LocalTime.Internal.TimeOfDay | |
Ord TimeZone | |
Defined in Data.Time.LocalTime.Internal.TimeZone | |
Ord UUID | |
Ord UnpackedUUID | |
Defined in Data.UUID.Types.Internal | |
Ord Integer | |
Ord Natural | |
Ord () | |
Ord Bool | |
Ord Char | |
Ord Double | |
Ord Float | |
Ord Int | |
Ord Word | |
Integral i => Ord (DecimalRaw i) | |
Defined in Data.Decimal Methods compare :: DecimalRaw i -> DecimalRaw i -> Ordering # (<) :: DecimalRaw i -> DecimalRaw i -> Bool # (<=) :: DecimalRaw i -> DecimalRaw i -> Bool # (>) :: DecimalRaw i -> DecimalRaw i -> Bool # (>=) :: DecimalRaw i -> DecimalRaw i -> Bool # max :: DecimalRaw i -> DecimalRaw i -> DecimalRaw i # min :: DecimalRaw i -> DecimalRaw i -> DecimalRaw i # | |
Ord a => Ord (Only a) | |
Ord v => Ord (KeyMap v) | |
Defined in Data.Aeson.KeyMap | |
Ord a => Ord (ZipList a) | |
Ord a => Ord (Identity a) | |
Defined in Data.Functor.Identity | |
Ord a => Ord (Down a) | |
Ord a => Ord (Dual a) | |
Ord a => Ord (Product a) | |
Ord a => Ord (Sum a) | |
Ord a => Ord (NonEmpty a) | |
Ord (ForeignPtr a) | |
Defined in GHC.ForeignPtr Methods compare :: ForeignPtr a -> ForeignPtr a -> Ordering # (<) :: ForeignPtr a -> ForeignPtr a -> Bool # (<=) :: ForeignPtr a -> ForeignPtr a -> Bool # (>) :: ForeignPtr a -> ForeignPtr a -> Bool # (>=) :: ForeignPtr a -> ForeignPtr a -> Bool # max :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a # min :: ForeignPtr a -> ForeignPtr a -> ForeignPtr a # | |
Ord p => Ord (Par1 p) | |
Ord (FunPtr a) | |
Defined in GHC.Ptr | |
Ord (Ptr a) | |
Integral a => Ord (Ratio a) | |
Ord a => Ord (CmdArgs a) | |
Defined in System.Console.CmdArgs.Implicit.Type | |
Ord a => Ord (Flush a) | |
Defined in Data.Conduit.Internal.Conduit | |
Ord a => Ord (IntMap a) | |
Defined in Data.IntMap.Internal | |
Ord a => Ord (Seq a) | |
Ord a => Ord (ViewL a) | |
Defined in Data.Sequence.Internal | |
Ord a => Ord (ViewR a) | |
Defined in Data.Sequence.Internal | |
Ord a => Ord (Intersection a) | |
Defined in Data.Set.Internal Methods compare :: Intersection a -> Intersection a -> Ordering # (<) :: Intersection a -> Intersection a -> Bool # (<=) :: Intersection a -> Intersection a -> Bool # (>) :: Intersection a -> Intersection a -> Bool # (>=) :: Intersection a -> Intersection a -> Bool # | |
Ord a => Ord (Set a) | |
Ord a => Ord (Tree a) | |
Ord1 f => Ord (Fix f) | |
(Functor f, Ord1 f) => Ord (Mu f) | |
(Functor f, Ord1 f) => Ord (Nu f) | |
Ord a => Ord (DNonEmpty a) | |
Defined in Data.DList.DNonEmpty.Internal | |
Ord a => Ord (DList a) | |
Ord a => Ord (Doc a) | |
Ord a => Ord (Hashed a) | |
Defined in Data.Hashable.Class | |
Ord a => Ord (FastTree a) | |
Defined in Hledger.Data.Account | |
Ord e => Ord (ErrorFancy e) | |
Defined in Text.Megaparsec.Error Methods compare :: ErrorFancy e -> ErrorFancy e -> Ordering # (<) :: ErrorFancy e -> ErrorFancy e -> Bool # (<=) :: ErrorFancy e -> ErrorFancy e -> Bool # (>) :: ErrorFancy e -> ErrorFancy e -> Bool # (>=) :: ErrorFancy e -> ErrorFancy e -> Bool # max :: ErrorFancy e -> ErrorFancy e -> ErrorFancy e # min :: ErrorFancy e -> ErrorFancy e -> ErrorFancy e # | |
Ord t => Ord (ErrorItem t) | |
Defined in Text.Megaparsec.Error | |
Ord mono => Ord (NonNull mono) | |
Defined in Data.NonNull | |
Ord ann => Ord (SimpleDocStream ann) | |
Defined in Prettyprinter.Internal Methods compare :: SimpleDocStream ann -> SimpleDocStream ann -> Ordering # (<) :: SimpleDocStream ann -> SimpleDocStream ann -> Bool # (<=) :: SimpleDocStream ann -> SimpleDocStream ann -> Bool # (>) :: SimpleDocStream ann -> SimpleDocStream ann -> Bool # (>=) :: SimpleDocStream ann -> SimpleDocStream ann -> Bool # max :: SimpleDocStream ann -> SimpleDocStream ann -> SimpleDocStream ann # min :: SimpleDocStream ann -> SimpleDocStream ann -> SimpleDocStream ann # | |
Ord a => Ord (Array a) | Lexicographic ordering. Subject to change between major versions. |
Defined in Data.Primitive.Array | |
(Ord a, Prim a) => Ord (PrimArray a) | Lexicographic ordering. Subject to change between major versions. Since: primitive-0.6.4.0 |
Defined in Data.Primitive.PrimArray | |
Ord a => Ord (SmallArray a) | Lexicographic ordering. Subject to change between major versions. |
Defined in Data.Primitive.SmallArray Methods compare :: SmallArray a -> SmallArray a -> Ordering # (<) :: SmallArray a -> SmallArray a -> Bool # (<=) :: SmallArray a -> SmallArray a -> Bool # (>) :: SmallArray a -> SmallArray a -> Bool # (>=) :: SmallArray a -> SmallArray a -> Bool # max :: SmallArray a -> SmallArray a -> SmallArray a # min :: SmallArray a -> SmallArray a -> SmallArray a # | |
Ord g => Ord (StateGen g) | |
Defined in System.Random.Internal | |
Ord g => Ord (AtomicGen g) | |
Defined in System.Random.Stateful | |
Ord g => Ord (IOGen g) | |
Defined in System.Random.Stateful | |
Ord g => Ord (STGen g) | |
Defined in System.Random.Stateful | |
Ord g => Ord (TGen g) | |
Ord a => Ord (Maybe a) | |
Ord flag => Ord (TyVarBndr flag) | |
Defined in Language.Haskell.TH.Syntax Methods compare :: TyVarBndr flag -> TyVarBndr flag -> Ordering # (<) :: TyVarBndr flag -> TyVarBndr flag -> Bool # (<=) :: TyVarBndr flag -> TyVarBndr flag -> Bool # (>) :: TyVarBndr flag -> TyVarBndr flag -> Bool # (>=) :: TyVarBndr flag -> TyVarBndr flag -> Bool # | |
Ord a => Ord (HashSet a) | |
Ord a => Ord (Vector a) | |
Defined in Data.Vector | |
(Prim a, Ord a) => Ord (Vector a) | |
Defined in Data.Vector.Primitive | |
(Storable a, Ord a) => Ord (Vector a) | |
Defined in Data.Vector.Storable | |
Ord a => Ord (Maybe a) | |
Ord a => Ord (a) | |
Ord a => Ord [a] | |
(Ord a, Ord b) => Ord (Either a b) | |
Ord (Fixed a) | |
Ord (TypeRep a) | |
Ord (U1 p) | |
Ord (V1 p) | |
(Ord k, Ord v) => Ord (Map k v) | |
(Ord a, Ord1 f) => Ord (Free f a) | |
Defined in Control.Monad.Free | |
Ord (ParseError Text HledgerParseErrorData) | |
Defined in Text.Megaparsec.Custom Methods compare :: ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData -> Ordering # (<) :: ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData -> Bool # (<=) :: ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData -> Bool # (>) :: ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData -> Bool # (>=) :: ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData -> Bool # max :: ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData # min :: ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData -> ParseError Text HledgerParseErrorData # | |
(Ord a, Ord b) => Ord (Either a b) | |
(Ord a, Ord b) => Ord (These a b) | |
(Ord a, Ord b) => Ord (Pair a b) | |
Defined in Data.Strict.Tuple | |
(Ord a, Ord b) => Ord (These a b) | |
(Ord1 f, Ord a) => Ord (Lift f a) | |
Defined in Control.Applicative.Lift | |
(Ord1 m, Ord a) => Ord (MaybeT m a) | |
Defined in Control.Monad.Trans.Maybe | |
(Ord k, Ord v) => Ord (HashMap k v) | The ordering is total and consistent with the |
Defined in Data.HashMap.Internal | |
(Ord a, Ord b) => Ord (a, b) | |
Ord a => Ord (Const a b) | |
Ord (f a) => Ord (Alt f a) | |
Defined in Data.Semigroup.Internal | |
Ord (a :~: b) | |
Defined in Data.Type.Equality | |
(Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a) | |
Defined in GHC.Generics Methods compare :: Generically1 f a -> Generically1 f a -> Ordering # (<) :: Generically1 f a -> Generically1 f a -> Bool # (<=) :: Generically1 f a -> Generically1 f a -> Bool # (>) :: Generically1 f a -> Generically1 f a -> Bool # (>=) :: Generically1 f a -> Generically1 f a -> Bool # max :: Generically1 f a -> Generically1 f a -> Generically1 f a # min :: Generically1 f a -> Generically1 f a -> Generically1 f a # | |
Ord (f p) => Ord (Rec1 f p) | |
Defined in GHC.Generics | |
Ord (URec (Ptr ()) p) | |
Defined in GHC.Generics Methods compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering # (<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p # min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p # | |
Ord (URec Char p) | |
Defined in GHC.Generics | |
Ord (URec Double p) | |
Defined in GHC.Generics Methods compare :: URec Double p -> URec Double p -> Ordering # (<) :: URec Double p -> URec Double p -> Bool # (<=) :: URec Double p -> URec Double p -> Bool # (>) :: URec Double p -> URec Double p -> Bool # (>=) :: URec Double p -> URec Double p -> Bool # | |
Ord (URec Float p) | |
Defined in GHC.Generics | |
Ord (URec Int p) | |
Ord (URec Word p) | |
Defined in GHC.Generics | |
Ord b => Ord (Tagged s b) | |
(Ord (f a), Ord (g a), Ord a) => Ord (These1 f g a) | |
Defined in Data.Functor.These | |
(Ord1 f, Ord a) => Ord (Backwards f a) | |
Defined in Control.Applicative.Backwards Methods compare :: Backwards f a -> Backwards f a -> Ordering # (<) :: Backwards f a -> Backwards f a -> Bool # (<=) :: Backwards f a -> Backwards f a -> Bool # (>) :: Backwards f a -> Backwards f a -> Bool # (>=) :: Backwards f a -> Backwards f a -> Bool # | |
(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) | |
Defined in Control.Monad.Trans.Except Methods compare :: ExceptT e m a -> ExceptT e m a -> Ordering # (<) :: ExceptT e m a -> ExceptT e m a -> Bool # (<=) :: ExceptT e m a -> ExceptT e m a -> Bool # (>) :: ExceptT e m a -> ExceptT e m a -> Bool # (>=) :: ExceptT e m a -> ExceptT e m a -> Bool # | |
(Ord1 f, Ord a) => Ord (IdentityT f a) | |
Defined in Control.Monad.Trans.Identity Methods compare :: IdentityT f a -> IdentityT f a -> Ordering # (<) :: IdentityT f a -> IdentityT f a -> Bool # (<=) :: IdentityT f a -> IdentityT f a -> Bool # (>) :: IdentityT f a -> IdentityT f a -> Bool # (>=) :: IdentityT f a -> IdentityT f a -> Bool # | |
(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) | |
Defined in Control.Monad.Trans.Writer.Lazy Methods compare :: WriterT w m a -> WriterT w m a -> Ordering # (<) :: WriterT w m a -> WriterT w m a -> Bool # (<=) :: WriterT w m a -> WriterT w m a -> Bool # (>) :: WriterT w m a -> WriterT w m a -> Bool # (>=) :: WriterT w m a -> WriterT w m a -> Bool # | |
(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) | |
Defined in Control.Monad.Trans.Writer.Strict Methods compare :: WriterT w m a -> WriterT w m a -> Ordering # (<) :: WriterT w m a -> WriterT w m a -> Bool # (<=) :: WriterT w m a -> WriterT w m a -> Bool # (>) :: WriterT w m a -> WriterT w m a -> Bool # (>=) :: WriterT w m a -> WriterT w m a -> Bool # | |
Ord a => Ord (Constant a b) | |
Defined in Data.Functor.Constant | |
(Ord1 f, Ord a) => Ord (Reverse f a) | |
Defined in Data.Functor.Reverse | |
(Ord a, Ord b, Ord c) => Ord (a, b, c) | |
Ord (a :~~: b) | |
(Ord (f p), Ord (g p)) => Ord ((f :*: g) p) | |
Defined in GHC.Generics | |
(Ord (f p), Ord (g p)) => Ord ((f :+: g) p) | |
Defined in GHC.Generics | |
Ord c => Ord (K1 i c p) | |
Defined in GHC.Generics | |
(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) | |
Defined in GHC.Classes | |
Ord (f (g a)) => Ord (Compose f g a) | |
Defined in Data.Functor.Compose Methods compare :: Compose f g a -> Compose f g a -> Ordering # (<) :: Compose f g a -> Compose f g a -> Bool # (<=) :: Compose f g a -> Compose f g a -> Bool # (>) :: Compose f g a -> Compose f g a -> Bool # (>=) :: Compose f g a -> Compose f g a -> Bool # | |
Ord (f (g p)) => Ord ((f :.: g) p) | |
Defined in GHC.Generics | |
Ord (f p) => Ord (M1 i c f p) | |
(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering # (<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering # (<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) # min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering # (<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) # min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering # (<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) # min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) # min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) # min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) # min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) # min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # |
class Functor f => Applicative (f :: Type -> Type) where #
Instances
Applicative IResult | |
Applicative Parser | |
Applicative Result | |
Applicative ZipList | |
Applicative Identity | |
Applicative Down | |
Applicative Dual | |
Applicative Product | |
Applicative Sum | |
Applicative NonEmpty | |
Applicative STM | |
Applicative Par1 | |
Applicative P | |
Applicative ReadP | |
Applicative ReadPrec | |
Applicative Put | |
Applicative RGB | |
Applicative Seq | |
Applicative Tree | |
Applicative DNonEmpty | |
Defined in Data.DList.DNonEmpty.Internal | |
Applicative DList | |
Applicative IO | |
Applicative Root | |
Applicative Array | |
Applicative SmallArray | |
Defined in Data.Primitive.SmallArray Methods pure :: a -> SmallArray a # (<*>) :: SmallArray (a -> b) -> SmallArray a -> SmallArray b # liftA2 :: (a -> b -> c) -> SmallArray a -> SmallArray b -> SmallArray c # (*>) :: SmallArray a -> SmallArray b -> SmallArray b # (<*) :: SmallArray a -> SmallArray b -> SmallArray a # | |
Applicative Q | |
Applicative Capability | |
Defined in System.Console.Terminfo.Base | |
Applicative Vector | |
Applicative Maybe | |
Applicative Solo | |
Applicative List | |
Applicative (Parser i) | |
Monad m => Applicative (WrappedMonad m) | |
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # | |
Arrow a => Applicative (ArrowMonad a) | |
Defined in Control.Arrow Methods pure :: a0 -> ArrowMonad a a0 # (<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b # liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c # (*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # (<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 # | |
Applicative (Either e) | |
Applicative (StateL s) | |
Applicative (StateR s) | |
Applicative (U1 :: Type -> Type) | |
Applicative (ST s) | |
Monad m => Applicative (ZipSource m) | |
Defined in Data.Conduit.Internal.Conduit | |
Applicative (SetM s) | |
Functor f => Applicative (Free f) | |
Applicative m => Applicative (InputT m) | |
Applicative m => Applicative (HtmlT m) | Based on the monad instance. |
Applicative f => Applicative (WrappedPoly f) | |
Defined in Data.MonoTraversable Methods pure :: a -> WrappedPoly f a # (<*>) :: WrappedPoly f (a -> b) -> WrappedPoly f a -> WrappedPoly f b # liftA2 :: (a -> b -> c) -> WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f c # (*>) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f b # (<*) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f a # | |
Applicative m => Applicative (ResourceT m) | |
Defined in Control.Monad.Trans.Resource.Internal | |
Semigroup a => Applicative (These a) | |
Applicative m => Applicative (QuoteToQuasi m) | |
Defined in Language.Haskell.TH.Syntax.Compat Methods pure :: a -> QuoteToQuasi m a # (<*>) :: QuoteToQuasi m (a -> b) -> QuoteToQuasi m a -> QuoteToQuasi m b # liftA2 :: (a -> b -> c) -> QuoteToQuasi m a -> QuoteToQuasi m b -> QuoteToQuasi m c # (*>) :: QuoteToQuasi m a -> QuoteToQuasi m b -> QuoteToQuasi m b # (<*) :: QuoteToQuasi m a -> QuoteToQuasi m b -> QuoteToQuasi m a # | |
Semigroup a => Applicative (These a) | |
Applicative f => Applicative (Lift f) | |
(Functor m, Monad m) => Applicative (MaybeT m) | |
Functor backend => Applicative (Wizard backend) | |
Defined in System.Console.Wizard.Internal Methods pure :: a -> Wizard backend a # (<*>) :: Wizard backend (a -> b) -> Wizard backend a -> Wizard backend b # liftA2 :: (a -> b -> c) -> Wizard backend a -> Wizard backend b -> Wizard backend c # (*>) :: Wizard backend a -> Wizard backend b -> Wizard backend b # (<*) :: Wizard backend a -> Wizard backend b -> Wizard backend a # | |
Monoid a => Applicative ((,) a) | |
Arrow a => Applicative (WrappedArrow a b) | |
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # | |
Applicative m => Applicative (Kleisli m a) | |
Defined in Control.Arrow | |
Monoid m => Applicative (Const m :: Type -> Type) | |
Monad m => Applicative (StateT s m) | |
Defined in Data.Functor.Utils | |
Applicative f => Applicative (Alt f) | |
(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f) | |
Defined in GHC.Generics Methods pure :: a -> Generically1 f a # (<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b # liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c # (*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b # (<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a # | |
Applicative f => Applicative (Rec1 f) | |
Monad m => Applicative (ZipSink i m) | |
Defined in Data.Conduit.Internal.Conduit | |
(Applicative f, Monad f) => Applicative (WhenMissing f x) | |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMissing f x a # (<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b # liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c # (*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b # (<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a # | |
(Functor f, Functor a, Monad a) => Applicative (FreeT f a) | |
Defined in Control.Monad.Free | |
Applicative (Bazaar a b) | |
Defined in Lens.Micro | |
(Functor m, Monad m) => Applicative (StateT s m) | |
Applicative (Tagged s) | |
Applicative f => Applicative (Backwards f) | |
Defined in Control.Applicative.Backwards | |
(Functor m, Monad m) => Applicative (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
Applicative m => Applicative (IdentityT m) | |
Defined in Control.Monad.Trans.Identity | |
Applicative m => Applicative (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
(Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Lazy | |
(Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
(Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Lazy | |
(Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Strict | |
Monoid a => Applicative (Constant a :: Type -> Type) | |
Defined in Data.Functor.Constant | |
Applicative f => Applicative (Reverse f) | |
(Monoid a, Monoid b) => Applicative ((,,) a b) | |
(Applicative f, Applicative g) => Applicative (f :*: g) | |
Monoid c => Applicative (K1 i c :: Type -> Type) | |
Applicative (ConduitT i o m) | |
Defined in Data.Conduit.Internal.Conduit Methods pure :: a -> ConduitT i o m a # (<*>) :: ConduitT i o m (a -> b) -> ConduitT i o m a -> ConduitT i o m b # liftA2 :: (a -> b -> c) -> ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m c # (*>) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m b # (<*) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m a # | |
Monad m => Applicative (ZipConduit i o m) | |
Defined in Data.Conduit.Internal.Conduit Methods pure :: a -> ZipConduit i o m a # (<*>) :: ZipConduit i o m (a -> b) -> ZipConduit i o m a -> ZipConduit i o m b # liftA2 :: (a -> b -> c) -> ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m c # (*>) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m b # (<*) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m a # | |
(Monad f, Applicative f) => Applicative (WhenMatched f x y) | |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMatched f x y a # (<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b # liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c # (*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b # (<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a # | |
(Applicative f, Monad f) => Applicative (WhenMissing f k x) | |
Defined in Data.Map.Internal Methods pure :: a -> WhenMissing f k x a # (<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b # liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c # (*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b # (<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a # | |
Stream s => Applicative (ParsecT e s m) |
|
Defined in Text.Megaparsec.Internal Methods pure :: a -> ParsecT e s m a # (<*>) :: ParsecT e s m (a -> b) -> ParsecT e s m a -> ParsecT e s m b # liftA2 :: (a -> b -> c) -> ParsecT e s m a -> ParsecT e s m b -> ParsecT e s m c # (*>) :: ParsecT e s m a -> ParsecT e s m b -> ParsecT e s m b # (<*) :: ParsecT e s m a -> ParsecT e s m b -> ParsecT e s m a # | |
Applicative (ContT r m) | |
Defined in Control.Monad.Trans.Cont | |
(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) | |
Defined in GHC.Base | |
Applicative ((->) r) | |
(Applicative f, Applicative g) => Applicative (Compose f g) | |
Defined in Data.Functor.Compose | |
(Applicative f, Applicative g) => Applicative (f :.: g) | |
Applicative f => Applicative (M1 i c f) | |
(Monad f, Applicative f) => Applicative (WhenMatched f k x y) | |
Defined in Data.Map.Internal Methods pure :: a -> WhenMatched f k x y a # (<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b # liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c # (*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b # (<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a # | |
(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Lazy | |
(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Strict | |
Monad m => Applicative (Pipe l i o u m) | |
Defined in Data.Conduit.Internal.Pipe Methods pure :: a -> Pipe l i o u m a # (<*>) :: Pipe l i o u m (a -> b) -> Pipe l i o u m a -> Pipe l i o u m b # liftA2 :: (a -> b -> c) -> Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m c # (*>) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m b # (<*) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m a # |
class Functor (f :: Type -> Type) where #
Minimal complete definition
Instances
class Applicative m => Monad (m :: Type -> Type) where #
Minimal complete definition
Instances
Monad IResult | |
Monad Parser | |
Monad Result | |
Monad Identity | |
Monad Down | |
Monad Dual | |
Monad Product | |
Monad Sum | |
Monad NonEmpty | |
Monad STM | |
Monad Par1 | |
Monad P | |
Monad ReadP | |
Monad ReadPrec | |
Monad Put | |
Monad Seq | |
Monad Tree | |
Monad DNonEmpty | |
Monad DList | |
Monad IO | |
Monad Root | |
Monad Array | |
Monad SmallArray | |
Defined in Data.Primitive.SmallArray Methods (>>=) :: SmallArray a -> (a -> SmallArray b) -> SmallArray b # (>>) :: SmallArray a -> SmallArray b -> SmallArray b # return :: a -> SmallArray a # | |
Monad Q | |
Monad Capability | |
Monad Vector | |
Monad Maybe | |
Monad Solo | |
Monad List | |
Monad (Parser i) | |
Monad m => Monad (WrappedMonad m) | |
Defined in Control.Applicative Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # return :: a -> WrappedMonad m a # | |
ArrowApply a => Monad (ArrowMonad a) | |
Monad (Either e) | |
Monad (U1 :: Type -> Type) | |
Monad (ST s) | |
Monad (SetM s) | |
Functor f => Monad (Free f) | |
Monad m => Monad (InputT m) | |
Monad m => Monad (HtmlT m) | Basically acts like Writer. |
Monad f => Monad (WrappedPoly f) | |
Defined in Data.MonoTraversable Methods (>>=) :: WrappedPoly f a -> (a -> WrappedPoly f b) -> WrappedPoly f b # (>>) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f b # return :: a -> WrappedPoly f a # | |
Monad m => Monad (ResourceT m) | |
Semigroup a => Monad (These a) | |
Monad m => Monad (QuoteToQuasi m) | |
Semigroup a => Monad (These a) | |
Monad m => Monad (MaybeT m) | |
Functor backend => Monad (Wizard backend) | |
Monoid a => Monad ((,) a) | |
Monad m => Monad (Kleisli m a) | |
Monad m => Monad (StateT s m) | |
Monad f => Monad (Alt f) | |
Monad f => Monad (Rec1 f) | |
(Applicative f, Monad f) => Monad (WhenMissing f x) | |
(Functor f, Monad m) => Monad (FreeT f m) | |
Monad m => Monad (StateT s m) | |
Monad (Tagged s) | |
Monad m => Monad (ExceptT e m) | |
Monad m => Monad (IdentityT m) | |
Monad m => Monad (ReaderT r m) | |
Monad m => Monad (StateT s m) | |
Monad m => Monad (StateT s m) | |
(Monoid w, Monad m) => Monad (WriterT w m) | |
(Monoid w, Monad m) => Monad (WriterT w m) | |
Monad m => Monad (Reverse m) | |
(Monoid a, Monoid b) => Monad ((,,) a b) | |
(Monad f, Monad g) => Monad (f :*: g) | |
Monad (ConduitT i o m) | |
(Monad f, Applicative f) => Monad (WhenMatched f x y) | |
(Applicative f, Monad f) => Monad (WhenMissing f k x) | |
Stream s => Monad (ParsecT e s m) |
|
Monad (ContT r m) | |
(Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c) | |
Monad ((->) r) | |
Monad f => Monad (M1 i c f) | |
(Monad f, Applicative f) => Monad (WhenMatched f k x y) | |
(Monoid w, Monad m) => Monad (RWST r w s m) | |
(Monoid w, Monad m) => Monad (RWST r w s m) | |
Monad m => Monad (Pipe l i o u m) | |
Instances
FromJSON2 Either | |
Defined in Data.Aeson.Types.FromJSON Methods liftParseJSON2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Either a b) # liftParseJSONList2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Either a b] # liftOmittedField2 :: Maybe a -> Maybe b -> Maybe (Either a b) # | |
ToJSON2 Either | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> Either a b -> Value # liftToJSONList2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> [Either a b] -> Value # liftToEncoding2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> Either a b -> Encoding # liftToEncodingList2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> [Either a b] -> Encoding # liftOmitField2 :: (a -> Bool) -> (b -> Bool) -> Either a b -> Bool # | |
Bifunctor Either | |
NFData2 Either | |
Defined in Control.DeepSeq | |
Hashable2 Either | |
Defined in Data.Hashable.Class Methods liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Either a b -> Int # | |
Generic1 (Either a :: Type -> Type) | |
(Lift a, Lift b) => Lift (Either a b :: Type) | |
FromJSON a => FromJSON1 (Either a) | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON a => ToJSON1 (Either a) | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> Either a a0 -> Value # liftToJSONList :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> [Either a a0] -> Value # liftToEncoding :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> Either a a0 -> Encoding # liftToEncodingList :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> [Either a a0] -> Encoding # liftOmitField :: (a0 -> Bool) -> Either a a0 -> Bool # | |
Foldable (Either a) | |
Defined in Data.Foldable Methods fold :: Monoid m => Either a m -> m foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # length :: Either a a0 -> Int # elem :: Eq a0 => a0 -> Either a a0 -> Bool # maximum :: Ord a0 => Either a a0 -> a0 # minimum :: Ord a0 => Either a a0 -> a0 # | |
Traversable (Either a) | |
Applicative (Either e) | |
Functor (Either a) | |
Monad (Either e) | |
NFData a => NFData1 (Either a) | |
Defined in Control.DeepSeq | |
e ~ SomeException => MonadCatch (Either e) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e0) => Either e a -> (e0 -> Either e a) -> Either e a | |
e ~ SomeException => MonadMask (Either e) | |
Defined in Control.Monad.Catch Methods mask :: HasCallStack => ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b uninterruptibleMask :: HasCallStack => ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b generalBracket :: HasCallStack => Either e a -> (a -> ExitCase b -> Either e c) -> (a -> Either e b) -> Either e (b, c) | |
e ~ SomeException => MonadThrow (Either e) | |
Defined in Control.Monad.Catch Methods throwM :: (HasCallStack, Exception e0) => e0 -> Either e a # | |
Hashable a => Hashable1 (Either a) | |
Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Either a a0 -> Int # | |
e ~ a => Reportable (Either a) e | |
Defined in Hledger.Reports.ReportOptions | |
(FromJSON a, FromJSON b) => FromJSON (Either a b) | |
Defined in Data.Aeson.Types.FromJSON | |
(ToJSON a, ToJSON b) => ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON | |
(Data a, Data b) => Data (Either a b) | |
Defined in Data.Data Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Either a b -> c (Either a b) gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) toConstr :: Either a b -> Constr dataTypeOf :: Either a b -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) gmapT :: (forall b0. Data b0 => b0 -> b0) -> Either a b -> Either a b gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) | |
Semigroup (Either a b) | |
Generic (Either a b) | |
(Read a, Read b) => Read (Either a b) | |
(Show a, Show b) => Show (Either a b) | |
(NFData a, NFData b) => NFData (Either a b) | |
Defined in Control.DeepSeq | |
(Eq a, Eq b) => Eq (Either a b) | |
(Ord a, Ord b) => Ord (Either a b) | |
(Hashable a, Hashable b) => Hashable (Either a b) | |
Defined in Data.Hashable.Class | |
MonoFoldable (Either a b) | |
Defined in Data.MonoTraversable Methods ofoldMap :: Monoid m => (Element (Either a b) -> m) -> Either a b -> m # ofoldr :: (Element (Either a b) -> b0 -> b0) -> b0 -> Either a b -> b0 # ofoldl' :: (a0 -> Element (Either a b) -> a0) -> a0 -> Either a b -> a0 # otoList :: Either a b -> [Element (Either a b)] # oall :: (Element (Either a b) -> Bool) -> Either a b -> Bool # oany :: (Element (Either a b) -> Bool) -> Either a b -> Bool # olength :: Either a b -> Int # olength64 :: Either a b -> Int64 # ocompareLength :: Integral i => Either a b -> i -> Ordering # otraverse_ :: Applicative f => (Element (Either a b) -> f b0) -> Either a b -> f () # ofor_ :: Applicative f => Either a b -> (Element (Either a b) -> f b0) -> f () # omapM_ :: Applicative m => (Element (Either a b) -> m ()) -> Either a b -> m () # oforM_ :: Applicative m => Either a b -> (Element (Either a b) -> m ()) -> m () # ofoldlM :: Monad m => (a0 -> Element (Either a b) -> m a0) -> a0 -> Either a b -> m a0 # ofoldMap1Ex :: Semigroup m => (Element (Either a b) -> m) -> Either a b -> m # ofoldr1Ex :: (Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Element (Either a b) # ofoldl1Ex' :: (Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Element (Either a b) # headEx :: Either a b -> Element (Either a b) # lastEx :: Either a b -> Element (Either a b) # unsafeHead :: Either a b -> Element (Either a b) # unsafeLast :: Either a b -> Element (Either a b) # maximumByEx :: (Element (Either a b) -> Element (Either a b) -> Ordering) -> Either a b -> Element (Either a b) # minimumByEx :: (Element (Either a b) -> Element (Either a b) -> Ordering) -> Either a b -> Element (Either a b) # | |
MonoFunctor (Either a b) | |
MonoPointed (Either a b) | |
MonoTraversable (Either a b) | |
(a ~ a', b ~ b') => Each (Either a a') (Either b b') a b | Since: microlens-0.4.11 |
type Rep1 (Either a :: Type -> Type) | |
Defined in GHC.Generics type Rep1 (Either a :: Type -> Type) = D1 ('MetaData "Either" "Data.Either" "base" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) | |
type Rep (Either a b) | |
Defined in GHC.Generics type Rep (Either a b) = D1 ('MetaData "Either" "Data.Either" "base" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b))) | |
type Element (Either a b) | |
Defined in Data.MonoTraversable |
Instances
Instances
Generic1 (Const a :: k -> Type) | |
Unbox a => Vector Vector (Const a b) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: Mutable Vector s (Const a b) -> ST s (Vector (Const a b)) # basicUnsafeThaw :: Vector (Const a b) -> ST s (Mutable Vector s (Const a b)) # basicLength :: Vector (Const a b) -> Int # basicUnsafeSlice :: Int -> Int -> Vector (Const a b) -> Vector (Const a b) # basicUnsafeIndexM :: Vector (Const a b) -> Int -> Box (Const a b) # basicUnsafeCopy :: Mutable Vector s (Const a b) -> Vector (Const a b) -> ST s () # | |
Unbox a => MVector MVector (Const a b) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Const a b) -> Int # basicUnsafeSlice :: Int -> Int -> MVector s (Const a b) -> MVector s (Const a b) # basicOverlaps :: MVector s (Const a b) -> MVector s (Const a b) -> Bool # basicUnsafeNew :: Int -> ST s (MVector s (Const a b)) # basicInitialize :: MVector s (Const a b) -> ST s () # basicUnsafeReplicate :: Int -> Const a b -> ST s (MVector s (Const a b)) # basicUnsafeRead :: MVector s (Const a b) -> Int -> ST s (Const a b) # basicUnsafeWrite :: MVector s (Const a b) -> Int -> Const a b -> ST s () # basicClear :: MVector s (Const a b) -> ST s () # basicSet :: MVector s (Const a b) -> Const a b -> ST s () # basicUnsafeCopy :: MVector s (Const a b) -> MVector s (Const a b) -> ST s () # basicUnsafeMove :: MVector s (Const a b) -> MVector s (Const a b) -> ST s () # basicUnsafeGrow :: MVector s (Const a b) -> Int -> ST s (MVector s (Const a b)) # | |
FromJSON2 (Const :: Type -> Type -> Type) | |
Defined in Data.Aeson.Types.FromJSON Methods liftParseJSON2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Const a b) # liftParseJSONList2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Const a b] # liftOmittedField2 :: Maybe a -> Maybe b -> Maybe (Const a b) # | |
ToJSON2 (Const :: Type -> Type -> Type) | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> Const a b -> Value # liftToJSONList2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> [Const a b] -> Value # liftToEncoding2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> Const a b -> Encoding # liftToEncodingList2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> [Const a b] -> Encoding # liftOmitField2 :: (a -> Bool) -> (b -> Bool) -> Const a b -> Bool # | |
Bifunctor (Const :: Type -> Type -> Type) | |
NFData2 (Const :: Type -> Type -> Type) | |
Defined in Control.DeepSeq | |
Hashable2 (Const :: Type -> Type -> Type) | |
Defined in Data.Hashable.Class Methods liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Const a b -> Int # | |
FromJSON a => FromJSON1 (Const a :: Type -> Type) | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON a => ToJSON1 (Const a :: Type -> Type) | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> Const a a0 -> Value # liftToJSONList :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> [Const a a0] -> Value # liftToEncoding :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> Const a a0 -> Encoding # liftToEncodingList :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> [Const a a0] -> Encoding # liftOmitField :: (a0 -> Bool) -> Const a a0 -> Bool # | |
Foldable (Const m :: Type -> Type) | |
Defined in Data.Functor.Const Methods fold :: Monoid m0 => Const m m0 -> m0 foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 foldr :: (a -> b -> b) -> b -> Const m a -> b # foldr' :: (a -> b -> b) -> b -> Const m a -> b foldl :: (b -> a -> b) -> b -> Const m a -> b # foldl' :: (b -> a -> b) -> b -> Const m a -> b # foldr1 :: (a -> a -> a) -> Const m a -> a # foldl1 :: (a -> a -> a) -> Const m a -> a # elem :: Eq a => a -> Const m a -> Bool # maximum :: Ord a => Const m a -> a # minimum :: Ord a => Const m a -> a # | |
Traversable (Const m :: Type -> Type) | |
Monoid m => Applicative (Const m :: Type -> Type) | |
Functor (Const m :: Type -> Type) | |
NFData a => NFData1 (Const a :: Type -> Type) | |
Defined in Control.DeepSeq | |
Hashable a => Hashable1 (Const a :: Type -> Type) | |
Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Const a a0 -> Int # | |
Reportable (Const r :: Type -> Type) e | |
Defined in Hledger.Reports.ReportOptions | |
FromJSON a => FromJSON (Const a b) | |
Defined in Data.Aeson.Types.FromJSON | |
(FromJSON a, FromJSONKey a) => FromJSONKey (Const a b) | |
Defined in Data.Aeson.Types.FromJSON Methods fromJSONKey :: FromJSONKeyFunction (Const a b) # fromJSONKeyList :: FromJSONKeyFunction [Const a b] # | |
ToJSON a => ToJSON (Const a b) | |
Defined in Data.Aeson.Types.ToJSON | |
(ToJSON a, ToJSONKey a) => ToJSONKey (Const a b) | |
Defined in Data.Aeson.Types.ToJSON | |
(Typeable k, Data a, Typeable b) => Data (Const a b) | |
Defined in Data.Data Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) toConstr :: Const a b -> Constr dataTypeOf :: Const a b -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) | |
IsString a => IsString (Const a b) | |
Defined in Data.String Methods fromString :: String -> Const a b | |
Storable a => Storable (Const a b) | |
Defined in Data.Functor.Const | |
Monoid a => Monoid (Const a b) | |
Semigroup a => Semigroup (Const a b) | |
Bits a => Bits (Const a b) | |
Defined in Data.Functor.Const Methods (.&.) :: Const a b -> Const a b -> Const a b (.|.) :: Const a b -> Const a b -> Const a b xor :: Const a b -> Const a b -> Const a b complement :: Const a b -> Const a b shift :: Const a b -> Int -> Const a b rotate :: Const a b -> Int -> Const a b setBit :: Const a b -> Int -> Const a b clearBit :: Const a b -> Int -> Const a b complementBit :: Const a b -> Int -> Const a b testBit :: Const a b -> Int -> Bool bitSizeMaybe :: Const a b -> Maybe Int shiftL :: Const a b -> Int -> Const a b unsafeShiftL :: Const a b -> Int -> Const a b shiftR :: Const a b -> Int -> Const a b unsafeShiftR :: Const a b -> Int -> Const a b rotateL :: Const a b -> Int -> Const a b | |
FiniteBits a => FiniteBits (Const a b) | |
Defined in Data.Functor.Const Methods finiteBitSize :: Const a b -> Int countLeadingZeros :: Const a b -> Int countTrailingZeros :: Const a b -> Int | |
Bounded a => Bounded (Const a b) | |
Defined in Data.Functor.Const | |
Enum a => Enum (Const a b) | |
Defined in Data.Functor.Const | |
Floating a => Floating (Const a b) | |
Defined in Data.Functor.Const Methods sqrt :: Const a b -> Const a b (**) :: Const a b -> Const a b -> Const a b logBase :: Const a b -> Const a b -> Const a b asin :: Const a b -> Const a b acos :: Const a b -> Const a b atan :: Const a b -> Const a b sinh :: Const a b -> Const a b cosh :: Const a b -> Const a b tanh :: Const a b -> Const a b asinh :: Const a b -> Const a b acosh :: Const a b -> Const a b atanh :: Const a b -> Const a b log1p :: Const a b -> Const a b # expm1 :: Const a b -> Const a b # | |
RealFloat a => RealFloat (Const a b) | |
Defined in Data.Functor.Const Methods floatRadix :: Const a b -> Integer floatDigits :: Const a b -> Int floatRange :: Const a b -> (Int, Int) decodeFloat :: Const a b -> (Integer, Int) encodeFloat :: Integer -> Int -> Const a b significand :: Const a b -> Const a b scaleFloat :: Int -> Const a b -> Const a b isInfinite :: Const a b -> Bool isDenormalized :: Const a b -> Bool isNegativeZero :: Const a b -> Bool | |
Generic (Const a b) | |
Ix a => Ix (Const a b) | |
Defined in Data.Functor.Const Methods range :: (Const a b, Const a b) -> [Const a b] index :: (Const a b, Const a b) -> Const a b -> Int unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int inRange :: (Const a b, Const a b) -> Const a b -> Bool rangeSize :: (Const a b, Const a b) -> Int unsafeRangeSize :: (Const a b, Const a b) -> Int | |
Num a => Num (Const a b) | |
Read a => Read (Const a b) | |
Fractional a => Fractional (Const a b) | |
Defined in Data.Functor.Const | |
Integral a => Integral (Const a b) | |
Defined in Data.Functor.Const | |
Real a => Real (Const a b) | |
Defined in Data.Functor.Const Methods toRational :: Const a b -> Rational | |
RealFrac a => RealFrac (Const a b) | |
Show a => Show (Const a b) | |
NFData a => NFData (Const a b) | |
Defined in Control.DeepSeq | |
Eq a => Eq (Const a b) | |
Ord a => Ord (Const a b) | |
Hashable a => Hashable (Const a b) | |
Defined in Data.Hashable.Class | |
MonoFoldable (Const m a) | |
Defined in Data.MonoTraversable Methods ofoldMap :: Monoid m0 => (Element (Const m a) -> m0) -> Const m a -> m0 # ofoldr :: (Element (Const m a) -> b -> b) -> b -> Const m a -> b # ofoldl' :: (a0 -> Element (Const m a) -> a0) -> a0 -> Const m a -> a0 # otoList :: Const m a -> [Element (Const m a)] # oall :: (Element (Const m a) -> Bool) -> Const m a -> Bool # oany :: (Element (Const m a) -> Bool) -> Const m a -> Bool # olength64 :: Const m a -> Int64 # ocompareLength :: Integral i => Const m a -> i -> Ordering # otraverse_ :: Applicative f => (Element (Const m a) -> f b) -> Const m a -> f () # ofor_ :: Applicative f => Const m a -> (Element (Const m a) -> f b) -> f () # omapM_ :: Applicative m0 => (Element (Const m a) -> m0 ()) -> Const m a -> m0 () # oforM_ :: Applicative m0 => Const m a -> (Element (Const m a) -> m0 ()) -> m0 () # ofoldlM :: Monad m0 => (a0 -> Element (Const m a) -> m0 a0) -> a0 -> Const m a -> m0 a0 # ofoldMap1Ex :: Semigroup m0 => (Element (Const m a) -> m0) -> Const m a -> m0 # ofoldr1Ex :: (Element (Const m a) -> Element (Const m a) -> Element (Const m a)) -> Const m a -> Element (Const m a) # ofoldl1Ex' :: (Element (Const m a) -> Element (Const m a) -> Element (Const m a)) -> Const m a -> Element (Const m a) # headEx :: Const m a -> Element (Const m a) # lastEx :: Const m a -> Element (Const m a) # unsafeHead :: Const m a -> Element (Const m a) # unsafeLast :: Const m a -> Element (Const m a) # maximumByEx :: (Element (Const m a) -> Element (Const m a) -> Ordering) -> Const m a -> Element (Const m a) # minimumByEx :: (Element (Const m a) -> Element (Const m a) -> Ordering) -> Const m a -> Element (Const m a) # | |
MonoFunctor (Const m a) | |
Monoid m => MonoPointed (Const m a) | |
MonoTraversable (Const m a) | |
Pretty a => Pretty (Const a b) | |
Defined in Prettyprinter.Internal | |
Unbox a => Unbox (Const a b) | |
Defined in Data.Vector.Unboxed.Base | |
type Rep1 (Const a :: k -> Type) | |
Defined in Data.Functor.Const | |
newtype MVector s (Const a b) | |
Defined in Data.Vector.Unboxed.Base | |
type Rep (Const a b) | |
Defined in Data.Functor.Const | |
type Element (Const m a) | |
Defined in Data.MonoTraversable | |
newtype Vector (Const a b) | |
Defined in Data.Vector.Unboxed.Base |
class Applicative f => Alternative (f :: Type -> Type) where #
Instances
Instances
Constructors
UTCTime | |
Fields
|
Instances
FromJSON UTCTime | |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey UTCTime | |
Defined in Data.Aeson.Types.FromJSON Methods | |
ToJSON UTCTime | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey UTCTime | |
Defined in Data.Aeson.Types.ToJSON | |
Data UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime dataTypeOf :: UTCTime -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime | |
NFData UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
Eq UTCTime | |
Ord UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime |
class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #
Minimal complete definition
Nothing
Instances
class Monad m => MonadFail (m :: Type -> Type) where #
Instances
Instances
Show ThreadId | |
NFData ThreadId | |
Defined in Control.DeepSeq | |
Eq ThreadId | |
Ord ThreadId | |
Defined in GHC.Conc.Sync | |
Hashable ThreadId | |
Defined in Data.Hashable.Class |
How to complete a command line option.
The Show
instance is suitable for parsing from shell scripts.
Constructors
CompleteValue String | Complete to a particular value |
CompleteFile String FilePath | Complete to a prefix, and a file |
CompleteDir String FilePath | Complete to a prefix, and a directory |
Instances
Show Complete | |
Eq Complete | |
Ord Complete | |
Defined in System.Console.CmdArgs.Explicit.Complete |
An unnamed argument. Anything not starting with -
is considered an argument,
apart from "-"
which is considered to be the argument "-"
, and any arguments
following "--"
. For example:
programname arg1 -j - --foo arg3 -- -arg4 --arg5=1 arg6
Would have the arguments:
["arg1","-","arg3","-arg4","--arg5=1","arg6"]
Constructors
ExitSuccess | |
ExitFailure Int |
Instances
Exception ExitCode | |
Defined in GHC.IO.Exception Methods toException :: ExitCode -> SomeException fromException :: SomeException -> Maybe ExitCode displayException :: ExitCode -> String | |
Generic ExitCode | |
Read ExitCode | |
Show ExitCode | |
NFData ExitCode | |
Defined in Control.DeepSeq | |
Eq ExitCode | |
Ord ExitCode | |
Defined in GHC.IO.Exception | |
type Rep ExitCode | |
Defined in GHC.IO.Exception type Rep ExitCode = D1 ('MetaData "ExitCode" "GHC.IO.Exception" "base" 'False) (C1 ('MetaCons "ExitSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExitFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) |
data TextEncoding #
Instances
Show TextEncoding | |
Defined in GHC.IO.Encoding.Types Methods showsPrec :: Int -> TextEncoding -> ShowS show :: TextEncoding -> String showList :: [TextEncoding] -> ShowS |
Constructors
AbsoluteSeek | |
RelativeSeek | |
SeekFromEnd |
Instances
Enum SeekMode | |
Defined in GHC.IO.Device | |
Ix SeekMode | |
Defined in GHC.IO.Device | |
Read SeekMode | |
Show SeekMode | |
Eq SeekMode | |
Ord SeekMode | |
Defined in GHC.IO.Device |
data HandlePosn #
Instances
Show HandlePosn | |
Defined in GHC.IO.Handle Methods showsPrec :: Int -> HandlePosn -> ShowS show :: HandlePosn -> String showList :: [HandlePosn] -> ShowS | |
Eq HandlePosn | |
Defined in GHC.IO.Handle |
data BufferMode #
Constructors
NoBuffering | |
LineBuffering | |
BlockBuffering (Maybe Int) |
Instances
Read BufferMode | |
Defined in GHC.IO.Handle.Types Methods readsPrec :: Int -> ReadS BufferMode # readList :: ReadS [BufferMode] # readPrec :: ReadPrec BufferMode # readListPrec :: ReadPrec [BufferMode] # | |
Show BufferMode | |
Defined in GHC.IO.Handle.Types Methods showsPrec :: Int -> BufferMode -> ShowS show :: BufferMode -> String showList :: [BufferMode] -> ShowS | |
Eq BufferMode | |
Defined in GHC.IO.Handle.Types | |
Ord BufferMode | |
Defined in GHC.IO.Handle.Types Methods compare :: BufferMode -> BufferMode -> Ordering # (<) :: BufferMode -> BufferMode -> Bool # (<=) :: BufferMode -> BufferMode -> Bool # (>) :: BufferMode -> BufferMode -> Bool # (>=) :: BufferMode -> BufferMode -> Bool # max :: BufferMode -> BufferMode -> BufferMode # min :: BufferMode -> BufferMode -> BufferMode # |
data NewlineMode #
Constructors
NewlineMode | |
Instances
Read NewlineMode | |
Defined in GHC.IO.Handle.Types Methods readsPrec :: Int -> ReadS NewlineMode # readList :: ReadS [NewlineMode] # readPrec :: ReadPrec NewlineMode # readListPrec :: ReadPrec [NewlineMode] # | |
Show NewlineMode | |
Defined in GHC.IO.Handle.Types Methods showsPrec :: Int -> NewlineMode -> ShowS show :: NewlineMode -> String showList :: [NewlineMode] -> ShowS | |
Eq NewlineMode | |
Defined in GHC.IO.Handle.Types | |
Ord NewlineMode | |
Defined in GHC.IO.Handle.Types Methods compare :: NewlineMode -> NewlineMode -> Ordering # (<) :: NewlineMode -> NewlineMode -> Bool # (<=) :: NewlineMode -> NewlineMode -> Bool # (>) :: NewlineMode -> NewlineMode -> Bool # (>=) :: NewlineMode -> NewlineMode -> Bool # max :: NewlineMode -> NewlineMode -> NewlineMode # min :: NewlineMode -> NewlineMode -> NewlineMode # |
Constructors
ReadMode | |
WriteMode | |
AppendMode | |
ReadWriteMode |
data IOErrorType #
Instances
Show IOErrorType | |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> IOErrorType -> ShowS show :: IOErrorType -> String showList :: [IOErrorType] -> ShowS | |
Eq IOErrorType | |
Defined in GHC.IO.Exception |
Instances
FromJSON1 Down | Since: aeson-2.2.0.0 |
ToJSON1 Down | Since: aeson-2.2.0.0 |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Down a -> Value # liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Down a] -> Value # liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Down a -> Encoding # liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Down a] -> Encoding # liftOmitField :: (a -> Bool) -> Down a -> Bool # | |
Foldable Down | |
Defined in Data.Foldable Methods fold :: Monoid m => Down m -> m foldMap :: Monoid m => (a -> m) -> Down a -> m foldMap' :: Monoid m => (a -> m) -> Down a -> m foldr :: (a -> b -> b) -> b -> Down a -> b # foldr' :: (a -> b -> b) -> b -> Down a -> b foldl :: (b -> a -> b) -> b -> Down a -> b # foldl' :: (b -> a -> b) -> b -> Down a -> b # foldr1 :: (a -> a -> a) -> Down a -> a # foldl1 :: (a -> a -> a) -> Down a -> a # elem :: Eq a => a -> Down a -> Bool # maximum :: Ord a => Down a -> a # | |
Traversable Down | |
Applicative Down | |
Functor Down | |
Monad Down | |
NFData1 Down | |
Defined in Control.DeepSeq | |
Generic1 Down | |
Unbox a => Vector Vector (Down a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: Mutable Vector s (Down a) -> ST s (Vector (Down a)) # basicUnsafeThaw :: Vector (Down a) -> ST s (Mutable Vector s (Down a)) # basicLength :: Vector (Down a) -> Int # basicUnsafeSlice :: Int -> Int -> Vector (Down a) -> Vector (Down a) # basicUnsafeIndexM :: Vector (Down a) -> Int -> Box (Down a) # basicUnsafeCopy :: Mutable Vector s (Down a) -> Vector (Down a) -> ST s () # | |
Unbox a => MVector MVector (Down a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Down a) -> Int # basicUnsafeSlice :: Int -> Int -> MVector s (Down a) -> MVector s (Down a) # basicOverlaps :: MVector s (Down a) -> MVector s (Down a) -> Bool # basicUnsafeNew :: Int -> ST s (MVector s (Down a)) # basicInitialize :: MVector s (Down a) -> ST s () # basicUnsafeReplicate :: Int -> Down a -> ST s (MVector s (Down a)) # basicUnsafeRead :: MVector s (Down a) -> Int -> ST s (Down a) # basicUnsafeWrite :: MVector s (Down a) -> Int -> Down a -> ST s () # basicClear :: MVector s (Down a) -> ST s () # basicSet :: MVector s (Down a) -> Down a -> ST s () # basicUnsafeCopy :: MVector s (Down a) -> MVector s (Down a) -> ST s () # basicUnsafeMove :: MVector s (Down a) -> MVector s (Down a) -> ST s () # basicUnsafeGrow :: MVector s (Down a) -> Int -> ST s (MVector s (Down a)) # | |
FromJSON a => FromJSON (Down a) | Since: aeson-2.2.0.0 |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON a => ToJSON (Down a) | Since: aeson-2.2.0.0 |
Defined in Data.Aeson.Types.ToJSON | |
Data a => Data (Down a) | |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Down a -> c (Down a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Down a) dataTypeOf :: Down a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Down a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Down a)) gmapT :: (forall b. Data b => b -> b) -> Down a -> Down a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r gmapQ :: (forall d. Data d => d -> u) -> Down a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Down a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) | |
Storable a => Storable (Down a) | |
Monoid a => Monoid (Down a) | |
Semigroup a => Semigroup (Down a) | |
Bits a => Bits (Down a) | |
Defined in Data.Ord Methods (.&.) :: Down a -> Down a -> Down a (.|.) :: Down a -> Down a -> Down a xor :: Down a -> Down a -> Down a complement :: Down a -> Down a shift :: Down a -> Int -> Down a rotate :: Down a -> Int -> Down a setBit :: Down a -> Int -> Down a clearBit :: Down a -> Int -> Down a complementBit :: Down a -> Int -> Down a testBit :: Down a -> Int -> Bool bitSizeMaybe :: Down a -> Maybe Int shiftL :: Down a -> Int -> Down a unsafeShiftL :: Down a -> Int -> Down a shiftR :: Down a -> Int -> Down a unsafeShiftR :: Down a -> Int -> Down a rotateL :: Down a -> Int -> Down a | |
FiniteBits a => FiniteBits (Down a) | |
Defined in Data.Ord Methods finiteBitSize :: Down a -> Int countLeadingZeros :: Down a -> Int countTrailingZeros :: Down a -> Int | |
Bounded a => Bounded (Down a) | |
(Enum a, Bounded a, Eq a) => Enum (Down a) | |
Floating a => Floating (Down a) | |
RealFloat a => RealFloat (Down a) | |
Defined in Data.Ord Methods floatRadix :: Down a -> Integer floatDigits :: Down a -> Int floatRange :: Down a -> (Int, Int) decodeFloat :: Down a -> (Integer, Int) encodeFloat :: Integer -> Int -> Down a significand :: Down a -> Down a scaleFloat :: Int -> Down a -> Down a isInfinite :: Down a -> Bool isDenormalized :: Down a -> Bool isNegativeZero :: Down a -> Bool | |
Generic (Down a) | |
Ix a => Ix (Down a) | |
Num a => Num (Down a) | |
Read a => Read (Down a) | |
Fractional a => Fractional (Down a) | |
Real a => Real (Down a) | |
Defined in Data.Ord Methods toRational :: Down a -> Rational | |
RealFrac a => RealFrac (Down a) | |
Show a => Show (Down a) | |
NFData a => NFData (Down a) | |
Defined in Control.DeepSeq | |
Eq a => Eq (Down a) | |
Ord a => Ord (Down a) | |
Unbox a => Unbox (Down a) | |
Defined in Data.Vector.Unboxed.Base | |
type Rep1 Down | |
Defined in GHC.Generics | |
newtype MVector s (Down a) | |
Defined in Data.Vector.Unboxed.Base | |
type Rep (Down a) | |
Defined in GHC.Generics | |
newtype Vector (Down a) | |
Defined in Data.Vector.Unboxed.Base |
newtype WrappedArrow (a :: Type -> Type -> Type) b c #
Constructors
WrapArrow | |
Fields
|
Instances
Generic1 (WrappedArrow a b :: Type -> Type) | |
Defined in Control.Applicative Associated Types type Rep1 (WrappedArrow a b) :: k -> Type Methods from1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 to1 :: forall (a0 :: k). Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 | |
(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) | |
Defined in Control.Applicative Methods empty :: WrappedArrow a b a0 # (<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 # some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] # many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] # | |
Arrow a => Applicative (WrappedArrow a b) | |
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # | |
Arrow a => Functor (WrappedArrow a b) | |
Defined in Control.Applicative Methods fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # (<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # | |
(Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c) | |
Defined in Data.Data Methods gfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> WrappedArrow a b c -> c0 (WrappedArrow a b c) gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (WrappedArrow a b c) toConstr :: WrappedArrow a b c -> Constr dataTypeOf :: WrappedArrow a b c -> DataType dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (WrappedArrow a b c)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (WrappedArrow a b c)) gmapT :: (forall b0. Data b0 => b0 -> b0) -> WrappedArrow a b c -> WrappedArrow a b c gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r gmapQ :: (forall d. Data d => d -> u) -> WrappedArrow a b c -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedArrow a b c -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) | |
Generic (WrappedArrow a b c) | |
Defined in Control.Applicative Associated Types type Rep (WrappedArrow a b c) :: Type -> Type Methods from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c | |
Arrow a => MonoFunctor (WrappedArrow a b c) | |
Defined in Data.MonoTraversable Methods omap :: (Element (WrappedArrow a b c) -> Element (WrappedArrow a b c)) -> WrappedArrow a b c -> WrappedArrow a b c # | |
Arrow a => MonoPointed (WrappedArrow a b c) | |
Defined in Data.MonoTraversable Methods opoint :: Element (WrappedArrow a b c) -> WrappedArrow a b c # | |
type Rep1 (WrappedArrow a b :: Type -> Type) | |
Defined in Control.Applicative type Rep1 (WrappedArrow a b :: Type -> Type) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b)))) | |
type Rep (WrappedArrow a b c) | |
Defined in Control.Applicative type Rep (WrappedArrow a b c) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a b c)))) | |
type Element (WrappedArrow a b c) | |
Defined in Data.MonoTraversable |
newtype WrappedMonad (m :: Type -> Type) a #
Constructors
WrapMonad | |
Fields
|
Instances
Generic1 (WrappedMonad m :: Type -> Type) | |
Defined in Control.Applicative Associated Types type Rep1 (WrappedMonad m) :: k -> Type Methods from1 :: forall (a :: k). WrappedMonad m a -> Rep1 (WrappedMonad m) a to1 :: forall (a :: k). Rep1 (WrappedMonad m) a -> WrappedMonad m a | |
MonadPlus m => Alternative (WrappedMonad m) | |
Defined in Control.Applicative Methods empty :: WrappedMonad m a # (<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a # some :: WrappedMonad m a -> WrappedMonad m [a] # many :: WrappedMonad m a -> WrappedMonad m [a] # | |
Monad m => Applicative (WrappedMonad m) | |
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # | |
Monad m => Functor (WrappedMonad m) | |
Defined in Control.Applicative Methods fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b # (<$) :: a -> WrappedMonad m b -> WrappedMonad m a # | |
Monad m => Monad (WrappedMonad m) | |
Defined in Control.Applicative Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # return :: a -> WrappedMonad m a # | |
(Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a) | |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonad m a -> c (WrappedMonad m a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonad m a) toConstr :: WrappedMonad m a -> Constr dataTypeOf :: WrappedMonad m a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonad m a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonad m a)) gmapT :: (forall b. Data b => b -> b) -> WrappedMonad m a -> WrappedMonad m a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r gmapQ :: (forall d. Data d => d -> u) -> WrappedMonad m a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonad m a -> u gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) | |
Generic (WrappedMonad m a) | |
Defined in Control.Applicative Associated Types type Rep (WrappedMonad m a) :: Type -> Type Methods from :: WrappedMonad m a -> Rep (WrappedMonad m a) x to :: Rep (WrappedMonad m a) x -> WrappedMonad m a | |
Monad m => MonoFunctor (WrappedMonad m a) | |
Defined in Data.MonoTraversable Methods omap :: (Element (WrappedMonad m a) -> Element (WrappedMonad m a)) -> WrappedMonad m a -> WrappedMonad m a # | |
Monad m => MonoPointed (WrappedMonad m a) | |
Defined in Data.MonoTraversable Methods opoint :: Element (WrappedMonad m a) -> WrappedMonad m a # | |
type Rep1 (WrappedMonad m :: Type -> Type) | |
Defined in Control.Applicative type Rep1 (WrappedMonad m :: Type -> Type) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m))) | |
type Rep (WrappedMonad m a) | |
Defined in Control.Applicative type Rep (WrappedMonad m a) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m a)))) | |
type Element (WrappedMonad m a) | |
Defined in Data.MonoTraversable |
Constructors
ZipList | |
Fields
|
Instances
Foldable ZipList | |
Defined in Control.Applicative Methods fold :: Monoid m => ZipList m -> m foldMap :: Monoid m => (a -> m) -> ZipList a -> m foldMap' :: Monoid m => (a -> m) -> ZipList a -> m foldr :: (a -> b -> b) -> b -> ZipList a -> b # foldr' :: (a -> b -> b) -> b -> ZipList a -> b foldl :: (b -> a -> b) -> b -> ZipList a -> b # foldl' :: (b -> a -> b) -> b -> ZipList a -> b # foldr1 :: (a -> a -> a) -> ZipList a -> a # foldl1 :: (a -> a -> a) -> ZipList a -> a # elem :: Eq a => a -> ZipList a -> Bool # maximum :: Ord a => ZipList a -> a # minimum :: Ord a => ZipList a -> a # | |
Traversable ZipList | |
Alternative ZipList | |
Applicative ZipList | |
Functor ZipList | |
NFData1 ZipList | |
Defined in Control.DeepSeq | |
Generic1 ZipList | |
Data a => Data (ZipList a) | |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZipList a -> c (ZipList a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ZipList a) toConstr :: ZipList a -> Constr dataTypeOf :: ZipList a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ZipList a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ZipList a)) gmapT :: (forall b. Data b => b -> b) -> ZipList a -> ZipList a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r gmapQ :: (forall d. Data d => d -> u) -> ZipList a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> ZipList a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) | |
Generic (ZipList a) | |
IsList (ZipList a) | |
Read a => Read (ZipList a) | |
Show a => Show (ZipList a) | |
NFData a => NFData (ZipList a) | |
Defined in Control.DeepSeq | |
Eq a => Eq (ZipList a) | |
Ord a => Ord (ZipList a) | |
MonoFunctor (ZipList a) | |
MonoPointed (ZipList a) | |
type Rep1 ZipList | |
Defined in Control.Applicative | |
type Rep (ZipList a) | |
Defined in Control.Applicative | |
type Item (ZipList a) | |
Defined in GHC.IsList type Item (ZipList a) = a | |
type Element (ZipList a) | |
Defined in Data.MonoTraversable |
data GeneralCategory #
Constructors
Instances
Bounded GeneralCategory | |
Defined in GHC.Unicode | |
Enum GeneralCategory | |
Defined in GHC.Unicode Methods succ :: GeneralCategory -> GeneralCategory pred :: GeneralCategory -> GeneralCategory toEnum :: Int -> GeneralCategory fromEnum :: GeneralCategory -> Int enumFrom :: GeneralCategory -> [GeneralCategory] enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] | |
Generic GeneralCategory | |
Defined in GHC.Generics Associated Types type Rep GeneralCategory :: Type -> Type Methods from :: GeneralCategory -> Rep GeneralCategory x to :: Rep GeneralCategory x -> GeneralCategory | |
Ix GeneralCategory | |
Defined in GHC.Unicode Methods range :: (GeneralCategory, GeneralCategory) -> [GeneralCategory] index :: (GeneralCategory, GeneralCategory) -> GeneralCategory -> Int unsafeIndex :: (GeneralCategory, GeneralCategory) -> GeneralCategory -> Int inRange :: (GeneralCategory, GeneralCategory) -> GeneralCategory -> Bool rangeSize :: (GeneralCategory, GeneralCategory) -> Int unsafeRangeSize :: (GeneralCategory, GeneralCategory) -> Int | |
Read GeneralCategory | |
Defined in GHC.Read Methods readsPrec :: Int -> ReadS GeneralCategory # readList :: ReadS [GeneralCategory] # readPrec :: ReadPrec GeneralCategory # readListPrec :: ReadPrec [GeneralCategory] # | |
Show GeneralCategory | |
Defined in GHC.Unicode Methods showsPrec :: Int -> GeneralCategory -> ShowS show :: GeneralCategory -> String showList :: [GeneralCategory] -> ShowS | |
Eq GeneralCategory | |
Defined in GHC.Unicode Methods (==) :: GeneralCategory -> GeneralCategory -> Bool (/=) :: GeneralCategory -> GeneralCategory -> Bool | |
Ord GeneralCategory | |
Defined in GHC.Unicode Methods compare :: GeneralCategory -> GeneralCategory -> Ordering # (<) :: GeneralCategory -> GeneralCategory -> Bool # (<=) :: GeneralCategory -> GeneralCategory -> Bool # (>) :: GeneralCategory -> GeneralCategory -> Bool # (>=) :: GeneralCategory -> GeneralCategory -> Bool # max :: GeneralCategory -> GeneralCategory -> GeneralCategory # min :: GeneralCategory -> GeneralCategory -> GeneralCategory # | |
type Rep GeneralCategory | |
Defined in GHC.Generics type Rep GeneralCategory = D1 ('MetaData "GeneralCategory" "GHC.Unicode" "base" 'False) ((((C1 ('MetaCons "UppercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LowercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TitlecaseLetter" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ModifierLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherLetter" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NonSpacingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SpacingCombiningMark" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "EnclosingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecimalNumber" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LetterNumber" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherNumber" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ConnectorPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DashPunctuation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OpenPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClosePunctuation" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "InitialQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FinalQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherPunctuation" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MathSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CurrencySymbol" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ModifierSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherSymbol" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Space" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineSeparator" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ParagraphSeparator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Control" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Format" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Surrogate" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PrivateUse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAssigned" 'PrefixI 'False) (U1 :: Type -> Type)))))) |
class HPrintfType t #
Minimal complete definition
hspr
Instances
a ~ () => HPrintfType (IO a) | |
Defined in Text.Printf | |
(PrintfArg a, HPrintfType r) => HPrintfType (a -> r) | |
Defined in Text.Printf |
Minimal complete definition
Instances
PrintfArg Int16 | |
Defined in Text.Printf | |
PrintfArg Int32 | |
Defined in Text.Printf | |
PrintfArg Int64 | |
Defined in Text.Printf | |
PrintfArg Int8 | |
Defined in Text.Printf | |
PrintfArg Word16 | |
Defined in Text.Printf | |
PrintfArg Word32 | |
Defined in Text.Printf | |
PrintfArg Word64 | |
Defined in Text.Printf | |
PrintfArg Word8 | |
Defined in Text.Printf | |
PrintfArg ShortText | Since: text-short-0.1.2 |
Defined in Data.Text.Short.Internal | |
PrintfArg Integer | |
Defined in Text.Printf | |
PrintfArg Natural | |
Defined in Text.Printf | |
PrintfArg Char | |
Defined in Text.Printf | |
PrintfArg Double | |
Defined in Text.Printf | |
PrintfArg Float | |
Defined in Text.Printf | |
PrintfArg Int | |
Defined in Text.Printf | |
PrintfArg Word | |
Defined in Text.Printf | |
IsChar c => PrintfArg [c] | |
Defined in Text.Printf |
class PrintfType t #
Minimal complete definition
spr
Instances
a ~ () => PrintfType (IO a) | |
Defined in Text.Printf | |
IsChar c => PrintfType [c] | |
Defined in Text.Printf | |
(PrintfArg a, PrintfType r) => PrintfType (a -> r) | |
Defined in Text.Printf |
data FieldFormat #
Constructors
FieldFormat | |
Fields
|
type FieldFormatter = FieldFormat -> ShowS #
data FormatAdjustment #
Constructors
LeftAdjust | |
ZeroPad |
data FormatParse #
Constructors
FormatParse | |
data FormatSign #
type ModifierParser = String -> FormatParse #
type HasCallStack = ?callStack :: CallStack #
class Remap (m :: Type -> Type) where #
Like functor, but where the the argument isn't just covariant.
Methods
Arguments
:: (a -> b) | Embed a value |
-> (b -> (a, a -> b)) | Extract the mode and give a way of re-embedding |
-> m a | |
-> m b |
Convert between two values.
Instances
Remap Arg | |
Defined in System.Console.CmdArgs.Explicit.Type | |
Remap Flag | |
Defined in System.Console.CmdArgs.Explicit.Type | |
Remap Mode | |
Defined in System.Console.CmdArgs.Explicit.Type |
A flag, consisting of a list of flag names and other information.
Constructors
Flag | |
type Update a = String -> a -> Either String a #
A function to take a string, and a value, and either produce an error message
(Left
), or a modified value (Right
).
The FlagInfo
type has the following meaning:
FlagReq FlagOpt FlagOptRare/FlagNone -xfoo -x=foo -x=foo -x -foo -x foo -x=foo -x foo -x foo -x=foo -x=foo -x=foo -x=foo --xx foo --xx=foo --xx foo --xx foo --xx=foo --xx=foo --xx=foo --xx=foo
Constructors
FlagReq | Required argument |
FlagOpt String | Optional argument |
FlagOptRare String | Optional argument that requires an = before the value |
FlagNone | No argument |
Instances
Show FlagInfo | |
Eq FlagInfo | |
Ord FlagInfo | |
Defined in System.Console.CmdArgs.Explicit.Type |
A mode. Do not use the Mode
constructor directly, instead
use mode
to construct the Mode
and then record updates.
Each mode has three main features:
- A list of submodes (
modeGroupModes
) - A list of flags (
modeGroupFlags
) - Optionally an unnamed argument (
modeArgs
)
To produce the help information for a mode, either use helpText
or show
.
Constructors
Mode | |
Fields
|
A group of items (modes or flags). The items are treated as a list, but the group structure is used when displaying the help message.
Constructors
Group | |
Fields
|
data HelpFormat #
Specify the format to output the help.
Constructors
HelpFormatDefault | Equivalent to |
HelpFormatOne | Display only the first mode. |
HelpFormatAll | Display all modes. |
HelpFormatBash | Bash completion information |
HelpFormatZsh | Z shell completion information |
Instances
data Reader (m :: Type -> Type) #
A hledger journal reader is a triple of storage format name, a detector of that format, and a parser from that format to Journal. The type variable m appears here so that rParserr can hold a journal parser, which depends on it.
Constructors
Reader | |
Fields
|
data ProcessHandle #
Constructors
Inherit | |
UseHandle Handle | |
CreatePipe | |
NoStream |
Constructors
ShellCommand String | |
RawCommand FilePath [String] |
Instances
IsString CmdSpec | |
Defined in System.Process.Common Methods fromString :: String -> CmdSpec | |
Show CmdSpec | |
Eq CmdSpec | |
data CreateProcess #
Constructors
CreateProcess | |
Fields
|
Instances
Show CreateProcess | |
Defined in System.Process.Common Methods showsPrec :: Int -> CreateProcess -> ShowS show :: CreateProcess -> String showList :: [CreateProcess] -> ShowS | |
Eq CreateProcess | |
Defined in System.Process.Common |
data Permissions #
Instances
Read Permissions | |
Defined in System.Directory.Internal.Common Methods readsPrec :: Int -> ReadS Permissions # readList :: ReadS [Permissions] # readPrec :: ReadPrec Permissions # readListPrec :: ReadPrec [Permissions] # | |
Show Permissions | |
Defined in System.Directory.Internal.Common Methods showsPrec :: Int -> Permissions -> ShowS show :: Permissions -> String showList :: [Permissions] -> ShowS | |
Eq Permissions | |
Defined in System.Directory.Internal.Common | |
Ord Permissions | |
Defined in System.Directory.Internal.Common Methods compare :: Permissions -> Permissions -> Ordering # (<) :: Permissions -> Permissions -> Bool # (<=) :: Permissions -> Permissions -> Bool # (>) :: Permissions -> Permissions -> Bool # (>=) :: Permissions -> Permissions -> Bool # max :: Permissions -> Permissions -> Permissions # min :: Permissions -> Permissions -> Permissions # |
data XdgDirectory #
Instances
data XdgDirectoryList #
Constructors
XdgDataDirs | |
XdgConfigDirs |
Instances
The data type SourcePos
represents source positions. It contains the
name of the source file, a line number, and a column number. Source line
and column positions change intensively during parsing, so we need to
make them strict to avoid memory leaks.
Constructors
SourcePos | |
Fields
|
Instances
Data SourcePos | |
Defined in Text.Megaparsec.Pos Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourcePos -> c SourcePos gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourcePos toConstr :: SourcePos -> Constr dataTypeOf :: SourcePos -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourcePos) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourcePos) gmapT :: (forall b. Data b => b -> b) -> SourcePos -> SourcePos gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r gmapQ :: (forall d. Data d => d -> u) -> SourcePos -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> SourcePos -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos | |
Generic SourcePos | |
Read SourcePos | |
Show SourcePos | |
NFData SourcePos | |
Defined in Text.Megaparsec.Pos | |
Eq SourcePos | |
Ord SourcePos | |
type Rep SourcePos | |
Defined in Text.Megaparsec.Pos type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-9.6.0-6cDk6wja3Qf4Glh1AI6lFI" 'False) (C1 ('MetaCons "SourcePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "sourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "sourceLine") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos) :*: S1 ('MetaSel ('Just "sourceColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos)))) |
Timeout to be applied to individual tests.
Since: tasty-0.8
Constructors
Timeout Integer String |
|
NoTimeout |
Instances
Show Timeout | |
IsOption Timeout | |
Defined in Test.Tasty.Options.Core Methods defaultValue :: Timeout # parseValue :: String -> Maybe Timeout # optionName :: Tagged Timeout String # optionHelp :: Tagged Timeout String # showDefaultValue :: Timeout -> Maybe String # |
The main data structure defining a test suite.
It consists of individual test cases and properties, organized in named groups which form a tree-like hierarchy.
There is no generic way to create a test case. Instead, every test
provider (tasty-hunit, tasty-smallcheck etc.) provides a function to
turn a test case into a TestTree
.
Groups can be created using testGroup
.
Since: tasty-0.1
data DependencyType #
These are the two ways in which one test may depend on the others.
This is the same distinction as the hard vs soft dependencies in TestNG.
Since: tasty-1.2
Constructors
AllSucceed | The current test tree will be executed after its dependencies finish, and only if all of the dependencies succeed. |
AllFinish | The current test tree will be executed after its dependencies finish, regardless of whether they succeed or not. |
Instances
Read DependencyType | Since: tasty-1.5 |
Defined in Test.Tasty.Core Methods readsPrec :: Int -> ReadS DependencyType # readList :: ReadS [DependencyType] # readPrec :: ReadPrec DependencyType # readListPrec :: ReadPrec [DependencyType] # | |
Show DependencyType | |
Defined in Test.Tasty.Core Methods showsPrec :: Int -> DependencyType -> ShowS show :: DependencyType -> String showList :: [DependencyType] -> ShowS | |
Eq DependencyType | |
Defined in Test.Tasty.Core Methods (==) :: DependencyType -> DependencyType -> Bool (/=) :: DependencyType -> DependencyType -> Bool |
type RegexError = String #
An error message arising during a regular expression operation. Eg: trying to compile a malformed regular expression, or trying to apply a malformed replacement pattern.
type Replacement = String #
A replacement pattern. May include numeric backreferences (N).
Regular expression. Extended regular expression-ish syntax ? But does not support eg (?i) syntax.
Instances
ToJSON Regexp | |
Defined in Hledger.Utils.Regex | |
Read Regexp | |
Show Regexp | |
Eq Regexp | |
Ord Regexp | |
RegexLike Regexp String | |
Defined in Hledger.Utils.Regex Methods matchOnce :: Regexp -> String -> Maybe MatchArray # matchAll :: Regexp -> String -> [MatchArray] # matchCount :: Regexp -> String -> Int # matchTest :: Regexp -> String -> Bool # matchAllText :: Regexp -> String -> [MatchText String] # matchOnceText :: Regexp -> String -> Maybe (String, MatchText String, String) # | |
RegexContext Regexp String String | |
A Ledger has the journal it derives from, and the accounts derived from that. Accounts are accessible both list-wise and tree-wise, since each one knows its parent and subs; the first account is the root of the tree and always exists.
Instances
Generic Ledger | |
type Rep Ledger | |
Defined in Hledger.Data.Types type Rep Ledger = D1 ('MetaData "Ledger" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Ledger" 'PrefixI 'True) (S1 ('MetaSel ('Just "ljournal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Journal) :*: S1 ('MetaSel ('Just "laccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Account]))) |
data NormalSign #
Whether an account's balance is normally a positive number (in accounting terms, a debit balance) or a negative number (credit balance). Assets and expenses are normally positive (debit), while liabilities, equity and income are normally negative (credit). https://en.wikipedia.org/wiki/Normal_balance
Constructors
NormallyPositive | |
NormallyNegative |
Instances
Show NormalSign | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> NormalSign -> ShowS show :: NormalSign -> String showList :: [NormalSign] -> ShowS | |
Eq NormalSign | |
Defined in Hledger.Data.Types |
An account, with its balances, parent/subaccount relationships, etc. Only the name is required; the other fields are added when needed.
Constructors
Account | |
Fields
|
Instances
Generic Account | |
type Rep Account | |
Defined in Hledger.Data.Types type Rep Account = D1 ('MetaData "Account" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Account" 'PrefixI 'True) (((S1 ('MetaSel ('Just "aname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "adeclarationinfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AccountDeclarationInfo))) :*: (S1 ('MetaSel ('Just "asubs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Account]) :*: S1 ('MetaSel ('Just "aparent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Account)))) :*: ((S1 ('MetaSel ('Just "aboring") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "anumpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "aebalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount) :*: S1 ('MetaSel ('Just "aibalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount))))) |
data AccountDeclarationInfo #
Extra information about an account that can be derived from its account directive (and the other account directives).
Constructors
AccountDeclarationInfo | |
Fields
|
Instances
Generic AccountDeclarationInfo | |
Defined in Hledger.Data.Types Associated Types type Rep AccountDeclarationInfo :: Type -> Type Methods from :: AccountDeclarationInfo -> Rep AccountDeclarationInfo x to :: Rep AccountDeclarationInfo x -> AccountDeclarationInfo | |
Show AccountDeclarationInfo | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountDeclarationInfo -> ShowS show :: AccountDeclarationInfo -> String showList :: [AccountDeclarationInfo] -> ShowS | |
Eq AccountDeclarationInfo | |
Defined in Hledger.Data.Types Methods (==) :: AccountDeclarationInfo -> AccountDeclarationInfo -> Bool (/=) :: AccountDeclarationInfo -> AccountDeclarationInfo -> Bool | |
type Rep AccountDeclarationInfo | |
Defined in Hledger.Data.Types type Rep AccountDeclarationInfo = D1 ('MetaData "AccountDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "AccountDeclarationInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "adicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "aditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag])) :*: (S1 ('MetaSel ('Just "adideclarationorder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "adisourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos)))) |
newtype TagDeclarationInfo #
Extra information found in a tag directive.
Constructors
TagDeclarationInfo | |
Fields
|
Instances
Generic TagDeclarationInfo | |
Defined in Hledger.Data.Types Associated Types type Rep TagDeclarationInfo :: Type -> Type Methods from :: TagDeclarationInfo -> Rep TagDeclarationInfo x to :: Rep TagDeclarationInfo x -> TagDeclarationInfo | |
Show TagDeclarationInfo | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> TagDeclarationInfo -> ShowS show :: TagDeclarationInfo -> String showList :: [TagDeclarationInfo] -> ShowS | |
Eq TagDeclarationInfo | |
Defined in Hledger.Data.Types Methods (==) :: TagDeclarationInfo -> TagDeclarationInfo -> Bool (/=) :: TagDeclarationInfo -> TagDeclarationInfo -> Bool | |
type Rep TagDeclarationInfo | |
Defined in Hledger.Data.Types type Rep TagDeclarationInfo = D1 ('MetaData "TagDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'True) (C1 ('MetaCons "TagDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "tdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
data PayeeDeclarationInfo #
Extra information found in a payee directive.
Constructors
PayeeDeclarationInfo | |
Fields
|
Instances
Generic PayeeDeclarationInfo | |
Defined in Hledger.Data.Types Associated Types type Rep PayeeDeclarationInfo :: Type -> Type Methods from :: PayeeDeclarationInfo -> Rep PayeeDeclarationInfo x to :: Rep PayeeDeclarationInfo x -> PayeeDeclarationInfo | |
Show PayeeDeclarationInfo | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> PayeeDeclarationInfo -> ShowS show :: PayeeDeclarationInfo -> String showList :: [PayeeDeclarationInfo] -> ShowS | |
Eq PayeeDeclarationInfo | |
Defined in Hledger.Data.Types Methods (==) :: PayeeDeclarationInfo -> PayeeDeclarationInfo -> Bool (/=) :: PayeeDeclarationInfo -> PayeeDeclarationInfo -> Bool | |
type Rep PayeeDeclarationInfo | |
Defined in Hledger.Data.Types type Rep PayeeDeclarationInfo = D1 ('MetaData "PayeeDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "PayeeDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "pdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "pditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]))) |
type StorageFormat = String #
The id of a data format understood by hledger, eg journal
or csv
.
The --output-format option selects one of these for output.
type ParsedJournal = Journal #
A journal in the process of being parsed, not yet finalised. The data is partial, and list fields are in reverse order.
A Journal, containing transactions and various other things. The basic data model for hledger.
This is used during parsing (as the type alias ParsedJournal), and then finalised/validated for use as a Journal. Some extra parsing-related fields are included for convenience, at least for now. In a ParsedJournal these are updated as parsing proceeds, in a Journal they represent the final state at end of parsing (used eg by the add command).
Constructors
Journal | |
Fields
|
Instances
Generic Journal | |
Eq Journal | |
Anon Journal # | |
Defined in Hledger.Cli.Anon | |
type Rep Journal | |
Defined in Hledger.Data.Types type Rep Journal = D1 ('MetaData "Journal" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Journal" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "jparsedefaultyear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Year)) :*: (S1 ('MetaSel ('Just "jparsedefaultcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CommoditySymbol, AmountStyle))) :*: S1 ('MetaSel ('Just "jparsedecimalmark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DecimalMark)))) :*: (S1 ('MetaSel ('Just "jparseparentaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AccountName]) :*: (S1 ('MetaSel ('Just "jparsealiases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AccountAlias]) :*: S1 ('MetaSel ('Just "jparsetimeclockentries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TimeclockEntry])))) :*: ((S1 ('MetaSel ('Just "jincludefilestack") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: (S1 ('MetaSel ('Just "jdeclaredpayees") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Payee, PayeeDeclarationInfo)]) :*: S1 ('MetaSel ('Just "jdeclaredtags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(TagName, TagDeclarationInfo)]))) :*: (S1 ('MetaSel ('Just "jdeclaredaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(AccountName, AccountDeclarationInfo)]) :*: (S1 ('MetaSel ('Just "jdeclaredaccounttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountName [Tag])) :*: S1 ('MetaSel ('Just "jdeclaredaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountType [AccountName])))))) :*: (((S1 ('MetaSel ('Just "jaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountName AccountType)) :*: (S1 ('MetaSel ('Just "jglobalcommoditystyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol AmountStyle)) :*: S1 ('MetaSel ('Just "jcommodities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol Commodity)))) :*: (S1 ('MetaSel ('Just "jinferredcommodities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol AmountStyle)) :*: (S1 ('MetaSel ('Just "jpricedirectives") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PriceDirective]) :*: S1 ('MetaSel ('Just "jinferredmarketprices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [MarketPrice])))) :*: ((S1 ('MetaSel ('Just "jtxnmodifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TransactionModifier]) :*: (S1 ('MetaSel ('Just "jperiodictxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PeriodicTransaction]) :*: S1 ('MetaSel ('Just "jtxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Transaction]))) :*: (S1 ('MetaSel ('Just "jfinalcommentlines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "jfiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(FilePath, Text)]) :*: S1 ('MetaSel ('Just "jlastreadtime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))))))) |
data MarketPrice #
A historical market price (exchange rate) from one commodity to another. A more concise form of a PriceDirective, without the amount display info.
Constructors
MarketPrice | |
Fields
|
Instances
Generic MarketPrice | |
Defined in Hledger.Data.Types Associated Types type Rep MarketPrice :: Type -> Type | |
Show MarketPrice | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> MarketPrice -> ShowS show :: MarketPrice -> String showList :: [MarketPrice] -> ShowS | |
Eq MarketPrice | |
Defined in Hledger.Data.Types | |
Ord MarketPrice | |
Defined in Hledger.Data.Types Methods compare :: MarketPrice -> MarketPrice -> Ordering # (<) :: MarketPrice -> MarketPrice -> Bool # (<=) :: MarketPrice -> MarketPrice -> Bool # (>) :: MarketPrice -> MarketPrice -> Bool # (>=) :: MarketPrice -> MarketPrice -> Bool # max :: MarketPrice -> MarketPrice -> MarketPrice # min :: MarketPrice -> MarketPrice -> MarketPrice # | |
type Rep MarketPrice | |
Defined in Hledger.Data.Types type Rep MarketPrice = D1 ('MetaData "MarketPrice" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "MarketPrice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mpdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Just "mpfrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol)) :*: (S1 ('MetaSel ('Just "mpto") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "mprate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quantity)))) |
data PriceDirective #
A market price declaration made by the journal format's P directive. It declares two things: a historical exchange rate between two commodities, and an amount display style for the second commodity.
Constructors
PriceDirective | |
Fields
|
Instances
Generic PriceDirective | |
Defined in Hledger.Data.Types Associated Types type Rep PriceDirective :: Type -> Type | |
Show PriceDirective | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> PriceDirective -> ShowS show :: PriceDirective -> String showList :: [PriceDirective] -> ShowS | |
Eq PriceDirective | |
Defined in Hledger.Data.Types Methods (==) :: PriceDirective -> PriceDirective -> Bool (/=) :: PriceDirective -> PriceDirective -> Bool | |
Ord PriceDirective | |
Defined in Hledger.Data.Types Methods compare :: PriceDirective -> PriceDirective -> Ordering # (<) :: PriceDirective -> PriceDirective -> Bool # (<=) :: PriceDirective -> PriceDirective -> Bool # (>) :: PriceDirective -> PriceDirective -> Bool # (>=) :: PriceDirective -> PriceDirective -> Bool # max :: PriceDirective -> PriceDirective -> PriceDirective # min :: PriceDirective -> PriceDirective -> PriceDirective # | |
type Rep PriceDirective | |
Defined in Hledger.Data.Types type Rep PriceDirective = D1 ('MetaData "PriceDirective" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "PriceDirective" 'PrefixI 'True) (S1 ('MetaSel ('Just "pddate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: (S1 ('MetaSel ('Just "pdcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "pdamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Amount)))) |
data TimeclockEntry #
Constructors
TimeclockEntry | |
Fields
|
Instances
Generic TimeclockEntry | |
Defined in Hledger.Data.Types Associated Types type Rep TimeclockEntry :: Type -> Type | |
Eq TimeclockEntry | |
Defined in Hledger.Data.Types Methods (==) :: TimeclockEntry -> TimeclockEntry -> Bool (/=) :: TimeclockEntry -> TimeclockEntry -> Bool | |
Ord TimeclockEntry | |
Defined in Hledger.Data.Types Methods compare :: TimeclockEntry -> TimeclockEntry -> Ordering # (<) :: TimeclockEntry -> TimeclockEntry -> Bool # (<=) :: TimeclockEntry -> TimeclockEntry -> Bool # (>) :: TimeclockEntry -> TimeclockEntry -> Bool # (>=) :: TimeclockEntry -> TimeclockEntry -> Bool # max :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry # min :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry # | |
type Rep TimeclockEntry | |
Defined in Hledger.Data.Types type Rep TimeclockEntry = D1 ('MetaData "TimeclockEntry" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "TimeclockEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tlsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: (S1 ('MetaSel ('Just "tlcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TimeclockCode) :*: S1 ('MetaSel ('Just "tldatetime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalTime))) :*: ((S1 ('MetaSel ('Just "tlaccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "tldescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tlcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tltags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]))))) |
data TimeclockCode #
Constructors
SetBalance | |
SetRequiredHours | |
In | |
Out | |
FinalOut |
Instances
Generic TimeclockCode | |
Defined in Hledger.Data.Types Associated Types type Rep TimeclockCode :: Type -> Type | |
Eq TimeclockCode | |
Defined in Hledger.Data.Types | |
Ord TimeclockCode | |
Defined in Hledger.Data.Types Methods compare :: TimeclockCode -> TimeclockCode -> Ordering # (<) :: TimeclockCode -> TimeclockCode -> Bool # (<=) :: TimeclockCode -> TimeclockCode -> Bool # (>) :: TimeclockCode -> TimeclockCode -> Bool # (>=) :: TimeclockCode -> TimeclockCode -> Bool # max :: TimeclockCode -> TimeclockCode -> TimeclockCode # min :: TimeclockCode -> TimeclockCode -> TimeclockCode # | |
type Rep TimeclockCode | |
Defined in Hledger.Data.Types type Rep TimeclockCode = D1 ('MetaData "TimeclockCode" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) ((C1 ('MetaCons "SetBalance" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetRequiredHours" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "In" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Out" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FinalOut" 'PrefixI 'False) (U1 :: Type -> Type)))) |
data PeriodicTransaction #
A periodic transaction rule, describing a transaction that recurs.
Constructors
PeriodicTransaction | |
Fields
|
Instances
Generic PeriodicTransaction | |
Defined in Hledger.Data.Types Associated Types type Rep PeriodicTransaction :: Type -> Type Methods from :: PeriodicTransaction -> Rep PeriodicTransaction x to :: Rep PeriodicTransaction x -> PeriodicTransaction | |
Eq PeriodicTransaction | |
Defined in Hledger.Data.Types Methods (==) :: PeriodicTransaction -> PeriodicTransaction -> Bool (/=) :: PeriodicTransaction -> PeriodicTransaction -> Bool | |
type Rep PeriodicTransaction | |
Defined in Hledger.Data.Types type Rep PeriodicTransaction = D1 ('MetaData "PeriodicTransaction" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "PeriodicTransaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "ptperiodexpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptinterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Interval)) :*: (S1 ('MetaSel ('Just "ptspan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DateSpan) :*: (S1 ('MetaSel ('Just "ptsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SourcePos, SourcePos)) :*: S1 ('MetaSel ('Just "ptstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status)))) :*: ((S1 ('MetaSel ('Just "ptcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "ptcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "pttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "ptpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Posting])))))) |
data TMPostingRule #
A transaction modifier transformation, which adds an extra posting to the matched posting's transaction. Can be like a regular posting, or can have the tmprIsMultiplier flag set, indicating that it's a multiplier for the matched posting's amount.
Constructors
TMPostingRule | |
Fields
|
Instances
Generic TMPostingRule | |
Defined in Hledger.Data.Types Associated Types type Rep TMPostingRule :: Type -> Type | |
Show TMPostingRule | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> TMPostingRule -> ShowS show :: TMPostingRule -> String showList :: [TMPostingRule] -> ShowS | |
Eq TMPostingRule | |
Defined in Hledger.Data.Types | |
type Rep TMPostingRule | |
Defined in Hledger.Data.Types type Rep TMPostingRule = D1 ('MetaData "TMPostingRule" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "TMPostingRule" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmprPosting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Posting) :*: S1 ('MetaSel ('Just "tmprIsMultiplier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) |
data TransactionModifier #
A transaction modifier rule. This has a query which matches postings in the journal, and a list of transformations to apply to those postings or their transactions. Currently there is one kind of transformation: the TMPostingRule, which adds a posting ("auto posting") to the transaction, optionally setting its amount to the matched posting's amount multiplied by a constant.
Constructors
TransactionModifier | |
Fields
|
Instances
Generic TransactionModifier | |
Defined in Hledger.Data.Types Associated Types type Rep TransactionModifier :: Type -> Type Methods from :: TransactionModifier -> Rep TransactionModifier x to :: Rep TransactionModifier x -> TransactionModifier | |
Show TransactionModifier | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> TransactionModifier -> ShowS show :: TransactionModifier -> String showList :: [TransactionModifier] -> ShowS | |
Eq TransactionModifier | |
Defined in Hledger.Data.Types Methods (==) :: TransactionModifier -> TransactionModifier -> Bool (/=) :: TransactionModifier -> TransactionModifier -> Bool | |
type Rep TransactionModifier | |
Defined in Hledger.Data.Types type Rep TransactionModifier = D1 ('MetaData "TransactionModifier" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "TransactionModifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmquerytxt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tmpostingrules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TMPostingRule]))) |
data Transaction #
Constructors
Transaction | |
Fields
|
Instances
Generic Transaction | |
Defined in Hledger.Data.Types Associated Types type Rep Transaction :: Type -> Type | |
Show Transaction | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> Transaction -> ShowS show :: Transaction -> String showList :: [Transaction] -> ShowS | |
Eq Transaction | |
Defined in Hledger.Data.Types | |
Anon Transaction # | |
Defined in Hledger.Cli.Anon Methods anon :: Transaction -> Transaction # | |
type Rep Transaction | |
Defined in Hledger.Data.Types type Rep Transaction = D1 ('MetaData "Transaction" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Transaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tindex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "tprecedingcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SourcePos, SourcePos)) :*: (S1 ('MetaSel ('Just "tdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Just "tdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day))))) :*: ((S1 ('MetaSel ('Just "tstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "tcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "tcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "ttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "tpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Posting])))))) |
Constructors
Posting | |
Fields
|
Instances
Generic Posting | |
Show Posting | Posting's show instance elides the parent transaction so as not to recurse forever. |
Eq Posting | |
Anon Posting # | |
Defined in Hledger.Cli.Anon | |
type Rep Posting | |
Defined in Hledger.Data.Types type Rep Posting = D1 ('MetaData "Posting" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Posting" 'PrefixI 'True) (((S1 ('MetaSel ('Just "pdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day)) :*: S1 ('MetaSel ('Just "pdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day))) :*: (S1 ('MetaSel ('Just "pstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "paccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "pamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount)))) :*: ((S1 ('MetaSel ('Just "pcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "ptype") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PostingType) :*: S1 ('MetaSel ('Just "ptags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]))) :*: (S1 ('MetaSel ('Just "pbalanceassertion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe BalanceAssertion)) :*: (S1 ('MetaSel ('Just "ptransaction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Transaction)) :*: S1 ('MetaSel ('Just "poriginal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Posting))))))) |
data BalanceAssertion #
A balance assertion is a declaration about an account's expected balance at a certain point (posting date and parse order). They provide additional error checking and readability to a journal file.
A balance assignments is an instruction to hledger to adjust an account's balance to a certain amount at a certain point.
The BalanceAssertion
type is used for representing both of these.
hledger supports multiple kinds of balance assertions/assignments, which differ in whether they refer to a single commodity or all commodities, and the (subaccount-)inclusive or exclusive account balance.
Constructors
BalanceAssertion | |
Fields
|
Instances
Generic BalanceAssertion | |
Defined in Hledger.Data.Types Associated Types type Rep BalanceAssertion :: Type -> Type Methods from :: BalanceAssertion -> Rep BalanceAssertion x to :: Rep BalanceAssertion x -> BalanceAssertion | |
Show BalanceAssertion | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> BalanceAssertion -> ShowS show :: BalanceAssertion -> String showList :: [BalanceAssertion] -> ShowS | |
Eq BalanceAssertion | |
Defined in Hledger.Data.Types Methods (==) :: BalanceAssertion -> BalanceAssertion -> Bool (/=) :: BalanceAssertion -> BalanceAssertion -> Bool | |
type Rep BalanceAssertion | |
Defined in Hledger.Data.Types type Rep BalanceAssertion = D1 ('MetaData "BalanceAssertion" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "BalanceAssertion" 'PrefixI 'True) ((S1 ('MetaSel ('Just "baamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Amount) :*: S1 ('MetaSel ('Just "batotal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "bainclusive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "baposition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos)))) |
The status of a transaction or posting, recorded with a status mark (nothing, !, or *). What these mean is ultimately user defined.
Instances
Bounded Status | |
Defined in Hledger.Data.Types | |
Enum Status | |
Defined in Hledger.Data.Types | |
Generic Status | |
Show Status | |
Eq Status | |
Ord Status | |
type Rep Status | |
Defined in Hledger.Data.Types type Rep Status = D1 ('MetaData "Status" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Unmarked" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Pending" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cleared" 'PrefixI 'False) (U1 :: Type -> Type))) |
data PostingType #
Constructors
RegularPosting | |
VirtualPosting | |
BalancedVirtualPosting |
Instances
Generic PostingType | |
Defined in Hledger.Data.Types Associated Types type Rep PostingType :: Type -> Type | |
Show PostingType | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> PostingType -> ShowS show :: PostingType -> String showList :: [PostingType] -> ShowS | |
Eq PostingType | |
Defined in Hledger.Data.Types | |
type Rep PostingType | |
Defined in Hledger.Data.Types type Rep PostingType = D1 ('MetaData "PostingType" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "RegularPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "VirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BalancedVirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type))) |
data MixedAmount #
Instances
Generic MixedAmount | |
Defined in Hledger.Data.Types Associated Types type Rep MixedAmount :: Type -> Type | |
Show MixedAmount | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> MixedAmount -> ShowS show :: MixedAmount -> String showList :: [MixedAmount] -> ShowS | |
Eq MixedAmount | |
Defined in Hledger.Data.Types | |
Ord MixedAmount | |
Defined in Hledger.Data.Types Methods compare :: MixedAmount -> MixedAmount -> Ordering # (<) :: MixedAmount -> MixedAmount -> Bool # (<=) :: MixedAmount -> MixedAmount -> Bool # (>) :: MixedAmount -> MixedAmount -> Bool # (>=) :: MixedAmount -> MixedAmount -> Bool # max :: MixedAmount -> MixedAmount -> MixedAmount # min :: MixedAmount -> MixedAmount -> MixedAmount # | |
type Rep MixedAmount | |
Defined in Hledger.Data.Types type Rep MixedAmount = D1 ('MetaData "MixedAmount" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'True) (C1 ('MetaCons "Mixed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map MixedAmountKey Amount)))) |
class HasAmounts a where #
Types with this class have one or more amounts, which can have display styles applied to them.
Methods
styleAmounts :: Map CommoditySymbol AmountStyle -> a -> a #
Instances
Constructors
Amount | |
Fields
|
Instances
Generic Amount | |
Show Amount | |
Eq Amount | |
Ord Amount | |
type Rep Amount | |
Defined in Hledger.Data.Types type Rep Amount = D1 ('MetaData "Amount" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Amount" 'PrefixI 'True) ((S1 ('MetaSel ('Just "acommodity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "aquantity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity)) :*: (S1 ('MetaSel ('Just "astyle") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AmountStyle) :*: S1 ('MetaSel ('Just "aprice") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe AmountPrice))))) |
Constructors
Commodity | |
Fields |
Instances
Generic Commodity | |
Show Commodity | |
Eq Commodity | |
type Rep Commodity | |
Defined in Hledger.Data.Types type Rep Commodity = D1 ('MetaData "Commodity" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Commodity" 'PrefixI 'True) (S1 ('MetaSel ('Just "csymbol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "cformat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AmountStyle)))) |
type CommoditySymbol = Text #
data DigitGroupStyle #
A style for displaying digit groups in the integer part of a floating point number. It consists of the character used to separate groups (comma or period, whichever is not used as decimal point), and the size of each group, starting with the one nearest the decimal point. The last group size is assumed to repeat. Eg, comma between thousands is DigitGroups ',' [3].
Constructors
DigitGroups !Char ![Word8] |
Instances
data AmountPrecision #
The "display precision" for a hledger amount, by which we mean the number of decimal digits to display to the right of the decimal mark.
Constructors
Precision !Word8 | show this many decimal digits (0..255) |
NaturalPrecision | show all significant decimal digits stored internally |
Instances
data AmountStyle #
The display style for an amount. (See also Amount.AmountDisplayOpts).
Constructors
AmountStyle | |
Fields
|
Instances
Generic AmountStyle | |
Defined in Hledger.Data.Types Associated Types type Rep AmountStyle :: Type -> Type | |
Read AmountStyle | |
Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AmountStyle # readList :: ReadS [AmountStyle] # readPrec :: ReadPrec AmountStyle # readListPrec :: ReadPrec [AmountStyle] # | |
Show AmountStyle | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountStyle -> ShowS show :: AmountStyle -> String showList :: [AmountStyle] -> ShowS | |
Eq AmountStyle | |
Defined in Hledger.Data.Types | |
Ord AmountStyle | |
Defined in Hledger.Data.Types Methods compare :: AmountStyle -> AmountStyle -> Ordering # (<) :: AmountStyle -> AmountStyle -> Bool # (<=) :: AmountStyle -> AmountStyle -> Bool # (>) :: AmountStyle -> AmountStyle -> Bool # (>=) :: AmountStyle -> AmountStyle -> Bool # max :: AmountStyle -> AmountStyle -> AmountStyle # min :: AmountStyle -> AmountStyle -> AmountStyle # | |
type Rep AmountStyle | |
Defined in Hledger.Data.Types type Rep AmountStyle = D1 ('MetaData "AmountStyle" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "AmountStyle" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ascommodityside") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Side) :*: S1 ('MetaSel ('Just "ascommodityspaced") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "asdigitgroups") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe DigitGroupStyle)) :*: (S1 ('MetaSel ('Just "asdecimalmark") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Char)) :*: S1 ('MetaSel ('Just "asprecision") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe AmountPrecision)))))) |
data AmountPrice #
An amount's per-unit or total cost/selling price in another
commodity, as recorded in the journal entry eg with or
@.
Cost, formerly AKA "transaction price". The amount is always positive.
Constructors
UnitPrice !Amount | |
TotalPrice !Amount |
Instances
Generic AmountPrice | |
Defined in Hledger.Data.Types Associated Types type Rep AmountPrice :: Type -> Type | |
Show AmountPrice | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountPrice -> ShowS show :: AmountPrice -> String showList :: [AmountPrice] -> ShowS | |
Eq AmountPrice | |
Defined in Hledger.Data.Types | |
Ord AmountPrice | |
Defined in Hledger.Data.Types Methods compare :: AmountPrice -> AmountPrice -> Ordering # (<) :: AmountPrice -> AmountPrice -> Bool # (<=) :: AmountPrice -> AmountPrice -> Bool # (>) :: AmountPrice -> AmountPrice -> Bool # (>=) :: AmountPrice -> AmountPrice -> Bool # max :: AmountPrice -> AmountPrice -> AmountPrice # min :: AmountPrice -> AmountPrice -> AmountPrice # | |
type Rep AmountPrice | |
Defined in Hledger.Data.Types type Rep AmountPrice = D1 ('MetaData "AmountPrice" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "UnitPrice" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Amount)) :+: C1 ('MetaCons "TotalPrice" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Amount))) |
type DecimalMark = Char #
One of the decimal marks we support: either period or comma.
Instances
Generic Side | |
Read Side | |
Show Side | |
Eq Side | |
Ord Side | |
type Rep Side | |
Defined in Hledger.Data.Types type Rep Side = D1 ('MetaData "Side" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type)) |
data AccountAlias #
Constructors
BasicAlias AccountName AccountName | |
RegexAlias Regexp Replacement |
Instances
Generic AccountAlias | |
Defined in Hledger.Data.Types Associated Types type Rep AccountAlias :: Type -> Type | |
Read AccountAlias | |
Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AccountAlias # readList :: ReadS [AccountAlias] # readPrec :: ReadPrec AccountAlias # readListPrec :: ReadPrec [AccountAlias] # | |
Show AccountAlias | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountAlias -> ShowS show :: AccountAlias -> String showList :: [AccountAlias] -> ShowS | |
Eq AccountAlias | |
Defined in Hledger.Data.Types | |
Ord AccountAlias | |
Defined in Hledger.Data.Types Methods compare :: AccountAlias -> AccountAlias -> Ordering # (<) :: AccountAlias -> AccountAlias -> Bool # (<=) :: AccountAlias -> AccountAlias -> Bool # (>) :: AccountAlias -> AccountAlias -> Bool # (>=) :: AccountAlias -> AccountAlias -> Bool # max :: AccountAlias -> AccountAlias -> AccountAlias # min :: AccountAlias -> AccountAlias -> AccountAlias # | |
type Rep AccountAlias | |
Defined in Hledger.Data.Types type Rep AccountAlias = D1 ('MetaData "AccountAlias" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "BasicAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName)) :+: C1 ('MetaCons "RegexAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Regexp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Replacement))) |
data AccountType #
Constructors
Asset | |
Liability | |
Equity | |
Revenue | |
Expense | |
Cash | a subtype of Asset - liquid assets to show in cashflow report |
Conversion | a subtype of Equity - account in which to generate conversion postings for transaction prices |
Instances
Generic AccountType | |
Defined in Hledger.Data.Types Associated Types type Rep AccountType :: Type -> Type | |
Show AccountType | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountType -> ShowS show :: AccountType -> String showList :: [AccountType] -> ShowS | |
Eq AccountType | |
Defined in Hledger.Data.Types | |
Ord AccountType | |
Defined in Hledger.Data.Types Methods compare :: AccountType -> AccountType -> Ordering # (<) :: AccountType -> AccountType -> Bool # (<=) :: AccountType -> AccountType -> Bool # (>) :: AccountType -> AccountType -> Bool # (>=) :: AccountType -> AccountType -> Bool # max :: AccountType -> AccountType -> AccountType # min :: AccountType -> AccountType -> AccountType # | |
type Rep AccountType | |
Defined in Hledger.Data.Types type Rep AccountType = D1 ('MetaData "AccountType" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) ((C1 ('MetaCons "Asset" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Liability" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Equity" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Revenue" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Expense" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cash" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Conversion" 'PrefixI 'False) (U1 :: Type -> Type)))) |
type AccountName = Text #
Constructors
NoInterval | |
Days Int | |
Weeks Int | |
Months Int | |
Quarters Int | |
Years Int | |
DayOfMonth Int | |
WeekdayOfMonth Int Int | |
DaysOfWeek [Int] | |
DayOfYear Int Int |
Instances
Generic Interval | |
Show Interval | |
Default Interval | |
Defined in Hledger.Data.Types | |
Eq Interval | |
Ord Interval | |
Defined in Hledger.Data.Types | |
type Rep Interval | |
Defined in Hledger.Data.Types type Rep Interval = D1 ('MetaData "Interval" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (((C1 ('MetaCons "NoInterval" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Days" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "Weeks" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: (C1 ('MetaCons "Months" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "Quarters" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) :+: ((C1 ('MetaCons "Years" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "DayOfMonth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "WeekdayOfMonth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: (C1 ('MetaCons "DaysOfWeek" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])) :+: C1 ('MetaCons "DayOfYear" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))))) |
type DayOfMonth = Int #
Constructors
DayPeriod Day | |
WeekPeriod Day | |
MonthPeriod Year Month | |
QuarterPeriod Year Quarter | |
YearPeriod Year | |
PeriodBetween Day Day | |
PeriodFrom Day | |
PeriodTo Day | |
PeriodAll |
Instances
Generic Period | |
Show Period | |
Default Period | |
Defined in Hledger.Data.Types | |
Eq Period | |
Ord Period | |
type Rep Period | |
Defined in Hledger.Data.Types type Rep Period = D1 ('MetaData "Period" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (((C1 ('MetaCons "DayPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "WeekPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day))) :+: (C1 ('MetaCons "MonthPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Month)) :+: C1 ('MetaCons "QuarterPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quarter)))) :+: ((C1 ('MetaCons "YearPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year)) :+: C1 ('MetaCons "PeriodBetween" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day))) :+: (C1 ('MetaCons "PeriodFrom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: (C1 ('MetaCons "PeriodTo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "PeriodAll" 'PrefixI 'False) (U1 :: Type -> Type))))) |
A possibly open-ended span of time, from an optional inclusive start date to an optional exclusive end date. Each date can be either exact or flexible. An "exact date span" is a Datepan with exact start and end dates.
Instances
Generic DateSpan | |
Default DateSpan | |
Defined in Hledger.Data.Types | |
Eq DateSpan | |
Ord DateSpan | |
Defined in Hledger.Data.Types | |
type Rep DateSpan | |
Defined in Hledger.Data.Types type Rep DateSpan = D1 ('MetaData "DateSpan" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "DateSpan" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EFDay)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EFDay)))) |
A date which is either exact or flexible. Flexible dates are allowed to be adjusted in certain situations.
Instances
Generic EFDay | |
Show EFDay | |
Eq EFDay | |
Ord EFDay | |
type Rep EFDay | |
Defined in Hledger.Data.Types type Rep EFDay = D1 ('MetaData "EFDay" "Hledger.Data.Types" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "Exact" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "Flex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day))) |
Constructors
PrimaryDate | |
SecondaryDate |
data SmartInterval #
Instances
Show SmartInterval | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> SmartInterval -> ShowS show :: SmartInterval -> String showList :: [SmartInterval] -> ShowS |
Constructors
ModifiedJulianDay | |
Fields
|
Instances
FromJSON Day | |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey Day | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON Day | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey Day | |
Defined in Data.Aeson.Types.ToJSON | |
Data Day | |
Defined in Data.Time.Calendar.Days Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Day -> c Day gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Day dataTypeOf :: Day -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Day) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day) gmapT :: (forall b. Data b => b -> b) -> Day -> Day gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r gmapQ :: (forall d. Data d => d -> u) -> Day -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Day -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Day -> m Day gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day | |
Enum Day | |
Ix Day | |
NFData Day | |
Defined in Data.Time.Calendar.Days | |
Eq Day | |
Ord Day | |
DayPeriod Day | |
Defined in Data.Time.Calendar.Days |
A possibly incomplete year-month-day date provided by the user, to be
interpreted as either a date or a date span depending on context. Missing
parts "on the left" will be filled from the provided reference date, e.g. if
the year and month are missing, the reference date's year and month are used.
Missing parts "on the right" are assumed, when interpreting as a date, to be
1, (e.g. if the year and month are present but the day is missing, it means
first day of that month); or when interpreting as a date span, to be a
wildcard (so it would mean all days of that month). See the smartdate
parser for more examples.
Or, one of the standard periods and an offset relative to the reference date: (last|this|next) (day|week|month|quarter|year), where "this" means the period containing the reference date.
Constructors
SmartCompleteDate Day | |
SmartAssumeStart Year (Maybe Month) | |
SmartFromReference (Maybe Month) MonthDay | |
SmartMonth Month | |
SmartRelative Integer SmartInterval |
type HledgerParseErrors = ParseErrorBundle Text HledgerParseErrorData #
A specialised version of ParseErrorBundle:
a non-empty collection of hledger parse errors,
equipped with PosState to help pretty-print them.
Specialised for a Text
parse stream.
data HledgerParseErrorData #
Custom error data for hledger parsers. Specialised for a Text
parse stream.
ReparseableTextParseErrorData ?
Instances
data WideBuilder #
Helper for constructing Builders while keeping track of text width.
Constructors
WideBuilder | |
Instances
Monoid WideBuilder | |
Defined in Text.WideString Methods mempty :: WideBuilder # mappend :: WideBuilder -> WideBuilder -> WideBuilder # mconcat :: [WideBuilder] -> WideBuilder # | |
Semigroup WideBuilder | |
Defined in Text.WideString Methods (<>) :: WideBuilder -> WideBuilder -> WideBuilder # sconcat :: NonEmpty WideBuilder -> WideBuilder # stimes :: Integral b => b -> WideBuilder -> WideBuilder # | |
Show WideBuilder | |
Defined in Text.WideString Methods showsPrec :: Int -> WideBuilder -> ShowS show :: WideBuilder -> String showList :: [WideBuilder] -> ShowS |
type TextParser (m :: Type -> Type) a = ParsecT HledgerParseErrorData Text m a #
A parser of text that runs in some monad.
type SimpleTextParser = Parsec HledgerParseErrorData Text #
A parser of strict text to some type.
type SimpleStringParser a = Parsec HledgerParseErrorData String a #
A parser of string to some type.
The result of running cmdargs: an association list of option names to string values.
data ReportItemField #
An id identifying which report item field to interpolate. These are drawn from several hledger report types, so are not all applicable for a given report.
Constructors
AccountField | A posting or balance report item's account name |
DefaultDateField | A posting or register or entry report item's date |
DescriptionField | A posting or register or entry report item's description |
TotalField | A balance or posting report item's balance or running total. Always rendered right-justified. |
DepthSpacerField | A balance report item's indent level (which may be different from the account name depth). Rendered as this number of spaces, multiplied by the minimum width spec if any. |
FieldNo Int | A report item's nth field. May be unimplemented. |
Instances
Show ReportItemField | |
Defined in Hledger.Data.StringFormat Methods showsPrec :: Int -> ReportItemField -> ShowS show :: ReportItemField -> String showList :: [ReportItemField] -> ShowS | |
Eq ReportItemField | |
Defined in Hledger.Data.StringFormat Methods (==) :: ReportItemField -> ReportItemField -> Bool (/=) :: ReportItemField -> ReportItemField -> Bool |
data StringFormatComponent #
Constructors
FormatLiteral Text | Literal text to be rendered as-is |
FormatField Bool (Maybe Int) (Maybe Int) ReportItemField | A data field to be formatted and interpolated. Parameters:
|
Instances
Show StringFormatComponent | |
Defined in Hledger.Data.StringFormat Methods showsPrec :: Int -> StringFormatComponent -> ShowS show :: StringFormatComponent -> String showList :: [StringFormatComponent] -> ShowS | |
Eq StringFormatComponent | |
Defined in Hledger.Data.StringFormat Methods (==) :: StringFormatComponent -> StringFormatComponent -> Bool (/=) :: StringFormatComponent -> StringFormatComponent -> Bool |
data StringFormat #
A format specification/template to use when rendering a report line item as text.
A format is a sequence of components; each is either a literal string, or a hledger report item field with specified width and justification whose value will be interpolated at render time.
A component's value may be a multi-line string (or a multi-commodity amount), in which case the final string will be either single-line or a top or bottom-aligned multi-line string depending on the StringFormat variant used.
Currently this is only used in the balance command's single-column mode, which provides a limited StringFormat renderer.
Constructors
OneLine [StringFormatComponent] | multi-line values will be rendered on one line, comma-separated |
TopAligned [StringFormatComponent] | values will be top-aligned (and bottom-padded to the same height) |
BottomAligned [StringFormatComponent] | values will be bottom-aligned (and top-padded) |
Instances
Show StringFormat | |
Defined in Hledger.Data.StringFormat Methods showsPrec :: Int -> StringFormat -> ShowS show :: StringFormat -> String showList :: [StringFormat] -> ShowS | |
Default StringFormat | |
Defined in Hledger.Data.StringFormat Methods def :: StringFormat # | |
Eq StringFormat | |
Defined in Hledger.Data.StringFormat |
data AmountDisplayOpts #
Options for the display of Amount and MixedAmount. (See also Types.AmountStyle)
Constructors
AmountDisplayOpts | |
Fields
|
Instances
Show AmountDisplayOpts | |
Defined in Hledger.Data.Amount Methods showsPrec :: Int -> AmountDisplayOpts -> ShowS show :: AmountDisplayOpts -> String showList :: [AmountDisplayOpts] -> ShowS | |
Default AmountDisplayOpts | By default, display Amount and MixedAmount using |
Defined in Hledger.Data.Amount Methods |
type PriceOracle = (Day, CommoditySymbol, Maybe CommoditySymbol) -> Maybe (CommoditySymbol, Quantity) #
A price oracle is a magic memoising function that efficiently looks up market prices (exchange rates) from one commodity to another (or if unspecified, to a default valuation commodity) on a given date.
data ValuationType #
What kind of value conversion should be done on amounts ? CLI: --value=then|end|now|DATE[,COMM]
Constructors
AtThen (Maybe CommoditySymbol) | convert to default or given valuation commodity, using market prices at each posting's date |
AtEnd (Maybe CommoditySymbol) | convert to default or given valuation commodity, using market prices at period end(s) |
AtNow (Maybe CommoditySymbol) | convert to default or given valuation commodity, using current market prices |
AtDate Day (Maybe CommoditySymbol) | convert to default or given valuation commodity, using market prices on some date |
Instances
Show ValuationType | |
Defined in Hledger.Data.Valuation Methods showsPrec :: Int -> ValuationType -> ShowS show :: ValuationType -> String showList :: [ValuationType] -> ShowS | |
Eq ValuationType | |
Defined in Hledger.Data.Valuation |
data ConversionOp #
Which operation to perform on conversion transactions. (There was also an "infer equity postings" operation, but that is now done earlier, in journal finalisation.)
Constructors
NoConversionOp | |
ToCost |
Instances
Show ConversionOp | |
Defined in Hledger.Data.Valuation Methods showsPrec :: Int -> ConversionOp -> ShowS show :: ConversionOp -> String showList :: [ConversionOp] -> ShowS | |
Eq ConversionOp | |
Defined in Hledger.Data.Valuation |
A query option changes a query's/report's behaviour and output in some way.
Constructors
QueryOptInAcctOnly AccountName | show an account register focussed on this account |
QueryOptInAcct AccountName | as above but include sub-accounts in the account register | QueryOptCostBasis -- ^ show amounts converted to cost where possible | QueryOptDate2 -- ^ show secondary dates instead of primary dates |
A more expressive Ord, used for amt: queries. The Abs* variants compare with the absolute value of a number, ignoring sign.
A query is a composition of search criteria, which can be used to match postings, transactions, accounts and more.
Constructors
Not Query | negate this match |
And [Query] | match if all of these match |
Or [Query] | match if any of these match no-op queries |
Any | always match |
None | never match data queries (in "standard" order, roughly as they appear in a transaction) |
Date DateSpan | match primary dates in this date span |
Date2 DateSpan | match secondary dates in this date span |
StatusQ Status | match this txn/posting status |
Code Regexp | match txn codes infix-matched by this regexp |
Desc Regexp | match txn descriptions infix-matched by this regexp |
Tag Regexp (Maybe Regexp) | match if a tag's name, and optionally its value, is infix-matched by the respective regexps |
Acct Regexp | match account names infix-matched by this regexp |
Type [AccountType] | match accounts whose type is one of these (or with no types, any account) |
Depth Int | match if account depth is less than or equal to this value (or, sometimes used as a display option) |
Real Bool | match postings with this "realness" value |
Amt OrdPlus Quantity | match if the amount's numeric quantity is less thangreater thanequal to/unsignedly equal to some value |
Sym Regexp | match if the commodity symbol is fully-matched by this regexp |
Instances
type ErroringJournalParser (m :: Type -> Type) a = StateT Journal (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError m)) a #
A parser of text that runs in some monad, keeping a Journal as state, that can throw an exception to end parsing, preventing further parser backtracking.
type JournalParser (m :: Type -> Type) a = StateT Journal (ParsecT HledgerParseErrorData Text m) a #
A parser of text that runs in some monad, keeping a Journal as state.
data BalancingOpts #
Constructors
BalancingOpts | |
Fields
|
Instances
Show BalancingOpts | |
Defined in Hledger.Data.Balancing Methods showsPrec :: Int -> BalancingOpts -> ShowS show :: BalancingOpts -> String showList :: [BalancingOpts] -> ShowS | |
HasBalancingOpts BalancingOpts | |
Defined in Hledger.Data.Balancing Methods balancingOpts :: Lens' BalancingOpts BalancingOpts # commodity_styles :: Lens' BalancingOpts (Maybe (Map CommoditySymbol AmountStyle)) # ignore_assertions :: Lens' BalancingOpts Bool # infer_balancing_costs :: Lens' BalancingOpts Bool # |
class HasBalancingOpts c where #
Minimal complete definition
Methods
balancingOpts :: Lens' c BalancingOpts #
commodity_styles :: Lens' c (Maybe (Map CommoditySymbol AmountStyle)) #
ignore_assertions :: Lens' c Bool #
infer_balancing_costs :: Lens' c Bool #
Instances
HasBalancingOpts CliOpts # | |
Defined in Hledger.Cli.CliOptions Methods balancingOpts :: Lens' CliOpts BalancingOpts # commodity_styles :: Lens' CliOpts (Maybe (Map CommoditySymbol AmountStyle)) # ignore_assertions :: Lens' CliOpts Bool # infer_balancing_costs :: Lens' CliOpts Bool # | |
HasBalancingOpts BalancingOpts | |
Defined in Hledger.Data.Balancing Methods balancingOpts :: Lens' BalancingOpts BalancingOpts # commodity_styles :: Lens' BalancingOpts (Maybe (Map CommoditySymbol AmountStyle)) # ignore_assertions :: Lens' BalancingOpts Bool # infer_balancing_costs :: Lens' BalancingOpts Bool # | |
HasBalancingOpts InputOpts | |
Defined in Hledger.Read.InputOptions Methods balancingOpts :: Lens' InputOpts BalancingOpts # commodity_styles :: Lens' InputOpts (Maybe (Map CommoditySymbol AmountStyle)) # ignore_assertions :: Lens' InputOpts Bool # infer_balancing_costs :: Lens' InputOpts Bool # |
Constructors
InputOpts | |
Fields
|
Instances
class HasInputOpts c where #
Minimal complete definition
Methods
inputOpts :: Lens' c InputOpts #
balancingopts :: Lens' c BalancingOpts #
forecast :: Lens' c (Maybe DateSpan) #
infer_costs :: Lens' c Bool #
infer_equity :: Lens' c Bool #
mformat :: Lens' c (Maybe StorageFormat) #
mrules_file :: Lens' c (Maybe FilePath) #
reportspan :: Lens' c DateSpan #
verbose_tags :: Lens' c Bool #
Instances
data ReportSpec #
A fully-determined set of report parameters (report options with all partial values made total, eg the begin and end dates are known, avoiding date/regex errors; plus the reporting date), and the query successfully calculated from them.
If you change the report options or date in one of these, you should
use reportOptsToSpec
to regenerate the whole thing, avoiding inconsistency.
Constructors
ReportSpec | |
Fields
|
Instances
data ReportOpts #
Standard options for customising report filtering and output. Most of these correspond to standard hledger command-line options or query arguments, but not all. Some are used only by certain commands, as noted below.
Constructors
ReportOpts | |
Fields
|
Instances
Constructors
LayoutWide (Maybe Int) | |
LayoutTall | |
LayoutBare | |
LayoutTidy |
data AccountListMode #
Should accounts be displayed: in the command's default style, hierarchically, or as a flat list ?
Instances
Show AccountListMode | |
Defined in Hledger.Reports.ReportOptions Methods showsPrec :: Int -> AccountListMode -> ShowS show :: AccountListMode -> String showList :: [AccountListMode] -> ShowS | |
Default AccountListMode | |
Defined in Hledger.Reports.ReportOptions Methods def :: AccountListMode # | |
Eq AccountListMode | |
Defined in Hledger.Reports.ReportOptions Methods (==) :: AccountListMode -> AccountListMode -> Bool (/=) :: AccountListMode -> AccountListMode -> Bool |
data BalanceAccumulation #
How to accumulate calculated values across periods (columns) in a balance report. "Balance report types -> Accumulation type" in the hledger manual.
Constructors
PerPeriod | No accumulation. Eg, shows the change of balance in each period. |
Cumulative | Accumulate changes across periods, starting from zero at report start. |
Historical | Accumulate changes across periods, including any from before report start. Eg, shows the historical end balance of each period. |
Instances
Show BalanceAccumulation | |
Defined in Hledger.Reports.ReportOptions Methods showsPrec :: Int -> BalanceAccumulation -> ShowS show :: BalanceAccumulation -> String showList :: [BalanceAccumulation] -> ShowS | |
Default BalanceAccumulation | |
Defined in Hledger.Reports.ReportOptions Methods | |
Eq BalanceAccumulation | |
Defined in Hledger.Reports.ReportOptions Methods (==) :: BalanceAccumulation -> BalanceAccumulation -> Bool (/=) :: BalanceAccumulation -> BalanceAccumulation -> Bool |
data BalanceCalculation #
What to calculate for each cell in a balance report. "Balance report types -> Calculation type" in the hledger manual.
Constructors
CalcChange | Sum of posting amounts in the period. |
CalcBudget | Sum of posting amounts and the goal for the period. |
CalcValueChange | Change from previous period's historical end value to this period's historical end value. |
CalcGain | Change from previous period's gain, i.e. valuation minus cost basis. |
CalcPostingsCount | Number of postings in the period. |
Instances
Show BalanceCalculation | |
Defined in Hledger.Reports.ReportOptions Methods showsPrec :: Int -> BalanceCalculation -> ShowS show :: BalanceCalculation -> String showList :: [BalanceCalculation] -> ShowS | |
Default BalanceCalculation | |
Defined in Hledger.Reports.ReportOptions Methods | |
Eq BalanceCalculation | |
Defined in Hledger.Reports.ReportOptions Methods (==) :: BalanceCalculation -> BalanceCalculation -> Bool (/=) :: BalanceCalculation -> BalanceCalculation -> Bool |
class HasReportOptsNoUpdate c where #
Lenses for ReportOpts.
Minimal complete definition
Methods
reportOptsNoUpdate :: Lens' c ReportOpts #
accountlistmode :: Lens' c AccountListMode #
balanceaccum :: Lens' c BalanceAccumulation #
balancecalc :: Lens' c BalanceCalculation #
budgetpat :: Lens' c (Maybe Text) #
conversionop :: Lens' c (Maybe ConversionOp) #
date2NoUpdate :: Lens' c Bool #
depthNoUpdate :: Lens' c (Maybe Int) #
format :: Lens' c StringFormat #
infer_prices :: Lens' c Bool #
interval :: Lens' c Interval #
normalbalance :: Lens' c (Maybe NormalSign) #
periodNoUpdate :: Lens' c Period #
querystringNoUpdate :: Lens' c [Text] #
realNoUpdate :: Lens' c Bool #
show_costs :: Lens' c Bool #
sort_amount :: Lens' c Bool #
statusesNoUpdate :: Lens' c [Status] #
transpose__ :: Lens' c Bool #
value :: Lens' c (Maybe ValuationType) #
Instances
class HasReportOptsNoUpdate a => HasReportOpts a where #
Special lenses for ReportOpts which also update the Query and QueryOpts in ReportSpec. Note that these are not true lenses, as they have a further restriction on the functor. This will work as a normal lens for all common uses, but since they don't obey the lens laws for some fancy cases, they may fail in some exotic circumstances.
Note that setEither/overEither should only be necessary with querystring and reportOpts: the other lenses should never fail.
Examples:
>>>
import Lens.Micro (set)
>>>
_rsQuery <$> setEither querystring ["assets"] defreportspec
Right (Acct (RegexpCI "assets"))>>>
_rsQuery <$> setEither querystring ["(assets"] defreportspec
Left "This regular expression is malformed, please correct it:\n(assets">>>
_rsQuery $ set querystring ["assets"] defreportspec
Acct (RegexpCI "assets")>>>
_rsQuery $ set querystring ["(assets"] defreportspec
*** Exception: Error: Updating ReportSpec failed: try using overEither instead of over or setEither instead of set>>>
_rsQuery $ set period (MonthPeriod 2021 08) defreportspec
Date DateSpan 2021-08
Minimal complete definition
Nothing
Methods
reportOpts :: ReportableLens' a ReportOpts #
period :: ReportableLens' a Period #
statuses :: ReportableLens' a [Status] #
depth :: ReportableLens' a (Maybe Int) #
date2 :: ReportableLens' a Bool #
real :: ReportableLens' a Bool #
querystring :: ReportableLens' a [Text] #
Instances
class HasReportSpec c where #
Minimal complete definition
Methods
reportSpec :: Lens' c ReportSpec #
rsQueryOpts :: Lens' c [QueryOpt] #
rsReportOpts :: Lens' c ReportOpts #
Instances
HasReportSpec CliOpts # | |
Defined in Hledger.Cli.CliOptions Methods reportSpec :: Lens' CliOpts ReportSpec # rsQuery :: Lens' CliOpts Query # rsQueryOpts :: Lens' CliOpts [QueryOpt] # | |
HasReportSpec ReportSpec | |
Defined in Hledger.Reports.ReportOptions Methods reportSpec :: Lens' ReportSpec ReportSpec # rsDay :: Lens' ReportSpec Day # rsQuery :: Lens' ReportSpec Query # rsQueryOpts :: Lens' ReportSpec [QueryOpt] # |
data DisplayName #
A full name, display name, and depth for an account.
Constructors
DisplayName | |
Fields
|
Instances
ToJSON DisplayName | |
Defined in Hledger.Reports.ReportTypes Methods toJSON :: DisplayName -> Value # toEncoding :: DisplayName -> Encoding # toJSONList :: [DisplayName] -> Value # toEncodingList :: [DisplayName] -> Encoding # omitField :: DisplayName -> Bool # | |
Show DisplayName | |
Defined in Hledger.Reports.ReportTypes Methods showsPrec :: Int -> DisplayName -> ShowS show :: DisplayName -> String showList :: [DisplayName] -> ShowS | |
Eq DisplayName | |
Defined in Hledger.Reports.ReportTypes | |
Ord DisplayName | |
Defined in Hledger.Reports.ReportTypes Methods compare :: DisplayName -> DisplayName -> Ordering # (<) :: DisplayName -> DisplayName -> Bool # (<=) :: DisplayName -> DisplayName -> Bool # (>) :: DisplayName -> DisplayName -> Bool # (>=) :: DisplayName -> DisplayName -> Bool # max :: DisplayName -> DisplayName -> DisplayName # min :: DisplayName -> DisplayName -> DisplayName # |
data CBCSubreportSpec a #
Description of one subreport within a compound balance report. Part of a CompoundBalanceCommandSpec, but also used in hledger-lib.
Constructors
CBCSubreportSpec | |
Fields
|
data CompoundPeriodicReport a b #
A compound balance report has:
- an overall title
- the period (date span) of each column
- one or more named, normal-positive multi balance reports, with columns corresponding to the above, and a flag indicating whether they increased or decreased the overall totals
- a list of overall totals for each column, and their grand total and average
It is used in compound balance report commands like balancesheet, cashflow and incomestatement.
Constructors
CompoundPeriodicReport | |
Fields
|
Instances
Functor (CompoundPeriodicReport a) | |
Defined in Hledger.Reports.ReportTypes Methods fmap :: (a0 -> b) -> CompoundPeriodicReport a a0 -> CompoundPeriodicReport a b # (<$) :: a0 -> CompoundPeriodicReport a b -> CompoundPeriodicReport a a0 # | |
(ToJSON b, ToJSON a) => ToJSON (CompoundPeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Methods toJSON :: CompoundPeriodicReport a b -> Value # toEncoding :: CompoundPeriodicReport a b -> Encoding # toJSONList :: [CompoundPeriodicReport a b] -> Value # toEncodingList :: [CompoundPeriodicReport a b] -> Encoding # omitField :: CompoundPeriodicReport a b -> Bool # | |
Generic (CompoundPeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Associated Types type Rep (CompoundPeriodicReport a b) :: Type -> Type Methods from :: CompoundPeriodicReport a b -> Rep (CompoundPeriodicReport a b) x to :: Rep (CompoundPeriodicReport a b) x -> CompoundPeriodicReport a b | |
(Show a, Show b) => Show (CompoundPeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Methods showsPrec :: Int -> CompoundPeriodicReport a b -> ShowS show :: CompoundPeriodicReport a b -> String showList :: [CompoundPeriodicReport a b] -> ShowS | |
HasAmounts b => HasAmounts (CompoundPeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> CompoundPeriodicReport a b -> CompoundPeriodicReport a b # | |
type Rep (CompoundPeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes type Rep (CompoundPeriodicReport a b) = D1 ('MetaData "CompoundPeriodicReport" "Hledger.Reports.ReportTypes" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "CompoundPeriodicReport" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cbrTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "cbrDates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DateSpan])) :*: (S1 ('MetaSel ('Just "cbrSubreports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, PeriodicReport a b, Bool)]) :*: S1 ('MetaSel ('Just "cbrTotals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PeriodicReportRow () b))))) |
data PeriodicReportRow a b #
Constructors
PeriodicReportRow | |
Fields
|
Instances
Bifunctor PeriodicReportRow | |
Defined in Hledger.Reports.ReportTypes Methods bimap :: (a -> b) -> (c -> d) -> PeriodicReportRow a c -> PeriodicReportRow b d # first :: (a -> b) -> PeriodicReportRow a c -> PeriodicReportRow b c # second :: (b -> c) -> PeriodicReportRow a b -> PeriodicReportRow a c # | |
Functor (PeriodicReportRow a) | |
Defined in Hledger.Reports.ReportTypes Methods fmap :: (a0 -> b) -> PeriodicReportRow a a0 -> PeriodicReportRow a b # (<$) :: a0 -> PeriodicReportRow a b -> PeriodicReportRow a a0 # | |
(ToJSON b, ToJSON a) => ToJSON (PeriodicReportRow a b) | |
Defined in Hledger.Reports.ReportTypes Methods toJSON :: PeriodicReportRow a b -> Value # toEncoding :: PeriodicReportRow a b -> Encoding # toJSONList :: [PeriodicReportRow a b] -> Value # toEncodingList :: [PeriodicReportRow a b] -> Encoding # omitField :: PeriodicReportRow a b -> Bool # | |
Semigroup b => Semigroup (PeriodicReportRow a b) | |
Defined in Hledger.Reports.ReportTypes Methods (<>) :: PeriodicReportRow a b -> PeriodicReportRow a b -> PeriodicReportRow a b # sconcat :: NonEmpty (PeriodicReportRow a b) -> PeriodicReportRow a b # stimes :: Integral b0 => b0 -> PeriodicReportRow a b -> PeriodicReportRow a b # | |
Generic (PeriodicReportRow a b) | |
Defined in Hledger.Reports.ReportTypes Associated Types type Rep (PeriodicReportRow a b) :: Type -> Type Methods from :: PeriodicReportRow a b -> Rep (PeriodicReportRow a b) x to :: Rep (PeriodicReportRow a b) x -> PeriodicReportRow a b | |
(Show a, Show b) => Show (PeriodicReportRow a b) | |
Defined in Hledger.Reports.ReportTypes Methods showsPrec :: Int -> PeriodicReportRow a b -> ShowS show :: PeriodicReportRow a b -> String showList :: [PeriodicReportRow a b] -> ShowS | |
HasAmounts b => HasAmounts (PeriodicReportRow a b) | |
Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PeriodicReportRow a b -> PeriodicReportRow a b # | |
type Rep (PeriodicReportRow a b) | |
Defined in Hledger.Reports.ReportTypes type Rep (PeriodicReportRow a b) = D1 ('MetaData "PeriodicReportRow" "Hledger.Reports.ReportTypes" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "PeriodicReportRow" 'PrefixI 'True) ((S1 ('MetaSel ('Just "prrName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "prrAmounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [b])) :*: (S1 ('MetaSel ('Just "prrTotal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel ('Just "prrAverage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))) |
data PeriodicReport a b #
A periodic report is a generic tabular report, where each row corresponds to some label (usually an account name) and each column to a date period. The column periods are usually consecutive subperiods formed by splitting the overall report period by some report interval (daily, weekly, etc.). It has:
- a list of each column's period (date span)
- a list of rows, each containing:
- an account label
- the account's depth
- A list of amounts, one for each column. Depending on the value type,
these can represent balance changes, ending balances, budget
performance, etc. (for example, see
BalanceAccumulation
and Hledger.Cli.Commands.Balance). - the total of the row's amounts for a periodic report, or zero for cumulative/historical reports (since summing end balances generally doesn't make sense).
- the average of the row's amounts
- the column totals, and the overall grand total (or zero for cumulative/historical reports) and grand average.
Constructors
PeriodicReport | |
Fields
|
Instances
Bifunctor PeriodicReport | |
Defined in Hledger.Reports.ReportTypes Methods bimap :: (a -> b) -> (c -> d) -> PeriodicReport a c -> PeriodicReport b d # first :: (a -> b) -> PeriodicReport a c -> PeriodicReport b c # second :: (b -> c) -> PeriodicReport a b -> PeriodicReport a c # | |
Functor (PeriodicReport a) | |
Defined in Hledger.Reports.ReportTypes Methods fmap :: (a0 -> b) -> PeriodicReport a a0 -> PeriodicReport a b # (<$) :: a0 -> PeriodicReport a b -> PeriodicReport a a0 # | |
(ToJSON a, ToJSON b) => ToJSON (PeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Methods toJSON :: PeriodicReport a b -> Value # toEncoding :: PeriodicReport a b -> Encoding # toJSONList :: [PeriodicReport a b] -> Value # toEncodingList :: [PeriodicReport a b] -> Encoding # omitField :: PeriodicReport a b -> Bool # | |
Generic (PeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Associated Types type Rep (PeriodicReport a b) :: Type -> Type Methods from :: PeriodicReport a b -> Rep (PeriodicReport a b) x to :: Rep (PeriodicReport a b) x -> PeriodicReport a b | |
(Show a, Show b) => Show (PeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Methods showsPrec :: Int -> PeriodicReport a b -> ShowS show :: PeriodicReport a b -> String showList :: [PeriodicReport a b] -> ShowS | |
HasAmounts b => HasAmounts (PeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PeriodicReport a b -> PeriodicReport a b # | |
HasAmounts b => HasAmounts (Text, PeriodicReport a b, Bool) | |
Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> (Text, PeriodicReport a b, Bool) -> (Text, PeriodicReport a b, Bool) # | |
type Rep (PeriodicReport a b) | |
Defined in Hledger.Reports.ReportTypes type Rep (PeriodicReport a b) = D1 ('MetaData "PeriodicReport" "Hledger.Reports.ReportTypes" "hledger-lib-1.31-10Abz9vlABn64B0DmcMPJI" 'False) (C1 ('MetaCons "PeriodicReport" 'PrefixI 'True) (S1 ('MetaSel ('Just "prDates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DateSpan]) :*: (S1 ('MetaSel ('Just "prRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PeriodicReportRow a b]) :*: S1 ('MetaSel ('Just "prTotals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PeriodicReportRow () b))))) |
Arguments
= MixedAmount | The average of |
Arguments
= MixedAmount | The sum of |
Arguments
= MixedAmount | An ending balance as of some date. |
type Percentage = Decimal #
type PostingsReportItem = (Maybe Day, Maybe Period, Maybe Text, Posting, MixedAmount) #
type PostingsReport = [PostingsReportItem] #
A postings report is a list of postings with a running total, and a little extra transaction info to help with rendering. This is used eg for the register command.
type MultiBalanceReport = PeriodicReport DisplayName MixedAmount #
A multi balance report is a kind of periodic report, where the amounts correspond to balance changes or ending balances in a given period. It has:
- a list of each column's period (date span)
- a list of rows, each containing:
- the full account name, display name, and display depth
- A list of amounts, one for each column.
- the total of the row's amounts for a periodic report
- the average of the row's amounts
- the column totals, and the overall grand total (or zero for cumulative/historical reports) and grand average.
type EntriesReportItem = Transaction #
type EntriesReport = [EntriesReportItem] #
A journal entries report is a list of whole transactions as originally entered in the journal (mostly). This is used by eg hledger's print command and hledger-web's journal entries view.
type BudgetCell = (Maybe Change, Maybe BudgetGoal) #
A budget report tracks expected and actual changes per account and subperiod.
type BudgetAverage = Average #
type BudgetTotal = Total #
type BudgetGoal = Change #
type BalanceReportItem = (AccountName, AccountName, Int, MixedAmount) #
type BalanceReport = ([BalanceReportItem], MixedAmount) #
A simple balance report. It has:
- a list of items, one per account, each containing:
- the full account name
- the Ledger-style elided short account name (the leaf account name, prefixed by any boring parents immediately above); or with --flat, the full account name again
- the number of indentation steps for rendering a Ledger-style account tree, taking into account elided boring parents, --no-elide and --flat
- an amount
- the total of all amounts
type AccountTransactionsReportItem = (Transaction, Transaction, Bool, Text, MixedAmount, MixedAmount) #
type AccountTransactionsReport = [AccountTransactionsReportItem] #
An account transactions report represents transactions affecting a particular account (or possibly several accounts, but we don't use that). It is used eg by hledger-ui's and hledger-web's register view, and hledger's aregister report, where we want to show one row per transaction, in the context of the current account. Report items consist of:
- the transaction, unmodified
- the transaction as seen in the context of the current account and query, which means:
- the transaction date is set to the "transaction context date": the earliest of the transaction date and any other posting dates of postings to the current account (matched by the report query).
- the transaction's postings are filtered, excluding any which are not matched by the report query
- a text description of the other account(s) posted to/from
- a flag indicating whether there's more than one other account involved
- the total increase/decrease to the current account
- the report transactions' running total after this transaction; or if historical balance is requested (-H), the historical running total. The historical running total includes transactions from before the report start date if one is specified, filtered by the report query. The historical running total may or may not be the account's historical running balance, depending on the report query.
Items are sorted by transaction register date (the earliest date the transaction posts to the current account), most recent first. Reporting intervals are currently ignored.
type PrefixedFilePath = FilePath #
A file path optionally prefixed by a reader name and colon (journal:, csv:, timedot:, etc.).
An assertion is simply an IO
action. Assertion failure is indicated
by throwing an exception, typically HUnitFailure
.
Instead of throwing the exception directly, you should use
functions like assertFailure
and assertBool
.
Test cases are composed of a sequence of one or more assertions.
type AssertionPredicate = IO Bool #
The result of an assertion that hasn't been evaluated yet.
Most test cases follow the following steps:
- Do some processing or an action.
- Assert certain conditions.
However, this flow is not always suitable. AssertionPredicate
allows for
additional steps to be inserted without the initial action to be affected
by side effects. Additionally, clean-up can be done before the test case
has a chance to end. A potential work flow is:
- Write data to a file.
- Read data from a file, evaluate conditions.
- Clean up the file.
- Assert that the side effects of the read operation meet certain conditions.
- Assert that the conditions evaluated in step 2 are met.
class Assertable t where #
Allows the extension of the assertion mechanism.
Since an Assertion
can be a sequence of Assertion
s and IO
actions,
there is a fair amount of flexibility of what can be achieved. As a rule,
the resulting Assertion
should be the body of a TestCase
or part of
a TestCase
; it should not be used to assert multiple, independent
conditions.
If more complex arrangements of assertions are needed, Test
and
Testable
should be used.
Instances
Assertable String | |
Defined in Test.Tasty.HUnit.Orig | |
Assertable () | |
Defined in Test.Tasty.HUnit.Orig | |
Assertable Bool | |
Defined in Test.Tasty.HUnit.Orig | |
Assertable t => Assertable (IO t) | |
Defined in Test.Tasty.HUnit.Orig |
data HUnitFailure #
Exception thrown by assertFailure
etc.
Constructors
HUnitFailure (Maybe SrcLoc) String |
Instances
Exception HUnitFailure | |
Defined in Test.Tasty.HUnit.Orig Methods toException :: HUnitFailure -> SomeException fromException :: SomeException -> Maybe HUnitFailure | |
Show HUnitFailure | |
Defined in Test.Tasty.HUnit.Orig Methods showsPrec :: Int -> HUnitFailure -> ShowS show :: HUnitFailure -> String showList :: [HUnitFailure] -> ShowS | |
Eq HUnitFailure | |
Defined in Test.Tasty.HUnit.Orig |
class AssertionPredicable t where #
An ad-hoc class used to overload the @?
operator.
The only intended instances of this class are
and Bool
.IO
Bool
You shouldn't need to interact with this class directly.
Methods
assertionPredicate :: t -> IO Bool #
Instances
AssertionPredicable Bool | |
Defined in Test.Tasty.HUnit.Orig Methods assertionPredicate :: Bool -> IO Bool # | |
AssertionPredicable t => AssertionPredicable (IO t) | |
Defined in Test.Tasty.HUnit.Orig Methods assertionPredicate :: IO t -> IO Bool # |
data TimeLocale #
Constructors
TimeLocale | |
Instances
Show TimeLocale | |
Defined in Data.Time.Format.Locale Methods showsPrec :: Int -> TimeLocale -> ShowS show :: TimeLocale -> String showList :: [TimeLocale] -> ShowS | |
Eq TimeLocale | |
Defined in Data.Time.Format.Locale | |
Ord TimeLocale | |
Defined in Data.Time.Format.Locale Methods compare :: TimeLocale -> TimeLocale -> Ordering # (<) :: TimeLocale -> TimeLocale -> Bool # (<=) :: TimeLocale -> TimeLocale -> Bool # (>) :: TimeLocale -> TimeLocale -> Bool # (>=) :: TimeLocale -> TimeLocale -> Bool # max :: TimeLocale -> TimeLocale -> TimeLocale # min :: TimeLocale -> TimeLocale -> TimeLocale # |
data CalendarDiffDays #
Constructors
CalendarDiffDays | |
Instances
type MonthOfYear = Int #
Instances
FromJSON DayOfWeek | |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey DayOfWeek | |
Defined in Data.Aeson.Types.FromJSON Methods | |
ToJSON DayOfWeek | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey DayOfWeek | |
Defined in Data.Aeson.Types.ToJSON | |
Data DayOfWeek | |
Defined in Data.Time.Calendar.Week Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DayOfWeek -> c DayOfWeek gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DayOfWeek toConstr :: DayOfWeek -> Constr dataTypeOf :: DayOfWeek -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DayOfWeek) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DayOfWeek) gmapT :: (forall b. Data b => b -> b) -> DayOfWeek -> DayOfWeek gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DayOfWeek -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DayOfWeek -> r gmapQ :: (forall d. Data d => d -> u) -> DayOfWeek -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DayOfWeek -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek | |
Enum DayOfWeek | |
Defined in Data.Time.Calendar.Week | |
Ix DayOfWeek | |
Defined in Data.Time.Calendar.Week Methods range :: (DayOfWeek, DayOfWeek) -> [DayOfWeek] index :: (DayOfWeek, DayOfWeek) -> DayOfWeek -> Int unsafeIndex :: (DayOfWeek, DayOfWeek) -> DayOfWeek -> Int inRange :: (DayOfWeek, DayOfWeek) -> DayOfWeek -> Bool rangeSize :: (DayOfWeek, DayOfWeek) -> Int unsafeRangeSize :: (DayOfWeek, DayOfWeek) -> Int | |
Read DayOfWeek | |
Show DayOfWeek | |
NFData DayOfWeek | |
Defined in Data.Time.Calendar.Week | |
Eq DayOfWeek | |
Ord DayOfWeek | |
class FormatTime t #
Minimal complete definition
formatCharacter
Instances
FormatTime DotNetTime | |
Defined in Data.Aeson.Types.Internal Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> DotNetTime -> String) |
data CalendarDiffTime #
Constructors
CalendarDiffTime | |
Fields
|
Instances
data NominalDiffTime #
Instances
Instances
FromJSON DiffTime | This instance includes a bounds check to prevent maliciously
large inputs to fill up the memory of the target system. You can
newtype |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON DiffTime | |
Defined in Data.Aeson.Types.ToJSON | |
Data DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DiffTime -> c DiffTime gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DiffTime toConstr :: DiffTime -> Constr dataTypeOf :: DiffTime -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DiffTime) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DiffTime) gmapT :: (forall b. Data b => b -> b) -> DiffTime -> DiffTime gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r gmapQ :: (forall d. Data d => d -> u) -> DiffTime -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DiffTime -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime | |
Enum DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime | |
Num DiffTime | |
Read DiffTime | |
Fractional DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime | |
Real DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime Methods toRational :: DiffTime -> Rational | |
RealFrac DiffTime | |
Show DiffTime | |
NFData DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime | |
Eq DiffTime | |
Ord DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime |
Constructors
LocalTime | |
Fields
|
Instances
FromJSON LocalTime | |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey LocalTime | |
Defined in Data.Aeson.Types.FromJSON Methods | |
ToJSON LocalTime | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey LocalTime | |
Defined in Data.Aeson.Types.ToJSON | |
Data LocalTime | |
Defined in Data.Time.LocalTime.Internal.LocalTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LocalTime -> c LocalTime gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LocalTime toConstr :: LocalTime -> Constr dataTypeOf :: LocalTime -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LocalTime) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LocalTime) gmapT :: (forall b. Data b => b -> b) -> LocalTime -> LocalTime gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LocalTime -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LocalTime -> r gmapQ :: (forall d. Data d => d -> u) -> LocalTime -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> LocalTime -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime | |
Show LocalTime | |
NFData LocalTime | |
Defined in Data.Time.LocalTime.Internal.LocalTime | |
Eq LocalTime | |
Ord LocalTime | |
Defined in Data.Time.LocalTime.Internal.LocalTime |
Instances
FromJSON TimeOfDay | |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey TimeOfDay | |
Defined in Data.Aeson.Types.FromJSON Methods | |
ToJSON TimeOfDay | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey TimeOfDay | |
Defined in Data.Aeson.Types.ToJSON | |
Data TimeOfDay | |
Defined in Data.Time.LocalTime.Internal.TimeOfDay Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeOfDay toConstr :: TimeOfDay -> Constr dataTypeOf :: TimeOfDay -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TimeOfDay) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeOfDay) gmapT :: (forall b. Data b => b -> b) -> TimeOfDay -> TimeOfDay gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r gmapQ :: (forall d. Data d => d -> u) -> TimeOfDay -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeOfDay -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay | |
Show TimeOfDay | |
NFData TimeOfDay | |
Defined in Data.Time.LocalTime.Internal.TimeOfDay | |
Eq TimeOfDay | |
Ord TimeOfDay | |
Defined in Data.Time.LocalTime.Internal.TimeOfDay |
Constructors
TimeZone | |
Fields
|
Instances
Data TimeZone | |
Defined in Data.Time.LocalTime.Internal.TimeZone Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeZone -> c TimeZone gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeZone toConstr :: TimeZone -> Constr dataTypeOf :: TimeZone -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TimeZone) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeZone) gmapT :: (forall b. Data b => b -> b) -> TimeZone -> TimeZone gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeZone -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeZone -> r gmapQ :: (forall d. Data d => d -> u) -> TimeZone -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeZone -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone | |
Show TimeZone | |
NFData TimeZone | |
Defined in Data.Time.LocalTime.Internal.TimeZone | |
Eq TimeZone | |
Ord TimeZone | |
Defined in Data.Time.LocalTime.Internal.TimeZone |
newtype UniversalTime #
Constructors
ModJulianDate | |
Fields
|
Instances
Constructors
ZonedTime | |
Fields |
Instances
FromJSON ZonedTime | Supported string formats:
The first space may instead be a |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey ZonedTime | |
Defined in Data.Aeson.Types.FromJSON Methods | |
ToJSON ZonedTime | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey ZonedTime | |
Defined in Data.Aeson.Types.ToJSON | |
Data ZonedTime | |
Defined in Data.Time.LocalTime.Internal.ZonedTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZonedTime -> c ZonedTime gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ZonedTime toConstr :: ZonedTime -> Constr dataTypeOf :: ZonedTime -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ZonedTime) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ZonedTime) gmapT :: (forall b. Data b => b -> b) -> ZonedTime -> ZonedTime gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r gmapQ :: (forall d. Data d => d -> u) -> ZonedTime -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> ZonedTime -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime | |
Show ZonedTime | |
NFData ZonedTime | |
Defined in Data.Time.LocalTime.Internal.ZonedTime |
Command line options, used in the hledger
package and above.
This is the "opts" used throughout hledger CLI code.
representing the options and arguments that were provided at
startup on the command-line.
Constructors
CliOpts | |
Fields
|
Instances
class HasCliOpts c where #
Minimal complete definition
Methods
available_width :: Lens' c Int #
file__ :: Lens' c [FilePath] #
inputopts :: Lens' c InputOpts #
no_new_accounts :: Lens' c Bool #
output_file :: Lens' c (Maybe FilePath) #
output_format :: Lens' c (Maybe String) #
progstarttime :: Lens' c POSIXTime #
rawopts__ :: Lens' c RawOpts #
reportspec :: Lens' c ReportSpec #
Instances
HasCliOpts CliOpts # | |
Defined in Hledger.Cli.CliOptions Methods cliOpts :: Lens' CliOpts CliOpts # available_width :: Lens' CliOpts Int # command :: Lens' CliOpts String # debug__ :: Lens' CliOpts Int # file__ :: Lens' CliOpts [FilePath] # inputopts :: Lens' CliOpts InputOpts # no_new_accounts :: Lens' CliOpts Bool # output_file :: Lens' CliOpts (Maybe FilePath) # output_format :: Lens' CliOpts (Maybe String) # progstarttime :: Lens' CliOpts POSIXTime # rawopts__ :: Lens' CliOpts RawOpts # |
type CommandDoc = String #
A command's documentation. Used both as part of CLI help, and as part of the hledger manual. See parseCommandDoc.
type ProgramName = String #
type PackageVersion = String #
type VersionString = String #
pattern MixedAmountKeyNoPrice :: !CommoditySymbol -> MixedAmountKey #
pattern MixedAmountKeyTotalPrice :: !CommoditySymbol -> !CommoditySymbol -> MixedAmountKey #
pattern MixedAmountKeyUnitPrice :: !CommoditySymbol -> !CommoditySymbol -> !Quantity -> MixedAmountKey #
pattern YearMonthDay :: Year -> MonthOfYear -> DayOfMonth -> Day #
pattern April :: MonthOfYear #
pattern August :: MonthOfYear #
pattern BeforeCommonEra :: Integer -> Year #
pattern December :: MonthOfYear #
pattern February :: MonthOfYear #
pattern January :: MonthOfYear #
pattern July :: MonthOfYear #
pattern June :: MonthOfYear #
pattern March :: MonthOfYear #
pattern May :: MonthOfYear #
pattern November :: MonthOfYear #
pattern October :: MonthOfYear #
pattern September :: MonthOfYear #
Display the given text on the terminal, using the user's $PAGER if the text is taller than the current terminal and stdout is interactive and TERM is not "dumb" (except on Windows, where a pager will not be used). If the text contains ANSI codes, because hledger thinks the current terminal supports those, the pager should be configured to display those, otherwise users will see junk on screen (#2015). We call "setLessR" at hledger startup to make that less likely.
process :: Mode a -> [String] -> Either String a #
Process a list of flags (usually obtained from getArgs
/expandArgsAt
) with a mode. Returns
Left
and an error message if the command line fails to parse, or Right
and
the associated value.
oneLine :: AmountDisplayOpts #
Display Amount and MixedAmount on one line with no prices.
abort :: Partial => String -> a #
Synonym for error
. Used for instances where the program
has decided to exit because of invalid user input, or the user pressed
quit etc. This function allows error
to be reserved for programmer errors.
when :: Applicative f => Bool -> f () -> f () #
unless :: Applicative f => Bool -> f () -> f () #
guard :: Alternative f => Bool -> f () #
hIsTerminalDevice :: Handle -> IO Bool #
char8 :: TextEncoding #
withMVarMasked :: MVar a -> (a -> IO b) -> IO b #
liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r #
filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #
forever :: Applicative f => f a -> f b #
mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #
replicateM :: Applicative m => Int -> m a -> m [a] #
replicateM_ :: Applicative m => Int -> m a -> m () #
zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #
zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #
head :: HasCallStack => [a] -> a #
last :: HasCallStack => [a] -> a #
(!!) :: HasCallStack => [a] -> Int -> a #
cycle :: HasCallStack => [a] -> [a] #
init :: HasCallStack => [a] -> [a] #
intersperse :: a -> [a] -> [a] #
isPrefixOf :: Eq a => [a] -> [a] -> Bool #
tail :: HasCallStack => [a] -> [a] #
traceShowId :: Show a => a -> a #
traceWith :: (a -> String) -> a -> a #
Trace a value with the given show function before returning it.
hGetContents' :: Handle -> IO String #
getContents' :: IO String #
getEnvironment :: IO [(String, String)] #
getProgName :: IO String #
withProgName :: String -> IO a -> IO a #
isResourceVanishedError :: IOError -> Bool #
isResourceVanishedErrorType :: IOErrorType -> Bool #
getChanContents :: Chan a -> IO [a] #
writeList2Chan :: Chan a -> [a] -> IO () #
addMVarFinalizer :: MVar a -> IO () -> IO () #
modifyMVar :: MVar a -> (a -> IO (a, b)) -> IO b #
modifyMVarMasked :: MVar a -> (a -> IO (a, b)) -> IO b #
modifyMVarMasked_ :: MVar a -> (a -> IO a) -> IO () #
modifyMVar_ :: MVar a -> (a -> IO a) -> IO () #
signalQSem :: QSem -> IO () #
signalQSemN :: QSemN -> Int -> IO () #
threadDelay :: Int -> IO () #
threadWaitRead :: Fd -> IO () #
threadWaitReadSTM :: Fd -> IO (STM (), IO ()) #
threadWaitWrite :: Fd -> IO () #
threadWaitWriteSTM :: Fd -> IO (STM (), IO ()) #
getNumCapabilities :: IO Int #
killThread :: ThreadId -> IO () #
mkWeakThreadId :: ThreadId -> IO (Weak ThreadId) #
myThreadId :: IO ThreadId #
setNumCapabilities :: Int -> IO () #
threadCapability :: ThreadId -> IO (Int, Bool) #
isEmptyMVar :: MVar a -> IO Bool #
newEmptyMVar :: IO (MVar a) #
tryPutMVar :: MVar a -> a -> IO Bool #
tryReadMVar :: MVar a -> IO (Maybe a) #
tryTakeMVar :: MVar a -> IO (Maybe a) #
rtsSupportsBoundThreads :: Bool #
isCurrentThreadBound :: IO Bool #
runInBoundThread :: IO a -> IO a #
runInUnboundThread :: IO a -> IO a #
partitionEithers :: [Either a b] -> ([a], [b]) #
asum :: (Foldable t, Alternative f) => t (f a) -> f a #
foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a #
appendFile :: FilePath -> String -> IO () #
getContents :: IO String #
intercalate :: [a] -> [[a]] -> [a] #
genericLength :: Num i => [a] -> i #
zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] #
deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #
dropWhileEnd :: (a -> Bool) -> [a] -> [a] #
elemIndices :: Eq a => a -> [a] -> [Int] #
findIndices :: (a -> Bool) -> [a] -> [Int] #
genericDrop :: Integral i => i -> [a] -> [a] #
genericIndex :: Integral i => [a] -> i -> a #
genericReplicate :: Integral i => i -> a -> [a] #
genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) #
genericTake :: Integral i => i -> [a] -> [a] #
intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #
isSuffixOf :: Eq a => [a] -> [a] -> Bool #
permutations :: [a] -> [[a]] #
stripPrefix :: Eq a => [a] -> [a] -> Maybe [a] #
subsequences :: [a] -> [[a]] #
isSubsequenceOf :: Eq a => [a] -> [a] -> Bool #
exitFailure :: IO a #
exitSuccess :: IO a #
utf8 :: TextEncoding #
latin1 :: TextEncoding #
mkTextEncoding :: String -> IO TextEncoding #
utf16 :: TextEncoding #
utf16be :: TextEncoding #
utf16le :: TextEncoding #
utf32 :: TextEncoding #
utf32be :: TextEncoding #
utf32le :: TextEncoding #
hGetBuffering :: Handle -> IO BufferMode #
hGetEncoding :: Handle -> IO (Maybe TextEncoding) #
hGetPosn :: Handle -> IO HandlePosn #
hIsReadable :: Handle -> IO Bool #
hIsSeekable :: Handle -> IO Bool #
hIsWritable :: Handle -> IO Bool #
hLookAhead :: Handle -> IO Char #
hSetBinaryMode :: Handle -> Bool -> IO () #
hSetBuffering :: Handle -> BufferMode -> IO () #
hSetEncoding :: Handle -> TextEncoding -> IO () #
hSetFileSize :: Handle -> Integer -> IO () #
hSetNewlineMode :: Handle -> NewlineMode -> IO () #
hSetPosn :: HandlePosn -> IO () #
hGetBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int #
hGetBufSome :: Handle -> Ptr a -> Int -> IO Int #
hGetContents :: Handle -> IO String #
hPutBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int #
hWaitForInput :: Handle -> Int -> IO Bool #
isEOFError :: IOError -> Bool #
isFullError :: IOError -> Bool #
isPermissionError :: IOError -> Bool #
ioeGetErrorString :: IOError -> String #
ioeGetErrorType :: IOError -> IOErrorType #
ioeGetFileName :: IOError -> Maybe FilePath #
ioeGetHandle :: IOError -> Maybe Handle #
ioeGetLocation :: IOError -> String #
ioeSetErrorString :: IOError -> String -> IOError #
ioeSetErrorType :: IOError -> IOErrorType -> IOError #
ioeSetFileName :: IOError -> FilePath -> IOError #
ioeSetHandle :: IOError -> Handle -> IOError #
ioeSetLocation :: IOError -> String -> IOError #
isAlreadyExistsError :: IOError -> Bool #
isAlreadyExistsErrorType :: IOErrorType -> Bool #
isAlreadyInUseError :: IOError -> Bool #
isAlreadyInUseErrorType :: IOErrorType -> Bool #
isDoesNotExistError :: IOError -> Bool #
isDoesNotExistErrorType :: IOErrorType -> Bool #
isEOFErrorType :: IOErrorType -> Bool #
isFullErrorType :: IOErrorType -> Bool #
isIllegalOperation :: IOError -> Bool #
isIllegalOperationErrorType :: IOErrorType -> Bool #
isPermissionErrorType :: IOErrorType -> Bool #
isUserError :: IOError -> Bool #
isUserErrorType :: IOErrorType -> Bool #
(<**>) :: Applicative f => f a -> f (a -> b) -> f b #
liftA :: Applicative f => (a -> b) -> f a -> f b #
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d #
optional :: Alternative f => f a -> f (Maybe a) #
lexLitChar :: ReadS String #
readLitChar :: ReadS Char #
intToDigit :: Int -> Char #
showLitChar :: Char -> ShowS #
generalCategory :: Char -> GeneralCategory #
isAlphaNum :: Char -> Bool #
isAsciiLower :: Char -> Bool #
isAsciiUpper :: Char -> Bool #
isHexDigit :: Char -> Bool #
isLowerCase :: Char -> Bool #
isOctDigit :: Char -> Bool #
isPunctuation :: Char -> Bool #
isUpperCase :: Char -> Bool #
digitToInt :: Char -> Int #
isSeparator :: Char -> Bool #
formatRealFloat :: RealFloat a => a -> FieldFormatter #
formatInt :: (Integral a, Bounded a) => a -> FieldFormatter #
errorBadArgument :: a #
errorBadFormat :: Char -> a #
errorMissingArgument :: a #
errorShortFormat :: a #
formatChar :: Char -> FieldFormatter #
formatInteger :: Integer -> FieldFormatter #
formatString :: Bool -> Maybe Int -> Maybe Int -> String -> String #
Clip and pad a string to a minimum & maximum width, andor leftright justify it. Works on multi-line strings too (but will rewrite non-unix line endings).
hPrintf :: HPrintfType r => Handle -> String -> r #
printf :: PrintfType r => String -> r #
vFmt :: Char -> FieldFormat -> FieldFormat #
expandArgsAt :: [String] -> IO [String] #
Expand @
directives in a list of arguments, usually obtained from getArgs
.
As an example, given the file test.txt
with the lines hello
and world
:
expandArgsAt ["@test.txt","!"] == ["hello","world","!"]
Any @
directives in the files will be recursively expanded (raising an error
if there is infinite recursion).
To supress @
expansion, pass any @
arguments after --
.
joinArgs :: [String] -> String #
Given a sequence of arguments, join them together in a manner that could be used on
the command line, giving preference to the Windows cmd
shell quoting conventions.
For an alternative version, intended for actual running the result in a shell, see "System.Process.showCommandForUser"
splitArgs :: String -> [String] #
Given a string, split into the available arguments. The inverse of joinArgs
.
Convert a list into a group, placing all fields in groupUnnamed
.
fromFlagOpt :: FlagInfo -> String #
Extract the value from inside a FlagOpt
or FlagOptRare
, or raises an error.
remap2 :: Remap m => (a -> b) -> (b -> a) -> m a -> m b #
Restricted version of remap
where the values are isomorphic.
remapUpdate :: (a -> b) -> (b -> (a, a -> b)) -> Update a -> Update b #
Create an empty mode specifying only modeValue
. All other fields will usually be populated
using record updates.
mode :: Name -> a -> Help -> Arg a -> [Flag a] -> Mode a #
Create a mode with a name, an initial value, some help text, a way of processing arguments and a list of flags.
modes :: String -> a -> Help -> [Mode a] -> Mode a #
Create a list of modes, with a program name, an initial value, some help text and the child modes.
flagNone :: [Name] -> (a -> a) -> Help -> Flag a #
Create a flag taking no argument value, with a list of flag names, an update function and some help text.
flagOpt :: String -> [Name] -> Update a -> FlagHelp -> Help -> Flag a #
Create a flag taking an optional argument value, with an optional value, a list of flag names, an update function, the type of the argument and some help text.
flagReq :: [Name] -> Update a -> FlagHelp -> Help -> Flag a #
Create a flag taking a required argument value, with a list of flag names, an update function, the type of the argument and some help text.
flagArg :: Update a -> FlagHelp -> Arg a #
Create an argument flag, with an update function and the type of the argument.
flagBool :: [Name] -> (Bool -> a -> a) -> Help -> Flag a #
Create a boolean flag, with a list of flag names, an update function and some help text.
Arguments
:: Mode a | Mode specifying which arguments are allowed |
-> [String] | Arguments the user has already typed |
-> (Int, Int) | 0-based index of the argument they are currently on, and the position in that argument |
-> [Complete] |
Given a current state, return the set of commands you could type now, in preference order.
helpText :: [String] -> HelpFormat -> Mode a -> [Text] #
Generate a help message from a mode. The first argument is a prefix,
which is prepended when not using HelpFormatBash
or HelpFormatZsh
.
processArgs :: Mode a -> IO a #
Process the flags obtained by
and getArgs
with a mode. Displays
an error and exits with failure if the command line fails to parse, or returns
the associated value. Implemented in terms of expandArgsAt
process
. This function makes
use of the following environment variables:
$CMDARGS_COMPLETE
- causes the program to produce completions usingcomplete
, then exit. Completions are based on the result ofgetArgs
, the index of the current argument is taken from$CMDARGS_COMPLETE
(set it to-
to complete the last argument), and the index within that argument is taken from$CMDARGS_COMPLETE_POS
(if set).$CMDARGS_HELPER
/$CMDARGS_HELPER_PROG
- uses the helper mechanism for entering command line programs as described in System.Console.CmdArgs.Helper.
processValue :: Mode a -> [String] -> a #
Process a list of flags (usually obtained from
and getArgs
) with a mode.
Throws an error if the command line fails to parse, or returns
the associated value. Implemeneted in terms of expandArgsAt
process
. This function
does not take account of any environment variables that may be set
(see processArgs
).
If you are in IO
you will probably get a better user experience by calling processValueIO
.
processValueIO :: Mode a -> [String] -> IO a #
Like processValue
but on failure prints to stderr and exits the program.
flagHelpSimple :: (a -> a) -> Flag a #
Create a help flag triggered by -?
/--help
.
flagHelpFormat :: (HelpFormat -> TextFormat -> a -> a) -> Flag a #
Create a help flag triggered by -?
/--help
. The user
may optionally modify help by specifying the format, such as:
--help=all - help for all modes --help=html - help in HTML format --help=100 - wrap the text at 100 characters --help=100,one - full text wrapped at 100 characters
flagVersion :: (a -> a) -> Flag a #
Create a version flag triggered by -V
/--version
.
flagNumericVersion :: (a -> a) -> Flag a #
Create a version flag triggered by --numeric-version
.
flagsVerbosity :: (Verbosity -> a -> a) -> [Flag a] #
Create verbosity flags triggered by -v
/--verbose
and
-q
/--quiet
add :: CliOpts -> Journal -> IO () #
Read multiple transactions from the console, prompting for each field, and append them to the journal file. If the journal came from stdin, this command has no effect.
proc :: FilePath -> [String] -> CreateProcess #
createPipe :: IO (Handle, Handle) #
createPipeFd :: IO (FD, FD) #
createProcess_ :: String -> CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) #
interruptProcessGroupOf :: ProcessHandle -> IO () #
terminateProcess :: ProcessHandle -> IO () #
getProcessExitCode :: ProcessHandle -> IO (Maybe ExitCode) #
callCommand :: String -> IO () #
callProcess :: FilePath -> [String] -> IO () #
cleanupProcess :: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> IO () #
createProcess :: CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) #
getCurrentPid :: IO Pid #
readCreateProcess :: CreateProcess -> String -> IO String #
readCreateProcessWithExitCode :: CreateProcess -> String -> IO (ExitCode, String, String) #
runCommand :: String -> IO ProcessHandle #
runInteractiveCommand :: String -> IO (Handle, Handle, Handle, ProcessHandle) #
runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> IO (Handle, Handle, Handle, ProcessHandle) #
runProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> Maybe Handle -> Maybe Handle -> Maybe Handle -> IO ProcessHandle #
shell :: String -> CreateProcess #
showCommandForUser :: FilePath -> [String] -> String #
spawnCommand :: String -> IO ProcessHandle #
spawnProcess :: FilePath -> [String] -> IO ProcessHandle #
waitForProcess :: ProcessHandle -> IO ExitCode #
withCreateProcess :: CreateProcess -> (Maybe Handle -> Maybe Handle -> Maybe Handle -> ProcessHandle -> IO a) -> IO a #
Returns width of a character in a monospace font: 0 for a combining character, 1 for a regular character, 2 for an East Asian wide character. Ambiguous characters are treated as width 1.
withCurrentDirectory :: FilePath -> IO a -> IO a #
getDirectoryContents :: FilePath -> IO [FilePath] #
createDirectory :: FilePath -> IO () #
doesDirectoryExist :: FilePath -> IO Bool #
doesFileExist :: FilePath -> IO Bool #
canonicalizePath :: FilePath -> IO FilePath #
copyFileWithMetadata :: FilePath -> FilePath -> IO () #
copyPermissions :: FilePath -> FilePath -> IO () #
createDirectoryIfMissing :: Bool -> FilePath -> IO () #
createDirectoryLink :: FilePath -> FilePath -> IO () #
createFileLink :: FilePath -> FilePath -> IO () #
doesPathExist :: FilePath -> IO Bool #
exeExtension :: String #
findExecutables :: String -> IO [FilePath] #
getAccessTime :: FilePath -> IO UTCTime #
getFileSize :: FilePath -> IO Integer #
getModificationTime :: FilePath -> IO UTCTime #
getPermissions :: FilePath -> IO Permissions #
getSymbolicLinkTarget :: FilePath -> IO FilePath #
getXdgDirectory :: XdgDirectory -> FilePath -> IO FilePath #
getXdgDirectoryList :: XdgDirectoryList -> IO [FilePath] #
listDirectory :: FilePath -> IO [FilePath] #
makeAbsolute :: FilePath -> IO FilePath #
pathIsSymbolicLink :: FilePath -> IO Bool #
removeDirectory :: FilePath -> IO () #
removeDirectoryLink :: FilePath -> IO () #
removeDirectoryRecursive :: FilePath -> IO () #
removeFile :: FilePath -> IO () #
removePathForcibly :: FilePath -> IO () #
renameDirectory :: FilePath -> FilePath -> IO () #
renameFile :: FilePath -> FilePath -> IO () #
renamePath :: FilePath -> FilePath -> IO () #
setAccessTime :: FilePath -> UTCTime -> IO () #
setCurrentDirectory :: FilePath -> IO () #
setModificationTime :: FilePath -> UTCTime -> IO () #
setPermissions :: FilePath -> Permissions -> IO () #
isSymbolicLink :: FilePath -> IO Bool #
setOwnerExecutable :: Bool -> Permissions -> Permissions #
setOwnerReadable :: Bool -> Permissions -> Permissions #
setOwnerSearchable :: Bool -> Permissions -> Permissions #
setOwnerWritable :: Bool -> Permissions -> Permissions #
Construction of Pos
from Int
. The function throws
InvalidPosException
when given a non-positive argument.
Since: megaparsec-6.0.0
initialPos :: FilePath -> SourcePos #
Construct initial position (line 1, column 1) given name of source file.
sourcePosPretty :: SourcePos -> String #
Pretty-print a SourcePos
.
Since: megaparsec-5.0.0
testGroup :: TestName -> [TestTree] -> TestTree #
Create a named group of test cases or other groups. Tests are executed in
parallel. For sequential execution, see sequentialTestGroup
.
Since: tasty-0.1
sequentialTestGroup :: TestName -> DependencyType -> [TestTree] -> TestTree #
Create a named group of test cases or other groups. Tests are executed in
order. For parallel execution, see testGroup
.
Arguments
:: DependencyType | whether to run the tests even if some of the dependencies fail |
-> Expr | the pattern |
-> TestTree | the subtree that depends on other tests |
-> TestTree | the subtree annotated with dependency information |
Like after
, but accepts the pattern as a syntax tree instead
of a string. Useful for generating a test tree programmatically.
Examples
Only match on the test's own name, ignoring the group names:
after_
AllFinish
(EQ
(Field
NF
) (StringLit
"Bar")) $
testCase "A test that depends on Foo.Bar" $ ...
Since: tasty-1.2
Arguments
:: DependencyType | whether to run the tests even if some of the dependencies fail |
-> String | the pattern |
-> TestTree | the subtree that depends on other tests |
-> TestTree | the subtree annotated with dependency information |
The after
combinator declares dependencies between tests.
If a TestTree
is wrapped in after
, the tests in this tree will not run
until certain other tests («dependencies») have finished. These
dependencies are specified using an AWK pattern (see the «Patterns» section
in the README).
Moreover, if the DependencyType
argument is set to AllSucceed
and
at least one dependency has failed, this test tree will not run at all.
Tasty does not check that the pattern matches any tests (let alone the correct set of tests), so it is on you to supply the right pattern.
Examples
The following test will be executed only after all tests that contain
Foo
anywhere in their path finish.
after
AllFinish
"Foo" $
testCase "A test that depends on Foo.Bar" $ ...
Note, however, that our test also happens to contain Foo
as part of its name,
so it also matches the pattern and becomes a dependency of itself. This
will result in a DependencyLoop
exception. To avoid this, either
change the test name so that it doesn't mention Foo
or make the
pattern more specific.
You can use AWK patterns, for instance, to specify the full path to the dependency.
after
AllFinish
"$0 == \"Tests.Foo.Bar\"" $
testCase "A test that depends on Foo.Bar" $ ...
Or only specify the dependency's own name, ignoring the group names:
after
AllFinish
"$NF == \"Bar\"" $
testCase "A test that depends on Foo.Bar" $ ...
Since: tasty-1.2
includingOptions :: [OptionDescription] -> Ingredient #
This ingredient doesn't do anything apart from registering additional options.
The option values can be accessed using askOption
.
Since: tasty-0.6
defaultMainWithIngredients :: [Ingredient] -> TestTree -> IO () #
Parse the command line arguments and run the tests using the provided ingredient list.
When the tests finish, this function calls exitWith
with the exit code
that indicates whether any tests have failed. See defaultMain
for
details.
Since: tasty-0.4
defaultIngredients :: [Ingredient] #
List of the default ingredients. This is what defaultMain
uses.
At the moment it consists of listingTests
and consoleTestReporter
.
Since: tasty-0.4.2
adjustOption :: IsOption v => (v -> v) -> TestTree -> TestTree #
Locally adjust the option value for the given test subtree.
Since: tasty-0.1
localOption :: IsOption v => v -> TestTree -> TestTree #
Locally set the option value for the given test subtree.
Since: tasty-0.1
askOption :: IsOption v => (v -> TestTree) -> TestTree #
Customize the test tree based on the run-time options.
Since: tasty-0.6
Arguments
:: IO a | initialize the resource |
-> (a -> IO ()) | free the resource |
-> (IO a -> TestTree) |
|
-> TestTree |
Acquire the resource to run this test (sub)tree and release it afterwards.
Since: tasty-0.5
toRegexCI' :: Text -> Regexp #
regexMatch :: Regexp -> String -> Bool #
Test whether a Regexp matches a String. This is an alias for matchTest
for consistent
naming.
regexMatchText :: Regexp -> Text -> Bool #
Tests whether a Regexp matches a Text.
This currently unpacks the Text to a String an works on that. This is due to a performance bug in regex-tdfa (#9), which may or may not be relevant here.
regexReplace :: Regexp -> Replacement -> String -> Either RegexError String #
A memoising version of regexReplace. Caches the result for each search pattern, replacement pattern, target string tuple. This won't generate a regular expression parsing error since that is pre-compiled nowadays, but there can still be a runtime error from the replacement pattern, eg with a backreference referring to a nonexistent match group.
regexReplaceUnmemo :: Regexp -> Replacement -> String -> Either RegexError String #
isBalanceSheetAccountType :: AccountType -> Bool #
isIncomeStatementAccountType :: AccountType -> Bool #
isAccountSubtypeOf :: AccountType -> AccountType -> Bool #
Check whether the first argument is a subtype of the second: either equal or one of the defined subtypes.
isDecimalMark :: Char -> Bool #
maCompare :: MixedAmount -> MixedAmount -> Ordering #
Compare two MixedAmounts, substituting 0 for the quantity of any missing commodities in either.
runExceptT :: ExceptT e m a -> m (Either e a) #
periodAsDateSpan :: Period -> DateSpan #
Convert Periods to exact DateSpans.
>>>
periodAsDateSpan (MonthPeriod 2000 1) == DateSpan (Just $ Flex $ fromGregorian 2000 1 1) (Just $ Flex $ fromGregorian 2000 2 1)
True
dateSpanAsPeriod :: DateSpan -> Period #
Convert DateSpans to Periods.
>>>
dateSpanAsPeriod $ DateSpan (Just $ Exact $ fromGregorian 2000 1 1) (Just $ Exact $ fromGregorian 2000 2 1)
MonthPeriod 2000 1
simplifyPeriod :: Period -> Period #
Convert PeriodBetweens to a more abstract period where possible.
>>>
simplifyPeriod $ PeriodBetween (fromGregorian 1 1 1) (fromGregorian 2 1 1)
YearPeriod 1>>>
simplifyPeriod $ PeriodBetween (fromGregorian 2000 10 1) (fromGregorian 2001 1 1)
QuarterPeriod 2000 4>>>
simplifyPeriod $ PeriodBetween (fromGregorian 2000 2 1) (fromGregorian 2000 3 1)
MonthPeriod 2000 2>>>
simplifyPeriod $ PeriodBetween (fromGregorian 2016 7 25) (fromGregorian 2016 8 1)
WeekPeriod 2016-07-25>>>
simplifyPeriod $ PeriodBetween (fromGregorian 2000 1 1) (fromGregorian 2000 1 2)
DayPeriod 2000-01-01>>>
simplifyPeriod $ PeriodBetween (fromGregorian 2000 2 28) (fromGregorian 2000 3 1)
PeriodBetween 2000-02-28 2000-03-01>>>
simplifyPeriod $ PeriodBetween (fromGregorian 2000 2 29) (fromGregorian 2000 3 1)
DayPeriod 2000-02-29>>>
simplifyPeriod $ PeriodBetween (fromGregorian 2000 12 31) (fromGregorian 2001 1 1)
DayPeriod 2000-12-31
isLastDayOfMonth :: (Eq a1, Eq a2, Num a1, Num a2) => Year -> a1 -> a2 -> Bool #
isStandardPeriod :: Period -> Bool #
Is this period a "standard" period, referencing a particular day, week, month, quarter, or year ? Periods of other durations, or infinite duration, or not starting on a standard period boundary, are not.
periodTextWidth :: Period -> Int #
The width of a period of this type when displayed.
showPeriod :: Period -> Text #
Render a period as a compact display string suitable for user output.
>>>
showPeriod (WeekPeriod (fromGregorian 2016 7 25))
"2016-07-25W30"
showPeriodMonthAbbrev :: Period -> Text #
Like showPeriod, but if it's a month period show just the 3 letter month name abbreviation for the current locale.
periodStart :: Period -> Maybe Day #
periodNext :: Period -> Period #
Move a standard period to the following period of same duration. Non-standard periods are unaffected.
periodPrevious :: Period -> Period #
Move a standard period to the preceding period of same duration. Non-standard periods are unaffected.
periodNextIn :: DateSpan -> Period -> Period #
Move a standard period to the following period of same duration, staying within enclosing dates. Non-standard periods are unaffected.
periodPreviousIn :: DateSpan -> Period -> Period #
Move a standard period to the preceding period of same duration, staying within enclosing dates. Non-standard periods are unaffected.
periodMoveTo :: Day -> Period -> Period #
Move a standard period stepwise so that it encloses the given date. Non-standard periods are unaffected.
periodGrow :: Period -> Period #
Enlarge a standard period to the next larger enclosing standard period, if there is one. Eg, a day becomes the enclosing week. A week becomes whichever month the week's thursday falls into. A year becomes all (unlimited). Non-standard periods (arbitrary dates, or open-ended) are unaffected.
periodShrink :: Day -> Period -> Period #
Shrink a period to the next smaller standard period inside it, choosing the subperiod which contains today's date if possible, otherwise the first subperiod. It goes like this: unbounded periods and nonstandard periods (between two arbitrary dates) -> current year -> current quarter if it's in selected year, otherwise first quarter of selected year -> current month if it's in selected quarter, otherwise first month of selected quarter -> current week if it's in selected month, otherwise first week of selected month -> today if it's in selected week, otherwise first day of selected week, unless that's in previous month, in which case first day of month containing selected week. Shrinking a day has no effect.
mondayBefore :: Day -> Day #
yearMonthContainingWeekStarting :: Day -> (Year, MonthOfYear) #
quarterContainingMonth :: Integral a => a -> a #
firstMonthOfQuarter :: Num a => a -> a #
startOfFirstWeekInMonth :: Integer -> Int -> Day #
customErrorBundlePretty :: HledgerParseErrors -> String #
Pretty-print our custom parse errors. It is necessary to use this
instead of errorBundlePretty
when custom parse errors are thrown.
This function intercepts our custom parse errors and applies final
adjustments (finalizeCustomError
) before passing them to
errorBundlePretty
. These adjustments are part of the implementation
of the behaviour of our custom parse errors.
Note: We must ensure that the offset of the PosState
of the provided
ParseErrorBundle
is no larger than the offset specified by a
ErrorFailAt
constructor. This is guaranteed if this offset is set to
0 (that is, the beginning of the source file), which is the
case for ParseErrorBundle
s returned from runParserT
.
wbToText :: WideBuilder -> Text #
Convert a WideBuilder to a strict Text.
wbFromText :: Text -> WideBuilder #
Convert a strict Text to a WideBuilder.
wbUnpack :: WideBuilder -> String #
Convert a WideBuilder to a String.
textElideRight :: Int -> Text -> Text #
formatText :: Bool -> Maybe Int -> Maybe Int -> Text -> Text #
Clip and pad a string to a minimum & maximum width, andor leftright justify it. Works on multi-line strings too (but will rewrite non-unix line endings).
quoteIfSpaced :: Text -> Text #
Wrap a string in double quotes, and -prefix any embedded single quotes, if it contains whitespace and is not already single- or double-quoted.
textQuoteIfNeeded :: Text -> Text #
escapeDoubleQuotes :: Text -> Text #
stripquotes :: Text -> Text #
Strip one matching pair of single or double quotes on the ends of a string.
textUnbracket :: Text -> Text #
Remove all matching pairs of square brackets and parentheses from the text.
textConcatTopPadded :: [Text] -> Text #
Join several multi-line strings as side-by-side rectangular strings of the same height, top-padded. Treats wide characters as double width.
textConcatBottomPadded :: [Text] -> Text #
Join several multi-line strings as side-by-side rectangular strings of the same height, bottom-padded. Treats wide characters as double width.
fitText :: Maybe Int -> Maybe Int -> Bool -> Bool -> Text -> Text #
General-purpose wide-char-aware single-line text layout function. It can left- or right-pad a short string to a minimum width. It can left- or right-clip a long string to a maximum width, optionally inserting an ellipsis (the third argument). It clips and pads on the right when the fourth argument is true, otherwise on the left. It treats wide characters as double width.
textTakeWidth :: Int -> Text -> Text #
Double-width-character-aware string truncation. Take as many characters as possible from a string without exceeding the specified width. Eg textTakeWidth 3 "りんご" = "り".
linesPrepend :: Text -> Text -> Text #
Add a prefix to each line of a string.
linesPrepend2 :: Text -> Text -> Text -> Text #
Add a prefix to the first line of a string, and a different prefix to the remaining lines.
readDecimal :: Text -> Integer #
Read a decimal number from a Text. Assumes the input consists only of digit characters.
tests_Text :: TestTree #
pshow :: Show a => a -> String #
Pretty show. An easier alias for pretty-simple's pShow. This will probably show in colour if useColorOnStderr is true.
pprint :: Show a => a -> IO () #
Pretty print a showable value. An easier alias for pretty-simple's pPrint. This will print in colour if useColorOnStderr is true.
getTerminalHeightWidth :: IO (Maybe (Int, Int)) #
An alternative to ansi-terminal's getTerminalSize, based on the more robust-looking terminal-size package. Tries to get stdout's terminal's current height and width.
getTerminalHeight :: IO (Maybe Int) #
getTerminalWidth :: IO (Maybe Int) #
setupPager :: IO () #
Make sure our $LESS and $MORE environment variables contain R,
to help ensure the common pager less
will show our ANSI output properly.
less uses $LESS by default, and $MORE when it is invoked as more
.
What the original more
program does, I'm not sure.
If $PAGER is configured to something else, this probably will have no effect.
The command line arguments that were used at program startup. Uses unsafePerformIO.
outputFileOption :: Maybe String #
Read the value of the -o/--output-file command line option provided at program startup, if any, using unsafePerformIO.
hasOutputFile :: Bool #
Check whether the -o/--output-file option has been used at program startup with an argument other than "-", using unsafePerformIO.
Versions of some of text-ansi's string colors/styles which are more careful to not print junk onscreen. These use our useColorOnStdout.
brightBlack' :: String -> String #
brightRed' :: String -> String #
brightGreen' :: String -> String #
brightYellow' :: String -> String #
brightBlue' :: String -> String #
brightMagenta' :: String -> String #
brightCyan' :: String -> String #
brightWhite' :: String -> String #
colorOption :: String #
Read the value of the --color or --colour command line option provided at program startup using unsafePerformIO. If this option was not provided, returns the empty string.
useColorOnStdout :: Bool #
Check the IO environment to see if ANSI colour codes should be used on stdout. This is done using unsafePerformIO so it can be used anywhere, eg in low-level debug utilities, which should be ok since we are just reading. The logic is: use color if the program was started with --color=yes|always or ( the program was not started with --color=no|never and a NO_COLOR environment variable is not defined and stdout supports ANSI color and -o/--output-file was not used, or its value is "-" ).
useColorOnStderr :: Bool #
Like useColorOnStdout, but checks for ANSI color support on stderr, and is not affected by -o/--output-file.
color :: ColorIntensity -> Color -> String -> String #
Wrap a string in ANSI codes to set and reset foreground colour.
ColorIntensity is Dull
or Vivid
(ie normal and bold).
Color is one of Black
, Red
, Green
, Yellow
, Blue
, Magenta
, Cyan
, White
.
Eg: color Dull Red "text"
.
bgColor :: ColorIntensity -> Color -> String -> String #
Wrap a string in ANSI codes to set and reset background colour.
colorB :: ColorIntensity -> Color -> WideBuilder -> WideBuilder #
Wrap a WideBuilder in ANSI codes to set and reset foreground colour.
bgColorB :: ColorIntensity -> Color -> WideBuilder -> WideBuilder #
Wrap a WideBuilder in ANSI codes to set and reset background colour.
terminalIsLight :: Maybe Bool #
Detect whether the terminal currently has a light background colour, if possible, using unsafePerformIO. If the terminal is transparent, its apparent light/darkness may be different.
terminalLightness :: Maybe Float #
Detect the terminal's current background lightness (0..1), if possible, using unsafePerformIO. If the terminal is transparent, its apparent lightness may be different.
terminalBgColor :: Maybe (RGB Float) #
Detect the terminal's current background colour, if possible, using unsafePerformIO.
terminalFgColor :: Maybe (RGB Float) #
Detect the terminal's current foreground colour, if possible, using unsafePerformIO.
usageError :: String -> a #
A version of errorWithoutStackTrace that adds a usage hint.
expandHomePath :: FilePath -> IO FilePath #
Expand a tilde (representing home directory) at the start of a file path. ~username is not supported. Can raise an error.
expandPath :: FilePath -> FilePath -> IO FilePath #
Given a current directory, convert a possibly relative, possibly tilde-containing file path to an absolute one. ~username is not supported. Leaves "-" unchanged. Can raise an error.
expandGlob :: FilePath -> FilePath -> IO [FilePath] #
Like expandPath, but treats the expanded path as a glob, and returns zero or more matched absolute file paths, alphabetically sorted.
sortByModTime :: [FilePath] -> IO [FilePath] #
Given a list of existing file paths, sort them by modification time, most recent first.
readFilePortably :: FilePath -> IO Text #
Read text from a file, converting any rn line endings to n,, using the system locale's text encoding, ignoring any utf8 BOM prefix (as seen in paypal's 2018 CSV, eg) if that encoding is utf8.
readFileOrStdinPortably :: String -> IO Text #
Like readFilePortably, but read from standard input if the path is "-".
readHandlePortably :: Handle -> IO Text #
embedFileRelative :: FilePath -> Q Exp #
Like embedFile, but takes a path relative to the package directory.
assertLeft :: (HasCallStack, Eq b, Show b) => Either a b -> Assertion #
Assert any Left value.
assertRight :: (HasCallStack, Eq a, Show a) => Either a b -> Assertion #
Assert any Right value.
assertParse :: (HasCallStack, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> Assertion #
Assert that this stateful parser runnable in IO successfully parses all of the given input text, showing the parse error if it fails. Suitable for hledger's JournalParser parsers.
assertParseEq :: (HasCallStack, Eq a, Show a, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> a -> Assertion #
Assert a parser produces an expected value.
assertParseEqOn :: (HasCallStack, Eq b, Show b, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> (a -> b) -> b -> Assertion #
Like assertParseEq, but transform the parse result with the given function before comparing it.
assertParseError :: (HasCallStack, Eq a, Show a, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> String -> Assertion #
Assert that this stateful parser runnable in IO fails to parse the given input text, with a parse error containing the given string.
assertParseStateOn :: (HasCallStack, Eq b, Show b, Default st) => StateT st (ParsecT HledgerParseErrorData Text IO) a -> Text -> (st -> b) -> b -> Assertion #
Run a stateful parser in IO like assertParse, then assert that the final state (the wrapped state, not megaparsec's internal state), transformed by the given function, matches the given expected value.
assertParseE :: (HasCallStack, Eq a, Show a, Default st) => StateT st (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError IO)) a -> Text -> Assertion #
assertParseEqE :: (Default st, Eq a, Show a, HasCallStack) => StateT st (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError IO)) a -> Text -> a -> Assertion #
assertParseErrorE :: (Default st, Eq a, Show a, HasCallStack) => StateT st (ParsecT HledgerParseErrorData Text (ExceptT FinalParseError IO)) a -> Text -> String -> Assertion #
debugLevel :: Int #
The programs debug output verbosity. The default is 0 meaning no debug output.
The --debug
command line flag sets it to 1, or --debug=N
sets it to
a higher value (the = is required). Uses unsafePerformIO.
When running in GHCI, changing this requires reloading this module.
Pretty-trace a showable value before returning it. Like Debug.Trace.traceShowId, but pretty-printing and easier to type.
traceAt :: Int -> String -> a -> a #
Trace (print to stderr) a string if the global debug level is at or above the specified level. At level 0, always prints. Otherwise, uses unsafePerformIO.
traceAtWith :: Int -> (a -> String) -> a -> a #
Trace (print to stderr) a showable value using a custom show function, if the global debug level is at or above the specified level. At level 0, always prints. Otherwise, uses unsafePerformIO.
ptraceAt :: Show a => Int -> String -> a -> a #
Pretty-print a label and a showable value to the console if the global debug level is at or above the specified level. At level 0, always prints. Otherwise, uses unsafePerformIO.
ptraceAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m () #
Like ptraceAt, but convenient to insert in an IO monad and enforces monadic sequencing.
traceLog :: String -> a -> a #
Log a string to the debug log before returning the second argument. Uses unsafePerformIO.
traceLogAt :: Int -> String -> a -> a #
Log a string to the debug log before returning the second argument, if the global debug level is at or above the specified level. At level 0, always logs. Otherwise, uses unsafePerformIO.
traceLogIO :: MonadIO m => String -> m () #
Like traceLog but sequences properly in IO.
traceLogAtIO :: MonadIO m => Int -> String -> m () #
Like traceLogAt, but convenient to use in IO.
traceLogWith :: (a -> String) -> a -> a #
Log a value to the debug log with the given show function before returning it.
traceLogAtWith :: Int -> (a -> String) -> a -> a #
Log a string to the debug log before returning the second argument, if the global debug level is at or above the specified level. At level 0, always logs. Otherwise, uses unsafePerformIO.
ptraceLogAt :: Show a => Int -> String -> a -> a #
Pretty-log a label and showable value to the debug log, if the global debug level is at or above the specified level. At level 0, always prints. Otherwise, uses unsafePerformIO.
ptraceLogAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m () #
Like ptraceAt, but convenient to insert in an IO monad and enforces monadic sequencing.
traceOrLog :: String -> a -> a #
traceOrLogAt :: Int -> String -> a -> a #
ptraceOrLogAt :: Show a => Int -> String -> a -> a #
ptraceOrLogAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m () #
traceOrLogAtWith :: Int -> (a -> String) -> a -> a #
dbg0 :: Show a => String -> a -> a #
Pretty-trace to stderr (or log to debug log) a label and showable value, then return it.
dbg1 :: Show a => String -> a -> a #
Pretty-trace to stderr (or log to debug log) a label and showable value if the --debug level is high enough, then return the value. Uses unsafePerformIO.
traceOrLogParse :: forall (m :: Type -> Type). String -> TextParser m () #
Trace to stderr or log to debug log the provided label (if non-null) and current parser state (position and next input). See also: Hledger.Utils.Debug, megaparsec's dbg. Uses unsafePerformIO.
dbgparse :: forall (m :: Type -> Type). Int -> String -> TextParser m () #
Trace to stderr or log to debug log the provided label (if non-null) and current parser state (position and next input), if the global debug level is at or above the specified level. Uses unsafePerformIO.
sourcePosPairPretty :: (SourcePos, SourcePos) -> String #
Render a pair of source positions in human-readable form, only displaying the range of lines.
choice' :: forall (m :: Type -> Type) a. [TextParser m a] -> TextParser m a #
Backtracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail.
choiceInState :: forall s (m :: Type -> Type) a. [StateT s (ParsecT HledgerParseErrorData Text m) a] -> StateT s (ParsecT HledgerParseErrorData Text m) a #
Backtracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail.
surroundedBy :: Applicative m => m openclose -> m a -> m a #
runTextParser :: TextParser Identity a -> Text -> Either HledgerParseErrors a #
Run a text parser in the identity monad. See also: parseWithState.
rtp :: TextParser Identity a -> Text -> Either HledgerParseErrors a #
Run a text parser in the identity monad. See also: parseWithState.
parsewithString :: Parsec e String a -> String -> Either (ParseErrorBundle String e) a #
parseWithState :: Monad m => st -> StateT st (ParsecT HledgerParseErrorData Text m) a -> Text -> m (Either HledgerParseErrors a) #
Run a stateful parser with some initial state on a text. See also: runTextParser, runJournalParser.
parseWithState' :: Stream s => st -> StateT st (ParsecT e s Identity) a -> s -> Either (ParseErrorBundle s e) a #
fromparse :: (Show t, Show (Token t), Show e) => Either (ParseErrorBundle t e) a -> a #
parseerror :: (Show t, Show (Token t), Show e) => ParseErrorBundle t e -> a #
showDateParseError :: (Show t, Show (Token t), Show e) => ParseErrorBundle t e -> String #
nonspace :: forall (m :: Type -> Type). TextParser m Char #
isNonNewlineSpace :: Char -> Bool #
spacenonewline :: forall s (m :: Type -> Type). (Stream s, Char ~ Token s) => ParsecT HledgerParseErrorData s m Char #
restofline :: forall (m :: Type -> Type). TextParser m String #
skipNonNewlineSpaces :: forall s (m :: Type -> Type). (Stream s, Token s ~ Char) => ParsecT HledgerParseErrorData s m () #
skipNonNewlineSpaces1 :: forall s (m :: Type -> Type). (Stream s, Token s ~ Char) => ParsecT HledgerParseErrorData s m () #
skipNonNewlineSpaces' :: forall s (m :: Type -> Type). (Stream s, Token s ~ Char) => ParsecT HledgerParseErrorData s m Bool #
eolof :: forall (m :: Type -> Type). TextParser m () #
strip1Char :: Char -> Char -> String -> String #
Strip the given starting and ending character from the start and end of a string if both are present.
stripBy :: (Char -> Bool) -> String -> String #
Strip a run of zero or more characters matching the predicate from the start and end of a string.
strip1By :: (Char -> Bool) -> String -> String #
Strip a single balanced enclosing pair of a character matching the predicate from the start and end of a string.
Remove all trailing newline/carriage returns, leaving just one trailing newline.
singleline :: String -> String #
Remove consecutive line breaks, replacing them with single space
stripbrackets :: String -> String #
elideRight :: Int -> String -> String #
quoteIfNeeded :: String -> String #
Double-quote this string if it contains whitespace, single quotes or double-quotes, escaping the quotes as needed.
singleQuoteIfNeeded :: String -> String #
Single-quote this string if it contains whitespace or double-quotes. Does not work for strings containing single quotes.
quoteForCommandLine :: String -> String #
Try to single- and backslash-quote a string as needed to make it usable as an argument on a (sh/bash) shell command line. At least, well enough to handle common currency symbols, like $. Probably broken in many ways.
>>>
quoteForCommandLine "a"
"a">>>
quoteForCommandLine "\""
"'\"'">>>
quoteForCommandLine "$"
"'\\$'"
words' :: String -> [String] #
Quote-aware version of words - don't split on spaces which are inside quotes.
NB correctly handles "a'b" but not "'a'
". Can raise an error if parsing fails.
unwords' :: [String] -> String #
Quote-aware version of unwords - single-quote strings which contain whitespace
takeWidth :: Int -> String -> String #
Double-width-character-aware string truncation. Take as many characters as possible from a string without exceeding the specified width. Eg takeWidth 3 "りんご" = "り".
strWidthAnsi :: String -> Int #
Like strWidth, but also strips ANSI escape sequences before calculating the width.
This is no longer used in code, as widths are calculated before adding ANSI escape sequences, but is being kept around for now.
Alias for realLength
.
stripAnsi :: String -> String #
Strip ANSI escape sequences from a string.
>>>
stripAnsi "\ESC[31m-1\ESC[m"
"-1"
applyN :: Int -> (a -> a) -> a -> a #
Apply a function the specified number of times, which should be > 0 (otherwise does nothing). Possibly uses O(n) stack ?
sequence' :: Monad f => [f a] -> f [a] #
This is a version of sequence based on difference lists. It is slightly faster but we mostly use it because it uses the heap instead of the stack. This has the advantage that Neil Mitchell’s trick of limiting the stack size to discover space leaks doesn’t show this as a false positive.
maximum' :: Integral a => [a] -> a #
Total version of maximum, for integral types, giving 0 for an empty list.
maximumStrict :: Ord a => [a] -> a #
Strict version of maximum that doesn’t leak space
minimumStrict :: Ord a => [a] -> a #
Strict version of minimum that doesn’t leak space
splitAtElement :: Eq a => a -> [a] -> [[a]] #
treeLeaves :: Tree a -> [a] #
Get the leaves of this tree as a list. The topmost node ("root" in hledger account trees) is not counted as a leaf.
multicol :: Int -> [String] -> String #
Convert a list of strings to a multi-line multi-column list fitting within the given width. Not wide character aware.
numDigitsInt :: Integral a => Int -> a #
Find the number of digits of an Int
.
makeHledgerClassyLenses :: Name -> DecsQ #
Make classy lenses for Hledger options fields. This is intended to be used with BalancingOpts, InputOpt, ReportOpts, ReportSpec, and CliOpts. When run on X, it will create a typeclass named HasX (except for ReportOpts, which will be named HasReportOptsNoUpdate) containing all the lenses for that type. If the field name starts with an underscore, the lens name will be created by stripping the underscore from the front on the name. If the field name ends with an underscore, the field name ends with an underscore, the lens name will be mostly created by stripping the underscore, but a few names for which this would create too many conflicts instead have a second underscore appended. ReportOpts fields for which updating them requires updating the query in ReportSpec are instead names by dropping the trailing underscore and appending NoUpdate to the name, e.g. querystring_ -> querystringNoUpdate.
There are a few reasons for the complicated rules. - We have some legacy field names ending in an underscore (e.g. value_) which we want to temporarily accommodate, before eventually switching to a more modern style (e.g. _rsReportOpts) - Certain fields in ReportOpts need to update the enclosing ReportSpec when they are updated, and it is a common programming error to forget to do this. We append NoUpdate to those lenses which will not update the enclosing field, and reserve the shorter name for manually define lenses (or at least something lens-like) which will update the ReportSpec. cf. the lengthy discussion here and in surrounding comments: https://github.com/simonmichael/hledger/pull/1545#issuecomment-881974554
tests_Utils :: TestTree #
setboolopt :: String -> RawOpts -> RawOpts #
unsetboolopt :: String -> RawOpts -> RawOpts #
toggleopt :: String -> RawOpts -> Bool #
Like boolopt, except if the flag is repeated on the command line it toggles the value. An even number of repetitions is equivalent to none.
Arguments
:: (String -> Maybe a) | "parser" that returns |
-> RawOpts | actual options where to look for flag |
-> Maybe a | exclusive choice among those returned as |
From a list of RawOpts, get the last one (ie the right-most on the command line) for which the given predicate returns a Just value. Useful for exclusive choice flags like --daily|--weekly|--quarterly...
>>>
import Safe (readMay)
>>>
choiceopt Just (RawOpts [("a",""), ("b",""), ("c","")])
Just "c">>>
choiceopt (const Nothing) (RawOpts [("a","")])
Nothing>>>
choiceopt readMay (RawOpts [("LT",""),("EQ",""),("Neither","")]) :: Maybe Ordering
Just EQ
collectopts :: ((String, String) -> Maybe a) -> RawOpts -> [a] #
Collects processed and filtered list of options preserving their order
>>>
collectopts (const Nothing) (RawOpts [("x","")])
[]>>>
collectopts Just (RawOpts [("a",""),("b","")])
[("a",""),("b","")]
listofstringopt :: String -> RawOpts -> [String] #
maybeintopt :: String -> RawOpts -> Maybe Int #
Reads the named option's Int argument, if it is present. An argument that is too small or too large will raise an error.
maybeposintopt :: String -> RawOpts -> Maybe Int #
Reads the named option's natural-number argument, if it is present. An argument that is negative or too large will raise an error.
intopt :: String -> RawOpts -> Int #
Reads the named option's Int argument. If not present it will return 0. An argument that is too small or too large will raise an error.
posintopt :: String -> RawOpts -> Int #
Reads the named option's natural-number argument. If not present it will return 0. An argument that is negative or too large will raise an error.
showEFDate :: EFDay -> Text #
showDateSpan :: DateSpan -> Text #
Render a datespan as a display string, abbreviating into a compact form if possible. Warning, hides whether dates are Exact or Flex.
showDateSpanDebug :: DateSpan -> String #
Show a DateSpan with its begin/end dates, exact or flex.
showDateSpanMonthAbbrev :: DateSpan -> Text #
Like showDateSpan, but show month spans as just the abbreviated month name in the current locale.
getCurrentDay :: IO Day #
Get the current local date.
getCurrentMonth :: IO Int #
Get the current local month number.
getCurrentYear :: IO Integer #
Get the current local year.
elapsedSeconds :: Fractional a => UTCTime -> UTCTime -> a #
spanStartYear :: DateSpan -> Maybe Year #
spanEndYear :: DateSpan -> Maybe Year #
spansSpan :: [DateSpan] -> DateSpan #
Get overall span enclosing multiple sequentially ordered spans. The start and end date will be exact or flexible depending on the first span's start date and last span's end date.
splitSpan :: Bool -> Interval -> DateSpan -> [DateSpan] #
Split a DateSpan into consecutive exact spans of the specified Interval. If the first argument is true and the interval is Weeks, Months, Quarters or Years, the start date will be adjusted backward if needed to nearest natural interval boundary (a monday, first of month, first of quarter or first of year). If no interval is specified, the original span is returned. If the original span is the null date span, ie unbounded, the null date span is returned. If the original span is empty, eg if the end date is <= the start date, no spans are returned.
Examples:
>>>
let t i y1 m1 d1 y2 m2 d2 = splitSpan True i $ DateSpan (Just $ Flex $ fromGregorian y1 m1 d1) (Just $ Flex $ fromGregorian y2 m2 d2)
>>>
t NoInterval 2008 01 01 2009 01 01
[DateSpan 2008]>>>
t (Quarters 1) 2008 01 01 2009 01 01
[DateSpan 2008Q1,DateSpan 2008Q2,DateSpan 2008Q3,DateSpan 2008Q4]>>>
splitSpan True (Quarters 1) nulldatespan
[DateSpan ..]>>>
t (Days 1) 2008 01 01 2008 01 01 -- an empty datespan
[]>>>
t (Quarters 1) 2008 01 01 2008 01 01
[]>>>
t (Months 1) 2008 01 01 2008 04 01
[DateSpan 2008-01,DateSpan 2008-02,DateSpan 2008-03]>>>
t (Months 2) 2008 01 01 2008 04 01
[DateSpan 2008-01-01..2008-02-29,DateSpan 2008-03-01..2008-04-30]>>>
t (Weeks 1) 2008 01 01 2008 01 15
[DateSpan 2007-12-31W01,DateSpan 2008-01-07W02,DateSpan 2008-01-14W03]>>>
t (Weeks 2) 2008 01 01 2008 01 15
[DateSpan 2007-12-31..2008-01-13,DateSpan 2008-01-14..2008-01-27]>>>
t (DayOfMonth 2) 2008 01 01 2008 04 01
[DateSpan 2007-12-02..2008-01-01,DateSpan 2008-01-02..2008-02-01,DateSpan 2008-02-02..2008-03-01,DateSpan 2008-03-02..2008-04-01]>>>
t (WeekdayOfMonth 2 4) 2011 01 01 2011 02 15
[DateSpan 2010-12-09..2011-01-12,DateSpan 2011-01-13..2011-02-09,DateSpan 2011-02-10..2011-03-09]>>>
t (DaysOfWeek [2]) 2011 01 01 2011 01 15
[DateSpan 2010-12-28..2011-01-03,DateSpan 2011-01-04..2011-01-10,DateSpan 2011-01-11..2011-01-17]>>>
t (DayOfYear 11 29) 2011 10 01 2011 10 15
[DateSpan 2010-11-29..2011-11-28]>>>
t (DayOfYear 11 29) 2011 12 01 2012 12 15
[DateSpan 2011-11-29..2012-11-28,DateSpan 2012-11-29..2013-11-28]
spansFromBoundaries :: Day -> [Day] -> [DateSpan] #
Construct a list of exact DateSpan
s from a list of boundaries, which fit within a given range.
daysInSpan :: DateSpan -> Maybe Integer #
Count the days in a DateSpan, or if it is open-ended return Nothing.
spanContainsDate :: DateSpan -> Day -> Bool #
Does the span include the given date ?
periodContainsDate :: Period -> Day -> Bool #
Does the period include the given date ? (Here to avoid import cycle).
groupByDateSpan :: Bool -> (a -> Day) -> [DateSpan] -> [a] -> [(DateSpan, [a])] #
Group elements based on where they fall in a list of DateSpan
s without
gaps. The precondition is not checked.
spansIntersect :: [DateSpan] -> DateSpan #
Calculate the intersection of a number of datespans.
spanIntersect :: DateSpan -> DateSpan -> DateSpan #
Calculate the intersection of two datespans.
For non-intersecting spans, gives an empty span beginning on the second's start date:
>>> DateSpan (Just $ Flex $ fromGregorian 2018 01 01) (Just $ Flex $ fromGregorian 2018 01 03) spanIntersect
DateSpan (Just $ Flex $ fromGregorian 2018 01 03) (Just $ Flex $ fromGregorian 2018 01 05)
DateSpan 2018-01-03..2018-01-02
spanDefaultsFrom :: DateSpan -> DateSpan -> DateSpan #
Fill any unspecified dates in the first span with the dates from the second one. Sort of a one-way spanIntersect.
spansUnion :: [DateSpan] -> DateSpan #
Calculate the union of a number of datespans.
daysSpan :: [Day] -> DateSpan #
Calculate the minimal DateSpan containing all of the given Days (in the usual exclusive-end-date sense: beginning on the earliest, and ending on the day after the latest).
latestSpanContaining :: [DateSpan] -> Day -> Maybe DateSpan #
Select the DateSpan containing a given Day, if any, from a given list of DateSpans.
If the DateSpans are non-overlapping, this returns the unique containing DateSpan, if it exists. If the DateSpans are overlapping, it will return the containing DateSpan with the latest start date, and then latest end date.
parsePeriodExpr :: Day -> Text -> Either HledgerParseErrors (Interval, DateSpan) #
Parse a period expression to an Interval and overall DateSpan using the provided reference date, or return a parse error.
parsePeriodExpr' :: Day -> Text -> (Interval, DateSpan) #
Like parsePeriodExpr, but call error' on failure.
fixSmartDateStr :: Day -> Text -> Text #
Convert a smart date string to an explicit yyyy/mm/dd string using the provided reference date, or raise an error.
fixSmartDateStrEither :: Day -> Text -> Either HledgerParseErrors Text #
A safe version of fixSmartDateStr.
fixSmartDateStrEither' :: Day -> Text -> Either HledgerParseErrors EFDay #
fixSmartDate :: Day -> SmartDate -> EFDay #
Convert a SmartDate to a specific date using the provided reference date. This date will be exact or flexible depending on whether the day was specified exactly. (Missing least-significant parts produces a flex date.)
Examples:
>>>
:set -XOverloadedStrings
>>>
let t = fixSmartDateStr (fromGregorian 2008 11 26)
>>>
t "0000-01-01"
"0000-01-01">>>
t "1999-12-02"
"1999-12-02">>>
t "1999.12.02"
"1999-12-02">>>
t "1999/3/2"
"1999-03-02">>>
t "19990302"
"1999-03-02">>>
t "2008/2"
"2008-02-01">>>
t "0020/2"
"0020-02-01">>>
t "1000"
"1000-01-01">>>
t "4/2"
"2008-04-02">>>
t "2"
"2008-11-02">>>
t "January"
"2008-01-01">>>
t "feb"
"2008-02-01">>>
t "today"
"2008-11-26">>>
t "yesterday"
"2008-11-25">>>
t "tomorrow"
"2008-11-27">>>
t "this day"
"2008-11-26">>>
t "last day"
"2008-11-25">>>
t "next day"
"2008-11-27">>>
t "this week" -- last monday
"2008-11-24">>>
t "last week" -- previous monday
"2008-11-17">>>
t "next week" -- next monday
"2008-12-01">>>
t "this month"
"2008-11-01">>>
t "last month"
"2008-10-01">>>
t "next month"
"2008-12-01">>>
t "this quarter"
"2008-10-01">>>
t "last quarter"
"2008-07-01">>>
t "next quarter"
"2009-01-01">>>
t "this year"
"2008-01-01">>>
t "last year"
"2007-01-01">>>
t "next year"
"2009-01-01"
t "last wed" "2008-11-19" t "next friday" "2008-11-28" t "next january" "2009-01-01"
>>>
t "in 5 days"
"2008-12-01">>>
t "in 7 months"
"2009-06-01">>>
t "in -2 weeks"
"2008-11-10">>>
t "1 quarter ago"
"2008-07-01">>>
t "1 week ahead"
"2008-12-01"
intervalBoundaryBefore :: Interval -> Day -> Day #
parsedateM :: String -> Maybe Day #
Try to parse a couple of date string formats:
`YYYY-MM-DD`, `YYYYMMDD` or DD
, with leading zeros required.
For internal use, not quite the same as the journal's "simple dates".
>>> parsedateM "20080203"
Just 2008-02-03
>>> parsedateM "20080203/"
Nothing
>>> parsedateM "20080230"
Nothing
smartdate :: forall (m :: Type -> Type). TextParser m SmartDate #
Parse a date in any of the formats allowed in Ledger's period expressions, and some others. Assumes any text in the parse stream has been lowercased. Returns a SmartDate, to be converted to a full date later (see fixSmartDate).
Examples:
2004 (start of year, which must have 4+ digits) 2004/10 (start of month, which must be 1-12) 2004/10/1 (exact date, day must be 1-31) 10/1 (month and day in current year) 21 (day in current month) october, oct (start of month in current year) yesterday, today, tomorrow (-1, 0, 1 days from today) last/this/next day/week/month/quarter/year (-1, 0, 1 periods from the current period) in n days/weeks/months/quarters/years (n periods from the current period) n days/weeks/months/quarters/years ago (-n periods from the current period) 20181201 (8 digit YYYYMMDD with valid year month and day) 201812 (6 digit YYYYMM with valid year and month)
Note malformed digit sequences might give surprising results:
201813 (6 digits with an invalid month is parsed as start of 6-digit year) 20181301 (8 digits with an invalid month is parsed as start of 8-digit year) 20181232 (8 digits with an invalid day gives an error) 201801012 (9+ digits beginning with a valid YYYYMMDD gives an error)
Eg:
YYYYMMDD is parsed as year-month-date if those parts are valid (>=4 digits, 1-12, and 1-31 respectively): >>> parsewith (smartdate <* eof) "20181201" Right (SmartCompleteDate 2018-12-01)
YYYYMM is parsed as year-month-01 if year and month are valid: >>> parsewith (smartdate <* eof) "201804" Right (SmartAssumeStart 2018 (Just 4))
With an invalid month, it's parsed as a year: >>> parsewith (smartdate <* eof) "201813" Right (SmartAssumeStart 201813 Nothing)
A 9+ digit number beginning with valid YYYYMMDD gives an error: >>> parsewith (smartdate <* eof) "201801012" Left (...)
Big numbers not beginning with a valid YYYYMMDD are parsed as a year: >>> parsewith (smartdate <* eof) "201813012" Right (SmartAssumeStart 201813012 Nothing)
datesepchars :: String #
datesepchar :: forall (m :: Type -> Type). TextParser m Char #
isDateSepChar :: Char -> Bool #
yearp :: forall (m :: Type -> Type). TextParser m Integer #
Parse a year number from a Text, making sure that at least four digits are used.
periodexprp :: forall (m :: Type -> Type). Day -> TextParser m (Interval, DateSpan) #
Parse a period expression, specifying a date span and optionally a reporting interval. Requires a reference "today" date for resolving any relative start/end dates (only; it is not needed for parsing the reporting interval).
>>>
let p = parsePeriodExpr (fromGregorian 2008 11 26)
>>>
p "from Aug to Oct"
Right (NoInterval,DateSpan 2008-08-01..2008-09-30)>>>
p "aug to oct"
Right (NoInterval,DateSpan 2008-08-01..2008-09-30)>>>
p "2009q2"
Right (NoInterval,DateSpan 2009Q2)>>>
p "Q3"
Right (NoInterval,DateSpan 2008Q3)>>>
p "every 3 days in Aug"
Right (Days 3,DateSpan 2008-08)>>>
p "daily from aug"
Right (Days 1,DateSpan 2008-08-01..)>>>
p "every week to 2009"
Right (Weeks 1,DateSpan ..2008-12-31)>>>
p "every 2nd day of month"
Right (DayOfMonth 2,DateSpan ..)>>>
p "every 2nd day"
Right (DayOfMonth 2,DateSpan ..)>>>
p "every 2nd day 2009.."
Right (DayOfMonth 2,DateSpan 2009-01-01..)>>>
p "every 2nd day 2009-"
Right (DayOfMonth 2,DateSpan 2009-01-01..)>>>
p "every 29th Nov"
Right (DayOfYear 11 29,DateSpan ..)>>>
p "every 29th nov ..2009"
Right (DayOfYear 11 29,DateSpan ..2008-12-31)>>>
p "every nov 29th"
Right (DayOfYear 11 29,DateSpan ..)>>>
p "every Nov 29th 2009.."
Right (DayOfYear 11 29,DateSpan 2009-01-01..)>>>
p "every 11/29 from 2009"
Right (DayOfYear 11 29,DateSpan 2009-01-01..)>>>
p "every 11/29 since 2009"
Right (DayOfYear 11 29,DateSpan 2009-01-01..)>>>
p "every 2nd Thursday of month to 2009"
Right (WeekdayOfMonth 2 4,DateSpan ..2008-12-31)>>>
p "every 1st monday of month to 2009"
Right (WeekdayOfMonth 1 1,DateSpan ..2008-12-31)>>>
p "every tue"
Right (DaysOfWeek [2],DateSpan ..)>>>
p "every 2nd day of week"
Right (DaysOfWeek [2],DateSpan ..)>>>
p "every 2nd day of month"
Right (DayOfMonth 2,DateSpan ..)>>>
p "every 2nd day"
Right (DayOfMonth 2,DateSpan ..)>>>
p "every 2nd day 2009.."
Right (DayOfMonth 2,DateSpan 2009-01-01..)>>>
p "every 2nd day of month 2009.."
Right (DayOfMonth 2,DateSpan 2009-01-01..)
An exact datespan of zero length, that matches no date.
tests_Dates :: TestTree #
acctsepchar :: Char #
accountNameComponents :: AccountName -> [Text] #
accountNameFromComponents :: [Text] -> AccountName #
accountLeafName :: AccountName -> Text #
accountSummarisedName :: AccountName -> Text #
Truncate all account name components but the last to two characters.
Regular expressions matching common English top-level account names, used as a fallback when account types are not declared.
accountNameInferType :: AccountName -> Maybe AccountType #
Try to guess an account's type from its name, matching common English top-level account names.
accountNameType :: Map AccountName AccountType -> AccountName -> Maybe AccountType #
accountNameLevel :: AccountName -> Int #
unbudgetedAccountName :: Text #
A top-level account prefixed to some accounts in budget reports. Defined here so it can be ignored by accountNameDrop.
joinAccountNames :: AccountName -> AccountName -> AccountName #
Prefix one account name to another, preserving posting type indicators like concatAccountNames.
concatAccountNames :: [AccountName] -> AccountName #
Join account names into one. If any of them has () or [] posting type indicators, these (the first type encountered) will also be applied to the resulting account name.
accountNameApplyAliases :: [AccountAlias] -> AccountName -> Either RegexError AccountName #
Rewrite an account name using all matching aliases from the given list, in sequence. Each alias sees the result of applying the previous aliases. Or, return any error arising from a bad regular expression in the aliases.
accountNameApplyAliasesMemo :: [AccountAlias] -> AccountName -> Either RegexError AccountName #
Memoising version of accountNameApplyAliases, maybe overkill.
accountNameDrop :: Int -> AccountName -> AccountName #
Remove some number of account name components from the front of the account name. If the special "unbudgeted" top-level account is present, it is preserved and dropping affects the rest of the account name.
expandAccountNames :: [AccountName] -> [AccountName] #
Sorted unique account names implied by these account names, ie these plus all their parent accounts up to the root. Eg: ["a:b:c","d:e"] -> ["a","a:b","a:b:c","d","d:e"]
expandAccountName :: AccountName -> [AccountName] #
"a:b:c" -> ["a","a:b","a:b:c"]
topAccountNames :: [AccountName] -> [AccountName] #
- "a:b:c","d:e"
- -> ["a","d"]
parentAccountNames :: AccountName -> [AccountName] #
isAccountNamePrefixOf :: AccountName -> AccountName -> Bool #
Is the first account a parent or other ancestor of (and not the same as) the second ?
isSubAccountNameOf :: AccountName -> AccountName -> Bool #
subAccountNamesFrom :: [AccountName] -> AccountName -> [AccountName] #
From a list of account names, select those which are direct subaccounts of the given account name.
accountNameTreeFrom :: [AccountName] -> Tree AccountName #
Convert a list of account names to a tree.
elideAccountName :: Int -> AccountName -> AccountName #
Elide an account name to fit in the specified width. From the ledger 2.6 news:
What Ledger now does is that if an account name is too long, it will start abbreviating the first parts of the account name down to two letters in length. If this results in a string that is still too long, the front will be elided -- not the end. For example: Expenses:Cash ; OK, not too long Ex:Wednesday:Cash ; Expenses was abbreviated to fit Ex:We:Afternoon:Cash ; Expenses and Wednesday abbreviated ; Expenses:Wednesday:Afternoon:Lunch:Snack:Candy:Chocolate:Cash ..:Af:Lu:Sn:Ca:Ch:Cash ; Abbreviated and elided!
clipAccountName :: Maybe Int -> AccountName -> AccountName #
Keep only the first n components of an account name, where n is a positive integer. If n is Just 0, returns the empty string, if n is Nothing, return the full name.
clipOrEllipsifyAccountName :: Maybe Int -> AccountName -> AccountName #
Keep only the first n components of an account name, where n is a positive integer. If n is Just 0, returns "...", if n is Nothing, return the full name.
escapeName :: AccountName -> Text #
Escape an AccountName for use within a regular expression.
>>> putStr . T.unpack $ escapeName "First?!#$*?$(*) !^#*? %)*!
#"
First?!#$*?$(*) !^#*? %)*!
#
accountNameToAccountRegex :: AccountName -> Regexp #
Convert an account name to a regular expression matching it and its subaccounts.
accountNameToAccountRegexCI :: AccountName -> Regexp #
Convert an account name to a regular expression matching it and its subaccounts, case insensitively.
accountNameToAccountOnlyRegex :: AccountName -> Regexp #
Convert an account name to a regular expression matching it but not its subaccounts.
accountNameToAccountOnlyRegexCI :: AccountName -> Regexp #
Convert an account name to a regular expression matching it but not its subaccounts, case insensitively.
defaultBalanceLineFormat :: StringFormat #
Default line format for balance report: "%20(total) %2(depth_spacer)%-(account)"
parseStringFormat :: Text -> Either String StringFormat #
Parse a string format specification, or return a parse error.
showCommoditySymbol :: Text -> Text #
Show space-containing commodity symbols quoted, as they are in a journal.
isNonsimpleCommodityChar :: Char -> Bool #
noColour :: AmountDisplayOpts #
Display amounts without colour, and with various other defaults.
noPrice :: AmountDisplayOpts #
Display Amount and MixedAmount with no prices.
csvDisplay :: AmountDisplayOpts #
Display Amount and MixedAmount in a form suitable for CSV output.
Default amount style
The empty simple amount - a zero with no commodity symbol or cost and the default amount display style.
missingamt :: Amount #
A special amount used as a marker, meaning "no explicit amount provided here, infer it when needed". It is nullamt with commodity symbol AUTO.
usd :: DecimalRaw Integer -> Amount #
eur :: DecimalRaw Integer -> Amount #
gbp :: DecimalRaw Integer -> Amount #
amountWithCommodity :: CommoditySymbol -> Amount -> Amount #
Convert an amount to the specified commodity, ignoring and discarding any assigned prices and assuming an exchange rate of 1.
amountCost :: Amount -> Amount #
Convert a amount to its "cost" or "selling price" in another commodity, using its attached transaction price if it has one. Notes:
- price amounts must be MixedAmounts with exactly one component Amount (or there will be a runtime error XXX)
- price amounts should be positive in the Journal (though this is currently not enforced)
divideAmount :: Quantity -> Amount -> Amount #
Divide an amount's quantity (and its total price, if it has one) by a constant.
multiplyAmount :: Quantity -> Amount -> Amount #
Multiply an amount's quantity (and its total price, if it has one) by a constant.
isNegativeAmount :: Amount -> Bool #
Is this amount negative ? The price is ignored.
amountLooksZero :: Amount -> Bool #
Do this Amount and (and its total price, if it has one) appear to be zero when rendered with its display precision ? The display precision should usually have a specific value here; if unset, it will be treated like NaturalPrecision.
amountIsZero :: Amount -> Bool #
Is this Amount (and its total price, if it has one) exactly zero, ignoring its display precision ?
withPrecision :: Amount -> AmountPrecision -> Amount #
Set an amount's display precision, flipped.
amountSetPrecision :: AmountPrecision -> Amount -> Amount #
Set an amount's display precision.
amountSetFullPrecision :: Amount -> Amount #
Increase an amount's display precision, if needed, to enough decimal places to show it exactly (showing all significant decimal digits, without trailing zeros). If the amount's display precision is unset, it is will be treated as precision 0.
setAmountInternalPrecision :: Word8 -> Amount -> Amount #
Set an amount's internal precision, ie rounds the Decimal representing the amount's quantity to some number of decimal places. Rounding is done with Data.Decimal's default roundTo function: "If the value ends in 5 then it is rounded to the nearest even value (Banker's Rounding)". Does not change the amount's display precision. Intended mainly for internal use, eg when comparing amounts in tests.
withInternalPrecision :: Amount -> Word8 -> Amount #
Set an amount's internal precision, flipped. Intended mainly for internal use, eg when comparing amounts in tests.
setAmountDecimalPoint :: Maybe Char -> Amount -> Amount #
Set (or clear) an amount's display decimal point.
withDecimalPoint :: Amount -> Maybe Char -> Amount #
Set (or clear) an amount's display decimal point, flipped.
amountStripPrices :: Amount -> Amount #
Strip all prices from an Amount
showAmountPrice :: Amount -> WideBuilder #
canonicaliseAmount :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
Canonicalise an amount's display style using the provided commodity style map. Its cost amount, if any, is not affected.
styleAmount :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
Given a map of standard commodity display styles, apply the appropriate one to this amount. If there's no standard style for this amount's commodity, return the amount unchanged. Also do the same for the cost amount if any, but leave its precision unchanged.
amountSetStyles :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
Given some commodity display styles, find and apply the appropriate display style to this amount, and do the same for its cost amount if any (and then stop; we assume costs don't have costs). The main amount's display precision is set or not, according to its style; the cost amount's display precision is left unchanged, regardless of its style. If no style is found for an amount, it is left unchanged.
amountSetStylesExceptPrecision :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
Like amountSetStyles, but leave the display precision unchanged in both main and cost amounts.
amountSetMainStyle :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
Find and apply the appropriate display style, if any, to this amount. The display precision is set or not, according to the style.
amountSetCostStyle :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
Find and apply the appropriate display style, if any, to this amount's cost, if any. The display precision is left unchanged, regardless of the style.
amountUnstyled :: Amount -> Amount #
Reset this amount's display style to the default.
showAmount :: Amount -> String #
Get the string representation of an amount, based on its commodity's display settings. String representations equivalent to zero are converted to just "0". The special "missing" amount is displayed as the empty string.
showAmount = wbUnpack . showAmountB noColour
showAmountB :: AmountDisplayOpts -> Amount -> WideBuilder #
General function to generate a WideBuilder for an Amount, according the supplied AmountDisplayOpts. This is the main function to use for showing Amounts, constructing a builder; it can then be converted to a Text with wbToText, or to a String with wbUnpack. Some special cases:
- The special "missing" amount is displayed as the empty string.
- If an amount is showing digit group separators but no decimal places, we force showing a decimal mark (with nothing after it) to make it easier to parse correctly.
cshowAmount :: Amount -> String #
Colour version. For a negative amount, adds ANSI codes to change the colour, currently to hard-coded red.
cshowAmount = wbUnpack . showAmountB def{displayColour=True}
showAmountWithoutPrice :: Amount -> String #
Get the string representation of an amount, without any @ price.
showAmountWithoutPrice = wbUnpack . showAmountB noPrice
showAmountWithZeroCommodity :: Amount -> String #
Like showAmount, but show a zero amount's commodity if it has one.
showAmountWithZeroCommodity = wbUnpack . showAmountB noColour{displayZeryCommodity=True}
showAmountDebug :: Amount -> String #
Get a string representation of an amount for debugging, appropriate to the current debug level. 9 shows maximum detail.
The empty mixed amount.
missingmixedamt :: MixedAmount #
A special mixed amount used as a marker, meaning "no explicit amount provided here, infer it when needed".
isMissingMixedAmount :: MixedAmount -> Bool #
Does this MixedAmount include the "missing amount" marker ? Note: currently does not test for equality with missingmixedamt, instead it looks for missingamt among the Amounts. missingamt should always be alone, but detect it even if not.
mixed :: Foldable t => t Amount -> MixedAmount #
Convert amounts in various commodities into a mixed amount.
mixedAmount :: Amount -> MixedAmount #
Create a MixedAmount from a single Amount.
maAddAmount :: MixedAmount -> Amount -> MixedAmount #
Add an Amount to a MixedAmount, normalising the result. Amounts with different costs are kept separate.
maAddAmounts :: Foldable t => MixedAmount -> t Amount -> MixedAmount #
Add a collection of Amounts to a MixedAmount, normalising the result. Amounts with different costs are kept separate.
maNegate :: MixedAmount -> MixedAmount #
Negate mixed amount's quantities (and total prices, if any).
maPlus :: MixedAmount -> MixedAmount -> MixedAmount #
Sum two MixedAmount, keeping the cost of the first if any. Amounts with different costs are kept separate (since 2021).
maMinus :: MixedAmount -> MixedAmount -> MixedAmount #
Subtract a MixedAmount from another. Amounts with different costs are kept separate.
maSum :: Foldable t => t MixedAmount -> MixedAmount #
Sum a collection of MixedAmounts. Amounts with different costs are kept separate.
divideMixedAmount :: Quantity -> MixedAmount -> MixedAmount #
Divide a mixed amount's quantities (and total prices, if any) by a constant.
multiplyMixedAmount :: Quantity -> MixedAmount -> MixedAmount #
Multiply a mixed amount's quantities (and total prices, if any) by a constant.
averageMixedAmounts :: [MixedAmount] -> MixedAmount #
Calculate the average of some mixed amounts.
isNegativeMixedAmount :: MixedAmount -> Maybe Bool #
Is this mixed amount negative, if we can tell that unambiguously? Ie when normalised, are all individual commodity amounts negative ?
mixedAmountLooksZero :: MixedAmount -> Bool #
Does this mixed amount appear to be zero when rendered with its display precision? i.e. does it have zero quantity with no price, zero quantity with a total price (which is also zero), and zero quantity for each unit price?
mixedAmountIsZero :: MixedAmount -> Bool #
Is this mixed amount exactly zero, ignoring its display precision? i.e. does it have zero quantity with no price, zero quantity with a total price (which is also zero), and zero quantity for each unit price?
maIsZero :: MixedAmount -> Bool #
Is this mixed amount exactly zero, ignoring its display precision?
A convenient alias for mixedAmountIsZero.
maIsNonZero :: MixedAmount -> Bool #
Is this mixed amount non-zero, ignoring its display precision?
A convenient alias for not . mixedAmountIsZero.
amounts :: MixedAmount -> [Amount] #
Get a mixed amount's component amounts, with some cleanups. The following descriptions are old and possibly wrong:
- amounts in the same commodity are combined unless they have different prices or total prices
- multiple zero amounts, all with the same non-null commodity, are replaced by just the last of them, preserving the commodity and amount style (all but the last zero amount are discarded)
- multiple zero amounts with multiple commodities, or no commodities, are replaced by one commodity-less zero amount
- an empty amount list is replaced by one commodity-less zero amount
- the special "missing" mixed amount remains unchanged
amountsPreservingZeros :: MixedAmount -> [Amount] #
Get a mixed amount's component amounts, with some cleanups.
This is a new version of amounts
, with updated descriptions
and optimised for print
to show commodityful zeros.
- If it contains the "missing amount" marker, only that is returned (discarding any additional amounts).
- Or if it contains any non-zero amounts, only those are returned (discarding any zeroes).
- Or if it contains any zero amounts (possibly more than one, possibly in different commodities), all of those are returned.
- Otherwise the null amount is returned.
amountsRaw :: MixedAmount -> [Amount] #
Get a mixed amount's component amounts without normalising zero and missing amounts. This is used for JSON serialisation, so the order is important. In particular, we want the Amounts given in the order of the MixedAmountKeys, i.e. lexicographically first by commodity, then by price commodity, then by unit price from most negative to most positive.
maCommodities :: MixedAmount -> Set CommoditySymbol #
Get this mixed amount's commodities as a set. Returns an empty set if there are no amounts.
unifyMixedAmount :: MixedAmount -> Maybe Amount #
Unify a MixedAmount to a single commodity value if possible. This consolidates amounts of the same commodity and discards zero amounts; but this one insists on simplifying to a single commodity, and will return Nothing if this is not possible.
filterMixedAmount :: (Amount -> Bool) -> MixedAmount -> MixedAmount #
Filter a mixed amount's component amounts by a predicate.
filterMixedAmountByCommodity :: CommoditySymbol -> MixedAmount -> MixedAmount #
Return an unnormalised MixedAmount containing exactly one Amount with the specified commodity and the quantity of that commodity found in the original. NB if Amount's quantity is zero it will be discarded next time the MixedAmount gets normalised.
mapMixedAmount :: (Amount -> Amount) -> MixedAmount -> MixedAmount #
Apply a transform to a mixed amount's component Amount
s.
mixedAmountCost :: MixedAmount -> MixedAmount #
Convert all component amounts to cost/selling price where possible (see amountCost).
canonicaliseMixedAmount :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount #
Canonicalise a mixed amount's display styles using the provided commodity style map. Cost amounts, if any, are not affected.
styleMixedAmount :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount #
Given a map of standard commodity display styles, find and apply the appropriate style to each individual amount.
mixedAmountSetStyles :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount #
mixedAmountSetStylesExceptPrecision :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount #
mixedAmountUnstyled :: MixedAmount -> MixedAmount #
Reset each individual amount's display style to the default.
showMixedAmount :: MixedAmount -> String #
Get the string representation of a mixed amount, after normalising it to one amount per commodity. Assumes amounts have no or similar prices, otherwise this can show misleading prices.
showMixedAmount = wbUnpack . showMixedAmountB noColour
showMixedAmountOneLine :: MixedAmount -> String #
Get the one-line string representation of a mixed amount (also showing any costs).
showMixedAmountOneLine = wbUnpack . showMixedAmountB oneLine
showMixedAmountWithZeroCommodity :: MixedAmount -> String #
Like showMixedAmount, but zero amounts are shown with their commodity if they have one.
showMixedAmountWithZeroCommodity = wbUnpack . showMixedAmountB noColour{displayZeroCommodity=True}
showMixedAmountWithoutPrice :: Bool -> MixedAmount -> String #
Get the string representation of a mixed amount, without showing any transaction prices. With a True argument, adds ANSI codes to show negative amounts in red.
showMixedAmountWithoutPrice c = wbUnpack . showMixedAmountB noPrice{displayColour=c}
showMixedAmountOneLineWithoutPrice :: Bool -> MixedAmount -> String #
Get the one-line string representation of a mixed amount, but without any @ prices. With a True argument, adds ANSI codes to show negative amounts in red.
showMixedAmountOneLineWithoutPrice c = wbUnpack . showMixedAmountB oneLine{displayColour=c}
showMixedAmountElided :: Int -> Bool -> MixedAmount -> String #
Like showMixedAmountOneLineWithoutPrice, but show at most the given width, with an elision indicator if there are more. With a True argument, adds ANSI codes to show negative amounts in red.
showMixedAmountElided w c = wbUnpack . showMixedAmountB oneLine{displayColour=c, displayMaxWidth=Just w}
showMixedAmountDebug :: MixedAmount -> String #
Get an unambiguous string representation of a mixed amount for debugging.
showMixedAmountB :: AmountDisplayOpts -> MixedAmount -> WideBuilder #
General function to generate a WideBuilder for a MixedAmount, according to the supplied AmountDisplayOpts. This is the main function to use for showing MixedAmounts, constructing a builder; it can then be converted to a Text with wbToText, or to a String with wbUnpack.
If a maximum width is given then: - If displayed on one line, it will display as many Amounts as can fit in the given width, and further Amounts will be elided. There will always be at least one amount displayed, even if this will exceed the requested maximum width. - If displayed on multiple lines, any Amounts longer than the maximum width will be elided.
showMixedAmountLinesB :: AmountDisplayOpts -> MixedAmount -> [WideBuilder] #
Helper for showMixedAmountB (and postingAsLines, ...) to show a list of Amounts on multiple lines. This returns the list of WideBuilders: one for each Amount, and padded/elided to the appropriate width. This does not honour displayOneLine; all amounts will be displayed as if displayOneLine were False.
mixedAmountSetPrecision :: AmountPrecision -> MixedAmount -> MixedAmount #
Set the display precision in the amount's commodities.
mixedAmountSetFullPrecision :: MixedAmount -> MixedAmount #
In each component amount, increase the display precision sufficiently to render it exactly (showing all significant decimal digits).
mixedAmountStripPrices :: MixedAmount -> MixedAmount #
Remove all prices from a MixedAmount.
journalPriceOracle :: Bool -> Journal -> PriceOracle #
Generate a price oracle (memoising price lookup function) from a journal's directive-declared and transaction-inferred market prices. For best performance, generate this only once per journal, reusing it across reports if there are more than one, as compoundBalanceCommand does. The boolean argument is whether to infer market prices from transactions or not.
amountPriceDirectiveFromCost :: Day -> Amount -> Maybe PriceDirective #
Make one or more MarketPrice
from an Amount
and its price directives.
mixedAmountToCost :: Map CommoditySymbol AmountStyle -> ConversionOp -> MixedAmount -> MixedAmount #
Convert all component amounts to cost/selling price if requested, and style them.
mixedAmountApplyValuation :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> Day -> ValuationType -> MixedAmount -> MixedAmount #
Apply a specified valuation to this mixed amount, using the provided price oracle, commodity styles, and reference dates. See amountApplyValuation.
mixedAmountValueAtDate :: PriceOracle -> Map CommoditySymbol AmountStyle -> Maybe CommoditySymbol -> Day -> MixedAmount -> MixedAmount #
Find the market value of each component amount in the given commodity, or its default valuation commodity, at the given valuation date, using the given market price oracle. When market prices available on that date are not sufficient to calculate the value, amounts are left unchanged.
mixedAmountApplyGain :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> Day -> ValuationType -> MixedAmount -> MixedAmount #
Calculate the gain of each component amount, that is the difference between the valued amount and the value of the cost basis (see mixedAmountApplyValuation).
If the commodity we are valuing in is not the same as the commodity of the cost, this will value the cost at the same date as the primary amount. This may not be what you want; for example you may want the cost valued at the posting date. If so, let us know and we can change this behaviour.
mixedAmountGainAtDate :: PriceOracle -> Map CommoditySymbol AmountStyle -> Maybe CommoditySymbol -> Day -> MixedAmount -> MixedAmount #
Calculate the gain of each component amount, that is the difference between the valued amount and the value of the cost basis.
If the commodity we are valuing in is not the same as the commodity of the cost, this will value the cost at the same date as the primary amount. This may not be what you want; for example you may want the cost valued at the posting date. If so, let us know and we can change this behaviour.
nullposting :: Posting #
post :: AccountName -> Amount -> Posting #
Make a posting to an account.
vpost :: AccountName -> Amount -> Posting #
Make a virtual (unbalanced) posting to an account.
post' :: AccountName -> Amount -> Maybe BalanceAssertion -> Posting #
Make a posting to an account, maybe with a balance assertion.
vpost' :: AccountName -> Amount -> Maybe BalanceAssertion -> Posting #
Make a virtual (unbalanced) posting to an account, maybe with a balance assertion.
nullsourcepos :: (SourcePos, SourcePos) #
balassert :: Amount -> Maybe BalanceAssertion #
Make a partial, exclusive balance assertion.
balassertTot :: Amount -> Maybe BalanceAssertion #
Make a total, exclusive balance assertion.
balassertParInc :: Amount -> Maybe BalanceAssertion #
Make a partial, inclusive balance assertion.
balassertTotInc :: Amount -> Maybe BalanceAssertion #
Make a total, inclusive balance assertion.
showBalanceAssertion :: BalanceAssertion -> WideBuilder #
Render a balance assertion, as the =[=][*] symbol and expected amount.
originalPosting :: Posting -> Posting #
showPosting :: Posting -> String #
showPostingLines :: Posting -> [Text] #
Render a posting, at the appropriate width for aligning with its siblings if any. Used by the rewrite command.
postingsAsLines :: Bool -> [Posting] -> [Text] #
Given a transaction and its postings, render the postings, suitable
for print
output. Normally this output will be valid journal syntax which
hledger can reparse (though it may include no-longer-valid balance assertions).
Explicit amounts are shown, any implicit amounts are not.
Postings with multicommodity explicit amounts are handled as follows: if onelineamounts is true, these amounts are shown on one line, comma-separated, and the output will not be valid journal syntax. Otherwise, they are shown as several similar postings, one per commodity. When the posting has a balance assertion, it is attached to the last of these postings.
The output will appear to be a balanced transaction. Amounts' display precisions, which may have been limited by commodity directives, will be increased if necessary to ensure this.
Posting amounts will be aligned with each other, starting about 4 columns beyond the widest account name (see postingAsLines for details).
postingAsLines :: Bool -> Bool -> Int -> Int -> Posting -> ([Text], Int, Int) #
Render one posting, on one or more lines, suitable for print
output.
There will be an indented account name, plus one or more of status flag,
posting amount, balance assertion, same-line comment, next-line comments.
If the posting's amount is implicit or if elideamount is true, no amount is shown.
If the posting's amount is explicit and multi-commodity, multiple similar postings are shown, one for each commodity, to help produce parseable journal syntax. Or if onelineamounts is true, such amounts are shown on one line, comma-separated (and the output will not be valid journal syntax).
If an amount is zero, any commodity symbol attached to it is shown (and the corresponding commodity display style is used).
By default, 4 spaces (2 if there's a status flag) are shown between account name and start of amount area, which is typically 12 chars wide and contains a right-aligned amount (so 10-12 visible spaces between account name and amount is typical). When given a list of postings to be aligned with, the whitespace will be increased if needed to match the posting with the longest account name. This is used to align the amounts of a transaction's postings.
Also returns the account width and amount width used.
showAccountName :: Maybe Int -> PostingType -> AccountName -> Text #
Show an account name, clipped to the given width if any, and appropriately bracketed/parenthesised for the given posting type.
renderCommentLines :: Text -> [Text] #
Render a transaction or posting's comment as indented, semicolon-prefixed comment lines. The first line (unless empty) will have leading space, subsequent lines will have a larger indent.
isBalancedVirtual :: Posting -> Bool #
hasBalanceAssignment :: Posting -> Bool #
accountNamesFromPostings :: [Posting] -> [AccountName] #
Sorted unique account names referenced by these postings.
sumPostings :: [Posting] -> MixedAmount #
Sum all amounts from a list of postings.
postingStripPrices :: Posting -> Posting #
Strip all prices from a Posting.
postingDate :: Posting -> Day #
Get a posting's (primary) date - it's own primary date if specified, otherwise the parent transaction's primary date, or the null date if there is no parent transaction.
postingDate2 :: Posting -> Day #
Get a posting's secondary (secondary) date, which is the first of: posting's secondary date, transaction's secondary date, posting's primary date, transaction's primary date, or the null date if there is no parent transaction.
postingDateOrDate2 :: WhichDate -> Posting -> Day #
Get a posting's primary or secondary date, as specified.
postingStatus :: Posting -> Status #
Get a posting's status. This is cleared or pending if those are explicitly set on the posting, otherwise the status of its parent transaction, or unmarked if there is no parent transaction. (Note the ambiguity, unmarked can mean "posting and transaction are both unmarked" or "posting is unmarked and don't know about the transaction".
postingAllTags :: Posting -> [Tag] #
Tags for this posting including any inherited from its parent transaction.
transactionAllTags :: Transaction -> [Tag] #
Tags for this transaction including any from its postings.
relatedPostings :: Posting -> [Posting] #
isPostingInDateSpan :: DateSpan -> Posting -> Bool #
Does this posting fall within the given date span ?
isPostingInDateSpan' :: WhichDate -> DateSpan -> Posting -> Bool #
isEmptyPosting :: Posting -> Bool #
postingApplyAliases :: [AccountAlias] -> Posting -> Either RegexError Posting #
Apply some account aliases to the posting's account name, as described by accountNameApplyAliases. This can fail due to a bad replacement pattern in a regular expression alias.
postingApplyCommodityStyles :: Map CommoditySymbol AmountStyle -> Posting -> Posting #
Find and apply the appropriate display style to the posting amounts in each commodity (see journalCommodityStyles). Main amount precisions may be set or not according to the styles, but cost precisions are not set.
postingApplyCommodityStylesExceptPrecision :: Map CommoditySymbol AmountStyle -> Posting -> Posting #
Like postingApplyCommodityStyles, but neither main amount precisions or cost precisions are set.
postingAddTags :: Posting -> [Tag] -> Posting #
Add tags to a posting, discarding any for which the posting already has a value.
postingApplyValuation :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> ValuationType -> Posting -> Posting #
Apply a specified valuation to this posting's amount, using the provided price oracle, commodity styles, and reference dates. See amountApplyValuation.
postingToCost :: ConversionOp -> Posting -> Maybe Posting #
Maybe convert this Posting
s amount to cost.
postingAddInferredEquityPostings :: Bool -> Text -> Posting -> [Posting] #
Generate inferred equity postings from a Posting
using transaction prices.
Make sure not to generate equity postings when there are already matched
conversion postings.
postingPriceDirectivesFromCost :: Posting -> [PriceDirective] #
Make a market price equivalent to this posting's amount's unit price, if any.
postingTransformAmount :: (MixedAmount -> MixedAmount) -> Posting -> Posting #
Apply a transform function to this posting's amount.
commentJoin :: Text -> Text -> Text #
Join two parts of a comment, eg a tag and another tag, or a tag and a non-tag, on a single line. Interpolates a comma and space unless one of the parts is empty.
commentAddTag :: Text -> Tag -> Text #
Add a tag to a comment, comma-separated from any prior content. A space is inserted following the colon, before the value.
commentAddTagNextLine :: Text -> Tag -> Text #
Add a tag on its own line to a comment, preserving any prior content. A space is inserted following the colon, before the value.
transaction :: Day -> [Posting] -> Transaction #
Make a simple transaction with the given date and postings.
transactionPayee :: Transaction -> Text #
transactionNote :: Transaction -> Text #
showTransaction :: Transaction -> Text #
Render a journal transaction as text similar to the style of Ledger's print command.
Adapted from Ledger 2.x and 3.x standard format:
yyyy-mm-dd[ *][ CODE] description......... [ ; comment...............] account name 1..................... ...$amount1[ ; comment...............] account name 2..................... ..$-amount1[ ; comment...............] pcodewidth = no limit -- 10 -- mimicking ledger layout. pdescwidth = no limit -- 20 -- I don't remember what these mean, pacctwidth = 35 minimum, no maximum -- they were important at the time. pamtwidth = 11 pcommentwidth = no limit -- 22
The output will be parseable journal syntax. To facilitate this, postings with explicit multi-commodity amounts are displayed as multiple similar postings, one per commodity. (Normally does not happen with this function).
showTransactionOneLineAmounts :: Transaction -> Text #
Like showTransaction, but explicit multi-commodity amounts are shown on one line, comma-separated. In this case the output will not be parseable journal syntax.
hasRealPostings :: Transaction -> Bool #
realPostings :: Transaction -> [Posting] #
assignmentPostings :: Transaction -> [Posting] #
virtualPostings :: Transaction -> [Posting] #
balancedVirtualPostings :: Transaction -> [Posting] #
transactionsPostings :: [Transaction] -> [Posting] #
transactionDate2 :: Transaction -> Day #
transactionDateOrDate2 :: WhichDate -> Transaction -> Day #
txnTieKnot :: Transaction -> Transaction #
Ensure a transaction's postings refer back to it, so that eg relatedPostings works right.
txnUntieKnot :: Transaction -> Transaction #
Ensure a transaction's postings do not refer back to it, so that eg recursiveSize and GHCI's :sprint work right.
transactionTransformPostings :: (Posting -> Posting) -> Transaction -> Transaction #
Apply a transform function to this transaction's amounts.
transactionApplyValuation :: PriceOracle -> Map CommoditySymbol AmountStyle -> Day -> Day -> ValuationType -> Transaction -> Transaction #
Apply a specified valuation to this transaction's amounts, using the provided price oracle, commodity styles, and reference dates. See amountApplyValuation.
transactionToCost :: ConversionOp -> Transaction -> Transaction #
Maybe convert this Transaction
s amounts to cost.
transactionAddInferredEquityPostings :: Bool -> AccountName -> Transaction -> Transaction #
Add inferred equity postings to a Transaction
using transaction prices.
transactionInferCostsFromEquity :: Bool -> Map AccountName AccountType -> Transaction -> Either String Transaction #
Add costs inferred from equity postings in this transaction. For every adjacent pair of conversion postings, it will first search the postings with costs to see if any match. If so, it will tag these as matched. If no postings with costs match, it will then search the postings without costs, and will match the first such posting which matches one of the conversion amounts. If it finds a match, it will add a cost and then tag it. If the first argument is true, do a dry run instead: identify and tag the costful and conversion postings, but don't add costs.
partitionAndCheckConversionPostings :: Bool -> Map AccountName AccountType -> [IdxPosting] -> Either Text ([(IdxPosting, IdxPosting)], ([IdxPosting], [IdxPosting])) #
transactionApplyAliases :: [AccountAlias] -> Transaction -> Either RegexError Transaction #
Apply some account aliases to all posting account names in the transaction, as described by accountNameApplyAliases. This can fail due to a bad replacement pattern in a regular expression alias.
transactionMapPostings :: (Posting -> Posting) -> Transaction -> Transaction #
Apply a transformation to a transaction's postings.
transactionMapPostingAmounts :: (MixedAmount -> MixedAmount) -> Transaction -> Transaction #
Apply a transformation to a transaction's posting amounts.
transactionFile :: Transaction -> FilePath #
The file path from which this transaction was parsed.
annotateErrorWithTransaction :: Transaction -> String -> String #
generatedTransactionTag :: Query #
Construct a generated-transaction tag
parseQuery :: Day -> Text -> Either String (Query, [QueryOpt]) #
A version of parseQueryList which acts on a single Text of space-separated terms.
The usual shell quoting rules are assumed. When a pattern contains whitespace, it (or the whole term including prefix) should be enclosed in single or double quotes.
A query term is either:
a search pattern, which matches on one or more fields, eg:
acct:REGEXP - match the account name with a regular expression desc:REGEXP - match the transaction description date:PERIODEXP - match the date with a period expression
The prefix indicates the field to match, or if there is no prefix account name is assumed.
a query option, which modifies the reporting behaviour in some way. There is currently one of these, which may appear only once:
inacct:FULLACCTNAME
Period expressions may contain relative dates, so a reference date is required to fully parse these.
>>>
parseQuery nulldate "expenses:dining out"
Right (Or [Acct (RegexpCI "expenses:dining"),Acct (RegexpCI "out")],[])
>>>
parseQuery nulldate "\"expenses:dining out\""
Right (Acct (RegexpCI "expenses:dining out"),[])
parseQueryList :: Day -> [Text] -> Either String (Query, [QueryOpt]) #
Convert a list of space-separated queries to a single query
Multiple terms are combined as follows: 1. multiple account patterns are OR'd together 2. multiple description patterns are OR'd together 3. multiple status patterns are OR'd together 4. then all terms are AND'd together
words'' :: [Text] -> Text -> [Text] #
Quote-and-prefix-aware version of words - don't split on spaces which are inside quotes, including quotes which may have one of the specified prefixes in front, and maybe an additional not: prefix in front of that.
queryprefixes :: [Text] #
parseQueryTerm :: Day -> Text -> Either String (Query, [QueryOpt]) #
Parse a single query term as either a query or a query option, or return an error message if parsing fails.
parseAccountType :: Bool -> Text -> Either String AccountType #
Case-insensitively parse one single-letter code, or one long-form word if permitted, to an account type. On failure, returns the unparseable text.
simplifyQuery :: Query -> Query #
filterQuery :: (Query -> Bool) -> Query -> Query #
Remove query terms (or whole sub-expressions) from this query which do not match the given predicate. XXX Semantics not completely clear. Also calls simplifyQuery on the result.
filterQueryOrNotQuery :: (Query -> Bool) -> Query -> Query #
Remove query terms (or whole sub-expressions) from this query which match neither the given predicate nor that predicate negated (eg, if predicate is queryIsAcct, this will keep both "acct:" and "not:acct:" terms). Also calls simplifyQuery on the result. (Since 1.24.1, might be merged into filterQuery in future.) XXX Semantics not completely clear.
matchesQuery :: (Query -> Bool) -> Query -> Bool #
Does this simple query predicate match any part of this possibly compound query ?
queryIsNull :: Query -> Bool #
Does this query match everything ?
queryIsDate :: Query -> Bool #
Is this a simple query of this type (date:) ? Does not match a compound query involving andornot. Likewise for the following functions.
queryIsDate2 :: Query -> Bool #
queryIsDateOrDate2 :: Query -> Bool #
queryIsStatus :: Query -> Bool #
queryIsCode :: Query -> Bool #
queryIsDesc :: Query -> Bool #
queryIsTag :: Query -> Bool #
queryIsAcct :: Query -> Bool #
queryIsType :: Query -> Bool #
queryIsDepth :: Query -> Bool #
queryIsReal :: Query -> Bool #
queryIsAmt :: Query -> Bool #
queryIsSym :: Query -> Bool #
queryIsStartDateOnly :: Bool -> Query -> Bool #
Does this query specify a start date and nothing else (that would filter postings prior to the date) ? When the flag is true, look for a starting secondary date instead.
queryIsTransactionRelated :: Query -> Bool #
Does this query involve a property of transactions (or their postings), making it inapplicable to account declarations ?
queryStartDate :: Bool -> Query -> Maybe Day #
What start date (or secondary date) does this query specify, if any ? For OR expressions, use the earliest of the dates. NOT is ignored.
queryEndDate :: Bool -> Query -> Maybe Day #
What end date (or secondary date) does this query specify, if any ? For OR expressions, use the latest of the dates. NOT is ignored.
queryDateSpan :: Bool -> Query -> DateSpan #
What date span (or with a true argument, what secondary date span) does this query specify ? OR clauses specifying multiple spans return their union (the span enclosing all of them). AND clauses specifying multiple spans return their intersection. NOT clauses are ignored.
queryDateSpan' :: Query -> DateSpan #
What date span does this query specify, treating primary and secondary dates as equivalent ? OR clauses specifying multiple spans return their union (the span enclosing all of them). AND clauses specifying multiple spans return their intersection. NOT clauses are ignored.
queryDepth :: Query -> Maybe Int #
The depth limit this query specifies, if it has one
inAccount :: [QueryOpt] -> Maybe (AccountName, Bool) #
The account we are currently focussed on, if any, and whether subaccounts are included. Just looks at the first query option.
inAccountQuery :: [QueryOpt] -> Maybe Query #
A query for the account(s) we are currently focussed on, if any. Just looks at the first query option.
matchesCommodity :: Query -> CommoditySymbol -> Bool #
matchesAmount :: Query -> Amount -> Bool #
Does the match expression match this (simple) amount ?
matchesMixedAmount :: Query -> MixedAmount -> Bool #
matchesAccount :: Query -> AccountName -> Bool #
Does the query match this account name ? A matching in: clause is also considered a match.
matchesAccountExtra :: (AccountName -> Maybe AccountType) -> (AccountName -> [Tag]) -> Query -> AccountName -> Bool #
Like matchesAccount, but with optional extra matching features:
- If the account's type is provided, any type: terms in the query must match it (and any negated type: terms must not match it).
- If the account's tags are provided, any tag: terms must match at least one of them (and any negated tag: terms must match none).
matchesPosting :: Query -> Posting -> Bool #
Does the match expression match this posting ? When matching account name, and the posting has been transformed in some way, we will match either the original or transformed name.
matchesPostingExtra :: (AccountName -> Maybe AccountType) -> Query -> Posting -> Bool #
Like matchesPosting, but if the posting's account's type is provided, any type: terms in the query must match it (and any negated type: terms must not match it).
matchesTransaction :: Query -> Transaction -> Bool #
Does the match expression match this transaction ?
matchesTransactionExtra :: (AccountName -> Maybe AccountType) -> Query -> Transaction -> Bool #
Like matchesTransaction, but if the journal's account types are provided, any type: terms in the query must match at least one posting's account type (and any negated type: terms must match none).
matchesDescription :: Query -> Text -> Bool #
Does the query match this transaction description ? Tests desc: terms, any other terms are ignored.
matchesPayeeWIP :: Query -> Payee -> Bool #
Does the query match this transaction payee ? Tests desc: (and payee: ?) terms, any other terms are ignored. XXX Currently an alias for matchDescription. I'm not sure if more is needed, There's some shenanigan with payee: and "payeeTag" to figure out.
matchesTags :: Regexp -> Maybe Regexp -> [Tag] -> Bool #
Does the query match the name and optionally the value of any of these tags ?
matchesPriceDirective :: Query -> PriceDirective -> Bool #
Does the query match this market price ?
tests_Query :: TestTree #
modifyTransactions :: (AccountName -> Maybe AccountType) -> (AccountName -> [Tag]) -> Map CommoditySymbol AmountStyle -> Day -> Bool -> [TransactionModifier] -> [Transaction] -> Either String [Transaction] #
Apply all the given transaction modifiers, in turn, to each transaction. Or if any of them fails to be parsed, return the first error. A reference date is provided to help interpret relative dates in transaction modifier queries.
timeclockEntriesToTransactions :: LocalTime -> [TimeclockEntry] -> [Transaction] #
Convert time log entries to journal transactions. When there is no clockout, add one with the provided current time. Sessions crossing midnight are split into days to give accurate per-day totals.
makeAccountTagErrorExcerpt :: (AccountName, AccountDeclarationInfo) -> TagName -> (FilePath, Int, Maybe (Int, Maybe Int), Text) #
Given an account name and its account directive, and a problem tag within the latter: render it as a megaparsec-style excerpt, showing the original line number and marked column or region. Returns the file path, line number, column(s) if known, and the rendered excerpt, or as much of these as is possible. The returned columns will be accurate for the rendered error message but not for the original journal data.
makeTransactionErrorExcerpt :: Transaction -> (Transaction -> Maybe (Int, Maybe Int)) -> (FilePath, Int, Maybe (Int, Maybe Int), Text) #
Given a problem transaction and a function calculating the best column(s) for marking the error region: render it as a megaparsec-style excerpt, showing the original line number on the transaction line, and a column(s) marker. Returns the file path, line number, column(s) if known, and the rendered excerpt, or as much of these as is possible. The returned columns will be accurate for the rendered error message but not for the original journal data.
makePostingErrorExcerpt :: Posting -> (Posting -> Transaction -> Text -> Maybe (Int, Maybe Int)) -> (FilePath, Int, Maybe (Int, Maybe Int), Text) #
Given a problem posting and a function calculating the best column(s) for marking the error region: look up error info from the parent transaction, and render the transaction as a megaparsec-style excerpt, showing the original line number on the problem posting's line, and a column indicator. Returns the file path, line number, column(s) if known, and the rendered excerpt, or as much of these as is possible. A limitation: columns will be accurate for the rendered error message but not for the original journal data.
transactionFindPostingIndex :: (Posting -> Bool) -> Transaction -> Maybe Int #
Find the 1-based index of the first posting in this transaction satisfying the given predicate.
makePostingAccountErrorExcerpt :: Posting -> (FilePath, Int, Maybe (Int, Maybe Int), Text) #
From the given posting, make an error excerpt showing the transaction with this posting's account part highlighted.
makeBalanceAssertionErrorExcerpt :: Posting -> (FilePath, Int, Maybe (Int, Maybe Int), Text) #
From the given posting, make an error excerpt showing the transaction with the balance assertion highlighted.
runPeriodicTransaction :: Bool -> PeriodicTransaction -> DateSpan -> [Transaction] #
Generate transactions from PeriodicTransaction
within a DateSpan
.
This should be a closed span with both start and end dates specified;
an open ended span will generate no transactions.
Note that new transactions require txnTieKnot
post-processing.
The new transactions will have three tags added:
- a recur:PERIODICEXPR tag whose value is the generating periodic expression
- a generated-transaction: tag
- a hidden _generated-transaction: tag which does not appear in the comment.
>>>
import Data.Time (fromGregorian)
>>>
_ptgen "monthly from 2017/1 to 2017/4"
2017-01-01 ; generated-transaction: ~ monthly from 2017/1 to 2017/4 a $1.00 2017-02-01 ; generated-transaction: ~ monthly from 2017/1 to 2017/4 a $1.00 2017-03-01 ; generated-transaction: ~ monthly from 2017/1 to 2017/4 a $1.00
>>>
_ptgen "monthly from 2017/1 to 2017/5"
2017-01-01 ; generated-transaction: ~ monthly from 2017/1 to 2017/5 a $1.00 2017-02-01 ; generated-transaction: ~ monthly from 2017/1 to 2017/5 a $1.00 2017-03-01 ; generated-transaction: ~ monthly from 2017/1 to 2017/5 a $1.00 2017-04-01 ; generated-transaction: ~ monthly from 2017/1 to 2017/5 a $1.00
>>>
_ptgen "every 2nd day of month from 2017/02 to 2017/04"
2017-01-02 ; generated-transaction: ~ every 2nd day of month from 2017/02 to 2017/04 a $1.00 2017-02-02 ; generated-transaction: ~ every 2nd day of month from 2017/02 to 2017/04 a $1.00 2017-03-02 ; generated-transaction: ~ every 2nd day of month from 2017/02 to 2017/04 a $1.00
>>>
_ptgen "every 30th day of month from 2017/1 to 2017/5"
2016-12-30 ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 a $1.00 2017-01-30 ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 a $1.00 2017-02-28 ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 a $1.00 2017-03-30 ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 a $1.00 2017-04-30 ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 a $1.00
>>>
_ptgen "every 2nd Thursday of month from 2017/1 to 2017/4"
2016-12-08 ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 a $1.00 2017-01-12 ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 a $1.00 2017-02-09 ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 a $1.00 2017-03-09 ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 a $1.00
>>>
_ptgen "every nov 29th from 2017 to 2019"
2016-11-29 ; generated-transaction: ~ every nov 29th from 2017 to 2019 a $1.00 2017-11-29 ; generated-transaction: ~ every nov 29th from 2017 to 2019 a $1.00 2018-11-29 ; generated-transaction: ~ every nov 29th from 2017 to 2019 a $1.00
>>>
_ptgen "2017/1"
2017-01-01 ; generated-transaction: ~ 2017/1 a $1.00
>>>
let reportperiod="daily from 2018/01/03" in let (i,s) = parsePeriodExpr' nulldate reportperiod in runPeriodicTransaction True (nullperiodictransaction{ptperiodexpr=reportperiod, ptspan=s, ptinterval=i, ptpostings=["a" `post` usd 1]}) (DateSpan (Just $ Flex $ fromGregorian 2018 01 01) (Just $ Flex $ fromGregorian 2018 01 03))
[]
>>>
_ptgenspan "every 3 months from 2019-05" (DateSpan (Just $ Flex $ fromGregorian 2020 01 01) (Just $ Flex $ fromGregorian 2020 02 01))
>>>
_ptgenspan "every 3 months from 2019-05" (DateSpan (Just $ Flex $ fromGregorian 2020 02 01) (Just $ Flex $ fromGregorian 2020 03 01))
2020-02-01 ; generated-transaction: ~ every 3 months from 2019-05 a $1.00>>>
_ptgenspan "every 3 days from 2018" (DateSpan (Just $ Flex $ fromGregorian 2018 01 01) (Just $ Flex $ fromGregorian 2018 01 05))
2018-01-01 ; generated-transaction: ~ every 3 days from 2018 a $1.00 2018-01-04 ; generated-transaction: ~ every 3 days from 2018 a $1.00>>>
_ptgenspan "every 3 days from 2018" (DateSpan (Just $ Flex $ fromGregorian 2018 01 02) (Just $ Flex $ fromGregorian 2018 01 05))
2018-01-04 ; generated-transaction: ~ every 3 days from 2018 a $1.00
checkPeriodicTransactionStartDate :: Interval -> DateSpan -> Text -> Maybe String #
Check that this date span begins at a boundary of this interval, or return an explanatory error message including the provided period expression (from which the span and interval are derived).
toJsonText :: ToJSON a => a -> Text #
Show a JSON-convertible haskell value as pretty-printed JSON text.
writeJsonFile :: ToJSON a => FilePath -> a -> IO () #
Write a JSON-convertible haskell value to a pretty-printed JSON file. Eg: writeJsonFile "a.json" nulltransaction
readJsonFile :: FromJSON a => FilePath -> IO a #
Read a JSON file and decode it to the target type, or raise an error if we can't. Eg: readJsonFile "a.json" :: IO Transaction
journalConcat :: Journal -> Journal -> Journal #
Merge two journals into one. Transaction counts are summed, map fields are combined, the second's list fields are appended to the first's, the second's parse state is kept.
journalRenumberAccountDeclarations :: Journal -> Journal #
Renumber all the account declarations. This is useful to call when finalising or concatenating Journals, to give account declarations a total order across files.
dbgJournalAcctDeclOrder :: String -> Journal -> Journal #
Debug log the ordering of a journal's account declarations (at debug level 5+).
nulljournal :: Journal #
journalFilePath :: Journal -> FilePath #
journalFilePaths :: Journal -> [FilePath] #
addTransaction :: Transaction -> Journal -> Journal #
addPriceDirective :: PriceDirective -> Journal -> Journal #
journalTransactionAt :: Journal -> Integer -> Maybe Transaction #
Get the transaction with this index (its 1-based position in the input stream), if any.
journalNextTransaction :: Journal -> Transaction -> Maybe Transaction #
Get the transaction that appeared immediately after this one in the input stream, if any.
journalPrevTransaction :: Journal -> Transaction -> Maybe Transaction #
Get the transaction that appeared immediately before this one in the input stream, if any.
journalPostings :: Journal -> [Posting] #
All postings from this journal's transactions, in order.
journalCommoditiesDeclared :: Journal -> [CommoditySymbol] #
Sorted unique commodity symbols declared by commodity directives in this journal.
journalCommodities :: Journal -> Set CommoditySymbol #
Sorted unique commodity symbols declared or inferred from this journal.
journalDescriptions :: Journal -> [Text] #
Unique transaction descriptions used in this journal.
journalPayeesDeclared :: Journal -> [Payee] #
Sorted unique payees declared by payee directives in this journal.
journalPayeesUsed :: Journal -> [Payee] #
Sorted unique payees used by transactions in this journal.
journalPayeesDeclaredOrUsed :: Journal -> [Payee] #
Sorted unique payees used in transactions or declared by payee directives in this journal.
journalTagsDeclared :: Journal -> [TagName] #
Sorted unique tag names declared by tag directives in this journal.
journalTagsUsed :: Journal -> [TagName] #
Sorted unique tag names used in this journal (in account directives, transactions, postings..)
journalTagsDeclaredOrUsed :: Journal -> [TagName] #
Sorted unique tag names used in transactions or declared by tag directives in this journal.
journalAccountNamesUsed :: Journal -> [AccountName] #
Sorted unique account names posted to by this journal's transactions.
journalAccountNamesImplied :: Journal -> [AccountName] #
Sorted unique account names implied by this journal's transactions - accounts posted to and all their implied parent accounts.
journalAccountNamesDeclared :: Journal -> [AccountName] #
Sorted unique account names declared by account directives in this journal.
journalLeafAccountNamesDeclared :: Journal -> [AccountName] #
Sorted unique account names declared by account directives in this journal, which have no children.
journalAccountNamesDeclaredOrUsed :: Journal -> [AccountName] #
Sorted unique account names declared by account directives or posted to by transactions in this journal.
journalAccountNamesDeclaredOrImplied :: Journal -> [AccountName] #
Sorted unique account names declared by account directives, or posted to or implied as parents by transactions in this journal.
journalAccountNames :: Journal -> [AccountName] #
Convenience/compatibility alias for journalAccountNamesDeclaredOrImplied.
journalLeafAccountNames :: Journal -> [AccountName] #
Sorted unique account names declared or implied in this journal which have no children.
journalAccountNameTree :: Journal -> Tree AccountName #
journalAccountTags :: Journal -> AccountName -> [Tag] #
Which tags have been declared explicitly for this account, if any ?
journalInheritedAccountTags :: Journal -> AccountName -> [Tag] #
Which tags are in effect for this account, including tags inherited from parent accounts ?
journalTransactionsSimilarTo :: Journal -> Text -> Query -> SimilarityScore -> Int -> [(DateWeightedSimilarityScore, Age, SimilarityScore, Transaction)] #
Find up to N most similar and most recent transactions matching the given transaction description and query and exceeding the given description similarity score (0 to 1, see compareDescriptions). Returns transactions along with their age in days compared to the latest transaction date, their description similarity score, and a heuristically date-weighted variant of this that favours more recent transactions.
journalConversionAccount :: Journal -> AccountName #
The AccountName
to use for automatically generated conversion postings.
journalAccountType :: Journal -> AccountName -> Maybe AccountType #
journalAddAccountTypes :: Journal -> Journal #
Add a map of all known account types to the journal.
journalAccountTypes :: Journal -> Map AccountName AccountType #
Build a map of all known account types, explicitly declared or inferred from the account's parent or name.
journalPostingsAddAccountTags :: Journal -> Journal #
To all postings in the journal, add any tags from their account (including those inherited from parent accounts). If the same tag exists on posting and account, the latter is ignored.
filterJournalTransactions :: Query -> Journal -> Journal #
Keep only transactions matching the query expression.
filterJournalPostings :: Query -> Journal -> Journal #
Keep only postings matching the query expression. This can leave unbalanced transactions.
filterJournalRelatedPostings :: Query -> Journal -> Journal #
Keep only postings which do not match the query expression, but for which a related posting does. This can leave unbalanced transactions.
filterJournalAmounts :: Query -> Journal -> Journal #
Within each posting's amount, keep only the parts matching the query, and remove any postings with all amounts removed. This can leave unbalanced transactions.
filterTransactionAmounts :: Query -> Transaction -> Transaction #
Filter out all parts of this transaction's amounts which do not match the query, and remove any postings with all amounts removed. This can leave the transaction unbalanced.
filterPostingAmount :: Query -> Posting -> Maybe Posting #
Filter out all parts of this posting's amount which do not match the query, and remove the posting if this removes all amounts.
filterTransactionPostingsExtra :: (AccountName -> Maybe AccountType) -> Query -> Transaction -> Transaction #
journalMapTransactions :: (Transaction -> Transaction) -> Journal -> Journal #
Apply a transformation to a journal's transactions.
journalMapPostings :: (Posting -> Posting) -> Journal -> Journal #
Apply a transformation to a journal's postings.
journalMapPostingAmounts :: (MixedAmount -> MixedAmount) -> Journal -> Journal #
Apply a transformation to a journal's posting amounts.
journalReverse :: Journal -> Journal #
Reverse all lists of parsed items, which during parsing were prepended to, so that the items are in parse order. Part of post-parse finalisation.
journalSetLastReadTime :: POSIXTime -> Journal -> Journal #
Set this journal's last read time, ie when its files were last read.
journalNumberTransactions :: Journal -> Journal #
Number (set the tindex field) this journal's transactions, counting upward from 1.
journalUntieTransactions :: Transaction -> Transaction #
Untie all transaction-posting knots in this journal, so that eg recursiveSize and GHCI's :sprint can work on it.
journalModifyTransactions :: Bool -> Day -> Journal -> Either String Journal #
Apply any transaction modifier rules in the journal (adding automated postings to transactions, eg). Or if a modifier rule fails to parse, return the error message. A reference date is provided to help interpret relative dates in transaction modifier queries. The first argument selects whether to add visible tags to generated postings & modified transactions.
journalApplyCommodityStyles :: Journal -> Either String Journal #
Choose and apply a consistent display style to the posting amounts in each commodity (see journalCommodityStyles), keeping all display precisions unchanged. Can return an error message eg if inconsistent number formats are found.
journalCommodityStyles :: Journal -> Map CommoditySymbol AmountStyle #
Get the canonical amount styles for this journal, whether (in order of precedence): set globally in InputOpts, declared by commodity directives, declared by a default commodity (D) directive, or inferred from posting amounts, as a map from symbol to style. Styles from directives are assumed to specify the decimal mark.
commodityStylesFromAmounts :: [Amount] -> Either String (Map CommoditySymbol AmountStyle) #
Given a list of amounts, in parse order (roughly speaking; see journalStyleInfluencingAmounts), build a map from their commodity names to standard commodity display formats. Can return an error message eg if inconsistent number formats are found.
Though, these amounts may have come from multiple files, so we shouldn't assume they use consistent number formats. Currently we don't enforce that even within a single file, and this function never reports an error.
canonicalStyleFrom :: [AmountStyle] -> AmountStyle #
Given a list of amount styles (assumed to be from parsed amounts in a single commodity), in parse order, choose a canonical style.
journalInferMarketPricesFromTransactions :: Journal -> Journal #
Infer transaction-implied market prices from commodity-exchanging transactions, if any. It's best to call this after transactions have been balanced and posting amounts have appropriate prices attached.
journalToCost :: ConversionOp -> Journal -> Journal #
Convert all this journal's amounts to cost using their attached prices, if any.
journalInferEquityFromCosts :: Bool -> Journal -> Journal #
Add equity postings inferred from costs, where needed and possible. See hledger manual > Cost reporting.
journalInferCostsFromEquity :: Journal -> Either String Journal #
Add costs inferred from equity conversion postings, where needed and possible. See hledger manual > Cost reporting.
journalMarkRedundantCosts :: Journal -> Either String Journal #
Do just the internal tagging that is normally done by journalInferCostsFromEquity, identifying equity conversion postings and, in particular, postings which have redundant costs. Tagging the latter is useful as it allows them to be ignored during transaction balancedness checking. And that allows journalInferCostsFromEquity to be postponed till after transaction balancing, when it will have more information (amounts) to work with.
journalDateSpan :: Bool -> Journal -> DateSpan #
The fully specified exact date span enclosing the dates (primary or secondary) of all this journal's transactions and postings, or DateSpan Nothing Nothing if there are none.
journalDateSpanBothDates :: Journal -> DateSpan #
The fully specified date span enclosing the dates (primary and secondary) of all this journal's transactions and postings, or DateSpan Nothing Nothing if there are none.
journalStartDate :: Bool -> Journal -> Maybe Day #
The earliest of this journal's transaction and posting dates, or Nothing if there are none.
journalEndDate :: Bool -> Journal -> Maybe Day #
The "exclusive end date" of this journal: the day following its latest transaction or posting date, or Nothing if there are none.
journalLastDay :: Bool -> Journal -> Maybe Day #
The latest of this journal's transaction and posting dates, or Nothing if there are none.
journalPivot :: Text -> Journal -> Journal #
Apply the pivot transformation to all postings in a journal, replacing their account name by their value for the given field or tag.
journalApplyAliases :: [AccountAlias] -> Journal -> Either RegexError Journal #
Apply some account aliases to all posting account names in the journal, as described by accountNameApplyAliases. This can fail due to a bad replacement pattern in a regular expression alias.
samplejournalMaybeExplicit :: Bool -> Journal #
journalCheckUniqueleafnames :: Journal -> Either String () #
Check that all the journal's postings are to accounts with a unique leaf name. Otherwise, return an error message for the first offending posting.
journalCheckAccounts :: Journal -> Either String () #
Check that all the journal's postings are to accounts with account directives, returning an error message otherwise.
journalCheckCommodities :: Journal -> Either String () #
Check that all the commodities used in this journal's postings have been declared by commodity directives, returning an error message otherwise.
journalCheckPayees :: Journal -> Either String () #
Check that all the journal's transactions have payees declared with payee directives, returning an error message otherwise.
journalCheckTags :: Journal -> Either String () #
Check that all the journal's tags (on accounts, transactions, postings..) have been declared with tag directives, returning an error message otherwise.
journalCheckPairedConversionPostings :: Journal -> Either String () #
In each tranaction, check that any conversion postings occur in adjacent pairs.
journalCheckRecentAssertions :: Day -> Journal -> Either String () #
Check that accounts with balance assertions have no posting more than maxlag days after their latest balance assertion. Today's date is provided for error messages.
isTransactionBalanced :: BalancingOpts -> Transaction -> Bool #
Legacy form of transactionCheckBalanced.
balanceTransaction :: BalancingOpts -> Transaction -> Either String Transaction #
Balance this transaction, ensuring that its postings (and its balanced virtual postings) sum to 0, by inferring a missing amount or conversion price(s) if needed. Or if balancing is not possible, because the amounts don't sum to 0 or because there's more than one missing amount, return an error message.
Transactions with balance assignments can have more than one missing amount; to balance those you should use the more powerful journalBalanceTransactions.
The "sum to 0" test is done using commodity display precisions, if provided, so that the result agrees with the numbers users can see.
balanceTransactionHelper :: BalancingOpts -> Transaction -> Either String (Transaction, [(AccountName, MixedAmount)]) #
Helper used by balanceTransaction and balanceTransactionWithBalanceAssignmentAndCheckAssertionsB; use one of those instead. It also returns a list of accounts and amounts that were inferred.
journalCheckBalanceAssertions :: Journal -> Maybe String #
Check any balance assertions in the journal and return an error message if any of them fail (or if the transaction balancing they require fails).
journalBalanceTransactions :: BalancingOpts -> Journal -> Either String Journal #
Infer any missing amounts and/or conversion costs (as needed to balance transactions and satisfy balance assignments); and check that all transactions are balanced; and (optional) check that all balance assertions pass. Or, return an error message (just the first error encountered).
Assumes journalInferCommodityStyles has been called, since those affect transaction balancing.
This does multiple things at once because amount inferring, balance assignments, balance assertions and posting dates are interdependent.
forecastPeriod :: InputOpts -> Journal -> Maybe DateSpan #
Get the Maybe the DateSpan to generate forecast options from. This begins on: - the start date supplied to the `--forecast` argument, if present - otherwise, the later of - the report start date if specified with -b-pdate: - the day after the latest normal (non-periodic) transaction in the journal, if any - otherwise today. It ends on: - the end date supplied to the `--forecast` argument, if present - otherwise the report end date if specified with -e-pdate: - otherwise 180 days (6 months) from today.
accountsFromPostings :: [Posting] -> [Account] #
Derive 1. an account tree and 2. each account's total exclusive and inclusive changes from a list of postings. This is the core of the balance command (and of *ledger). The accounts are returned as a list in flattened tree order, and also reference each other as a tree. (The first account is the root of the tree.)
accountTree :: AccountName -> [AccountName] -> Account #
Convert a list of account names to a tree of Account objects, with just the account names filled in. A single root account with the given name is added.
parentAccounts :: Account -> [Account] #
Get this account's parent accounts, from the nearest up to the root.
accountsLevels :: Account -> [[Account]] #
List the accounts at each level of the account tree.
mapAccounts :: (Account -> Account) -> Account -> Account #
Map a (non-tree-structure-modifying) function over this and sub accounts.
anyAccounts :: (Account -> Bool) -> Account -> Bool #
Is the predicate true on any of this account or its subaccounts ?
sumAccounts :: Account -> Account #
Add subaccount-inclusive balances to an account tree.
clipAccounts :: Int -> Account -> Account #
Remove all subaccounts below a certain depth.
clipAccountsAndAggregate :: Maybe Int -> [Account] -> [Account] #
Remove subaccounts below the specified depth, aggregating their balance at the depth limit (accounts at the depth limit will have any sub-balances merged into their exclusive balance). If the depth is Nothing, return the original accounts
pruneAccounts :: (Account -> Bool) -> Account -> Maybe Account #
Remove all leaf accounts and subtrees matching a predicate.
flattenAccounts :: Account -> [Account] #
Flatten an account tree into a list, which is sometimes convenient. Note since accounts link to their parents/subs, the tree's structure remains intact and can still be used. It's a tree/list!
filterAccounts :: (Account -> Bool) -> Account -> [Account] #
Filter an account tree (to a list).
sortAccountTreeByAmount :: NormalSign -> Account -> Account #
Sort each group of siblings in an account tree by inclusive amount, so that the accounts with largest normal balances are listed first. The provided normal balance sign determines whether normal balances are negative or positive, affecting the sort order. Ie, if balances are normally negative, then the most negative balances sort first, and vice versa.
accountSetDeclarationInfo :: Journal -> Account -> Account #
Add extra info for this account derived from the Journal's account directives, if any (comment, tags, declaration order..).
sortAccountNamesByDeclaration :: Journal -> Bool -> [AccountName] -> [AccountName] #
Sort account names by the order in which they were declared in the journal, at each level of the account tree (ie within each group of siblings). Undeclared accounts are sorted last and alphabetically. This is hledger's default sort for reports organised by account. The account list is converted to a tree temporarily, adding any missing parents; these can be kept (suitable for a tree-mode report) or removed (suitable for a flat-mode report).
lookupAccount :: AccountName -> [Account] -> Maybe Account #
Search an account list by name.
printAccounts :: Account -> IO () #
showAccounts :: Account -> String #
showAccountsBoringFlag :: Account -> String #
nullledger :: Ledger #
ledgerFromJournal :: Query -> Journal -> Ledger #
Filter a journal's transactions with the given query, then build a Ledger, containing the journal plus the tree of all its accounts with their subaccount-inclusive and subaccount-exclusive balances. If the query includes a depth limit, the ledger's journal will be depth limited, but the ledger's account tree will not.
ledgerAccountNames :: Ledger -> [AccountName] #
List a ledger's account names.
ledgerAccount :: Ledger -> AccountName -> Maybe Account #
Get the named account from a ledger.
ledgerRootAccount :: Ledger -> Account #
Get this ledger's root account, which is a dummy "root" account above all others. This should always be first in the account list, if somehow not this returns a null account.
ledgerTopAccounts :: Ledger -> [Account] #
List a ledger's top-level accounts (the ones below the root), in tree order.
ledgerLeafAccounts :: Ledger -> [Account] #
List a ledger's bottom-level (subaccount-less) accounts, in tree order.
ledgerPostings :: Ledger -> [Posting] #
List a ledger's postings, in the order parsed.
ledgerDateSpan :: Ledger -> DateSpan #
The (fully specified) date span containing all the ledger's (filtered) transactions, or DateSpan Nothing Nothing if there are none.
ledgerCommodities :: Ledger -> [CommoditySymbol] #
All commodities used in this ledger.
tests_Data :: TestTree #
rawOptsToReportOpts :: Day -> RawOpts -> ReportOpts #
Generate a ReportOpts from raw command-line input, given a day. This will fail with a usage error if it is passed - an invalid --format argument, - an invalid --value argument, - if --valuechange is called with a valuation type other than -V/--value=end. - an invalid --pretty argument,
setDefaultConversionOp :: ConversionOp -> ReportSpec -> ReportSpec #
Set the default ConversionOp.
intervalFromRawOpts :: RawOpts -> Interval #
Get the report interval, if any, specified by the last of -p/--period, -D--daily, -W--weekly, -M/--monthly etc. options. An interval from --period counts only if it is explicitly defined.
simplifyStatuses :: Ord a => [a] -> [a] #
Reduce a list of statuses to just one of each status, and if all statuses are present return the empty list.
reportOptsToggleStatus :: Status -> ReportOpts -> ReportOpts #
Add/remove this status from the status list. Used by hledger-ui.
transactionDateFn :: ReportOpts -> Transaction -> Day #
Select the Transaction date accessor based on --date2.
postingDateFn :: ReportOpts -> Posting -> Day #
Select the Posting date accessor based on --date2.
whichDate :: ReportOpts -> WhichDate #
Report which date we will report on based on --date2.
tree_ :: ReportOpts -> Bool #
Legacy-compatible convenience aliases for accountlistmode_.
flat_ :: ReportOpts -> Bool #
journalValueAndFilterPostings :: ReportSpec -> Journal -> Journal #
Convert a Journal'
s amounts to cost and/or to value (see
journalApplyValuationFromOpts
), and filter by the ReportSpec
Query
.
We make sure to first filter by amt: and cur: terms, then value the
Journal
, then filter by the remaining terms.
journalValueAndFilterPostingsWith :: ReportSpec -> Journal -> PriceOracle -> Journal #
Like journalValueAndFilterPostings
, but takes a PriceOracle
as an argument.
journalApplyValuationFromOpts :: ReportSpec -> Journal -> Journal #
Convert this journal's postings' amounts to cost and/or to value, if specified by options (-B--cost-V-X--value etc.). Strip prices if not needed. This should be the main stop for performing costing and valuation. The exception is whenever you need to perform valuation _after_ summing up amounts, as in a historical balance report with --value=end. valuationAfterSum will check for this condition.
journalApplyValuationFromOptsWith :: ReportSpec -> Journal -> PriceOracle -> Journal #
Like journalApplyValuationFromOpts, but takes PriceOracle as an argument.
mixedAmountApplyValuationAfterSumFromOptsWith :: ReportOpts -> Journal -> PriceOracle -> DateSpan -> MixedAmount -> MixedAmount #
Select the Account valuation functions required for performing valuation after summing amounts. Used in MultiBalanceReport to value historical and similar reports.
valuationAfterSum :: ReportOpts -> Maybe (Maybe CommoditySymbol) #
If the ReportOpts specify that we are performing valuation after summing amounts, return Just of the commodity symbol we're converting to, Just Nothing for the default, and otherwise return Nothing. Used for example with historical reports with --value=end.
queryFromFlags :: ReportOpts -> Query #
Convert report options to a query, ignoring any non-flag command line arguments.
reportSpan :: Journal -> ReportSpec -> (DateSpan, [DateSpan]) #
The effective report span is the start and end dates specified by options or queries, or otherwise the earliest and latest transaction or posting dates in the journal. If no dates are specified by options/queries and the journal is empty, returns the null date span. Also return the intervals if they are requested.
reportSpanBothDates :: Journal -> ReportSpec -> (DateSpan, [DateSpan]) #
Like reportSpan, but uses both primary and secondary dates when calculating the span.
reportStartDate :: Journal -> ReportSpec -> Maybe Day #
reportEndDate :: Journal -> ReportSpec -> Maybe Day #
reportPeriodStart :: ReportSpec -> Maybe Day #
reportPeriodOrJournalStart :: ReportSpec -> Journal -> Maybe Day #
reportPeriodLastDay :: ReportSpec -> Maybe Day #
reportPeriodOrJournalLastDay :: ReportSpec -> Journal -> Maybe Day #
reportPeriodName :: BalanceAccumulation -> [DateSpan] -> DateSpan -> Text #
Make a name for the given period in a multiperiod report, given the type of balance being reported and the full set of report periods. This will be used as a column heading (or row heading, in a register summary report). We try to pick a useful name as follows:
- ending-balance reports: the period's end date
- balance change reports where the periods are months and all in the same year: the short month name in the current locale
- all other balance change reports: a description of the datespan, abbreviated to compact form if possible (see showDateSpan).
overEither :: ((a -> Either e b) -> s -> Either e t) -> (a -> b) -> s -> Either e t #
Apply a function over a lens, but report on failure.
setEither :: ((a -> Either e b) -> s -> Either e t) -> b -> s -> Either e t #
Set a field using a lens, but report on failure.
reportOptsToSpec :: Day -> ReportOpts -> Either String ReportSpec #
Generate a ReportSpec from a set of ReportOpts on a given day.
updateReportSpec :: ReportOpts -> ReportSpec -> Either String ReportSpec #
Update the ReportOpts and the fields derived from it in a ReportSpec, or return an error message if there is a problem such as missing or unparseable options data. This is the safe way to change a ReportSpec, ensuring that all fields (_rsQuery, _rsReportOpts, querystring_, etc.) are in sync.
updateReportSpecWith :: (ReportOpts -> ReportOpts) -> ReportSpec -> Either String ReportSpec #
Like updateReportSpec, but takes a ReportOpts-modifying function.
rawOptsToReportSpec :: Day -> RawOpts -> Either String ReportSpec #
Generate a ReportSpec from RawOpts and a provided day, or return an error string if there are regular expression errors.
prrAdd :: Semigroup b => PeriodicReportRow a b -> PeriodicReportRow a b -> PeriodicReportRow a b #
Add two PeriodicReportRows
, preserving the name of the first.
periodicReportSpan :: PeriodicReport a b -> DateSpan #
Figure out the overall date span of a PeriodicReport
prMapName :: (a -> b) -> PeriodicReport a c -> PeriodicReport b c #
Map a function over the row names.
prMapMaybeName :: (a -> Maybe b) -> PeriodicReport a c -> PeriodicReport b c #
Map a function over the row names, possibly discarding some.
flatDisplayName :: AccountName -> DisplayName #
Construct a flat display name, where the full name is also displayed at depth 1
treeDisplayName :: AccountName -> DisplayName #
Construct a tree display name, where only the leaf is displayed at its given depth
prrFullName :: PeriodicReportRow DisplayName a -> AccountName #
Get the full, canonical, name of a PeriodicReportRow tagged by a DisplayName.
prrDisplayName :: PeriodicReportRow DisplayName a -> AccountName #
Get the display name of a PeriodicReportRow tagged by a DisplayName.
prrDepth :: PeriodicReportRow DisplayName a -> Int #
Get the display depth of a PeriodicReportRow tagged by a DisplayName.
postingsReport :: ReportSpec -> Journal -> PostingsReport #
Select postings from the journal and add running balance and other information to make a postings report. Used by eg hledger's register command.
mkpostingsReportItem :: Bool -> Bool -> WhichDate -> Maybe Period -> Posting -> MixedAmount -> PostingsReportItem #
Generate one postings report line item, containing the posting, the current running balance, and optionally the posting date and/or the transaction description.
multiBalanceReport :: ReportSpec -> Journal -> MultiBalanceReport #
Generate a multicolumn balance report for the matched accounts, showing the change of balance, accumulated balance, or historical balance in each of the specified periods. If the normalbalance_ option is set, it adjusts the sorting and sign of amounts (see ReportOpts and CompoundBalanceCommand). hledger's most powerful and useful report, used by the balance command (in multiperiod mode) and (via compoundBalanceReport) by the bscfis commands.
multiBalanceReportWith :: ReportSpec -> Journal -> PriceOracle -> Set AccountName -> MultiBalanceReport #
A helper for multiBalanceReport. This one takes some extra arguments,
a PriceOracle
to be used for looking up market prices, and a set of
AccountName
s which should not be elided. Commands which run multiple
reports (bs etc.) can generate the price oracle just once for efficiency,
passing it to each report by calling this function directly.
compoundBalanceReport :: ReportSpec -> Journal -> [CBCSubreportSpec a] -> CompoundPeriodicReport a MixedAmount #
Generate a compound balance report from a list of CBCSubreportSpec. This shares postings between the subreports.
compoundBalanceReportWith :: ReportSpec -> Journal -> PriceOracle -> [CBCSubreportSpec a] -> CompoundPeriodicReport a MixedAmount #
A helper for compoundBalanceReport, similar to multiBalanceReportWith.
startingPostings :: ReportSpec -> Journal -> PriceOracle -> DateSpan -> [Posting] #
Postings needed to calculate starting balances.
Balances at report start date, from all earlier postings which otherwise match the query. These balances are unvalued. TODO: Do we want to check whether to bother calculating these? isHistorical and startDate is not nothing, otherwise mempty? This currently gives a failure with some totals which are supposed to be 0 being blank.
makeReportQuery :: ReportSpec -> DateSpan -> ReportSpec #
Remove any date queries and insert queries from the report span. The user's query expanded to the report span if there is one (otherwise any date queries are left as-is, which handles the hledger-ui+future txns case above).
getPostingsByColumn :: ReportSpec -> Journal -> PriceOracle -> [DateSpan] -> [(DateSpan, [Posting])] #
Group postings, grouped by their column
getPostings :: ReportSpec -> Journal -> PriceOracle -> [Posting] #
Gather postings matching the query within the report period.
generateMultiBalanceReport :: ReportSpec -> Journal -> PriceOracle -> Set AccountName -> [(DateSpan, [Posting])] -> HashMap AccountName Account -> MultiBalanceReport #
Lay out a set of postings grouped by date span into a regular matrix with rows given by AccountName and columns by DateSpan, then generate a MultiBalanceReport from the columns.
sortRows :: ReportOpts -> Journal -> [MultiBalanceReportRow] -> [MultiBalanceReportRow] #
Sort the rows by amount or by account declaration order.
sortRowsLike :: [AccountName] -> [PeriodicReportRow DisplayName b] -> [PeriodicReportRow DisplayName b] #
A sorting helper: sort a list of things (eg report rows) keyed by account name to match the provided ordering of those same account names.
balanceReportTableAsText :: ReportOpts -> Table Text Text WideBuilder -> Builder #
Given a table representing a multi-column balance report (for example,
made using balanceReportAsTable
), render it in a format suitable for
console output. Amounts with more than two commodities will be elided
unless --no-elide is used.
entriesReport :: ReportSpec -> Journal -> EntriesReport #
Select transactions for an entries report.
budgetReport :: ReportSpec -> BalancingOpts -> DateSpan -> Journal -> BudgetReport #
Calculate per-account, per-period budget (balance change) goals
from all periodic transactions, calculate actual balance changes
from the regular transactions, and compare these to get a BudgetReport
.
Unbudgeted accounts may be hidden or renamed (see journalWithBudgetAccountNames).
combineBudgetAndActual :: ReportOpts -> Journal -> MultiBalanceReport -> MultiBalanceReport -> BudgetReport #
Combine a per-account-and-subperiod report of budget goals, and one of actual change amounts, into a budget performance report. The two reports should have the same report interval, but need not have exactly the same account rows or date columns. (Cells in the combined budget report can be missing a budget goal, an actual amount, or both.) The combined report will include:
- consecutive subperiods at the same interval as the two reports, spanning the period of both reports
- all accounts mentioned in either report, sorted by account code or account name or amount as appropriate.
budgetReportAsText :: ReportOpts -> BudgetReport -> Text #
Render a budget report as plain text suitable for console output.
budgetReportAsTable :: ReportOpts -> BudgetReport -> Table Text Text WideBuilder #
Build a Table
from a multi-column balance report.
budgetReportAsCsv :: ReportOpts -> BudgetReport -> [[Text]] #
Render a budget report as CSV. Like multiBalanceReportAsCsv, but includes alternating actual and budget amount columns.
flatShowsExclusiveBalance :: Bool #
When true (the default), this makes balance --flat reports and their implementation clearer. Single/multi-col balance reports currently aren't all correct if this is false.
balanceReport :: ReportSpec -> Journal -> BalanceReport #
Enabling this makes balance --flat --empty also show parent accounts without postings, in addition to those with postings and a zero balance. Disabling it shows only the latter. No longer supported, but leave this here for a bit. flatShowsPostinglessAccounts = True
Generate a simple balance report, containing the matched accounts and their balances (change of balance) during the specified period. If the normalbalance_ option is set, it adjusts the sorting and sign of amounts (see ReportOpts and CompoundBalanceCommand).
triOrigTransaction :: (a, b, c, d, e, f) -> a #
triDate :: (a, Transaction, c, d, e, f) -> Day #
triBalance :: (a, b, c, d, e, f) -> f #
triCommodityAmount :: CommoditySymbol -> (a, b, c, d, MixedAmount, f) -> MixedAmount #
triCommodityBalance :: CommoditySymbol -> (a, b, c, d, e, MixedAmount) -> MixedAmount #
accountTransactionsReportItems :: Query -> Query -> MixedAmount -> (MixedAmount -> MixedAmount) -> (AccountName -> Maybe AccountType) -> [(Day, Transaction)] -> [AccountTransactionsReportItem] #
Generate transactions report items from a list of transactions, using the provided user-specified report query, a query specifying which account to use as the focus, a starting balance, and a sign-setting function. Each transaction is accompanied by the date that should be shown for it in the report. This is not necessarily the transaction date - see transactionRegisterDate.
transactionRegisterDate :: WhichDate -> Query -> Query -> Transaction -> Day #
What date should be shown for a transaction in an account register report ? This will be in context of a particular account (the "this account" query) and any additional report query. It could be:
- if postings are matched by both thisacctq and reportq, the earliest of those matched postings' dates (or their secondary dates if --date2 was used)
- the transaction date, or its secondary date if --date2 was used.
accountTransactionsReportByCommodity :: AccountTransactionsReport -> [(CommoditySymbol, AccountTransactionsReport)] #
Split an account transactions report whose items may involve several commodities, into one or more single-commodity account transactions reports.
rawOptsToInputOpts :: Day -> RawOpts -> InputOpts #
Parse an InputOpts from a RawOpts and a provided date. This will fail with a usage error if the forecast period expression cannot be parsed.
parseAndFinaliseJournal :: ErroringJournalParser IO ParsedJournal -> InputOpts -> FilePath -> Text -> ExceptT String IO Journal #
Given a parser to ParsedJournal, input options, file path and content: run the parser on the content, and finalise the result to get a Journal; or throw an error.
initialiseAndParseJournal :: ErroringJournalParser IO ParsedJournal -> InputOpts -> FilePath -> Text -> ExceptT String IO Journal #
Given a parser to ParsedJournal, input options, file path and
content: run the parser on the content. This is all steps of
parseAndFinaliseJournal
without the finalisation step, and is used when
you need to perform other actions before finalisation, as in parsing
Timeclock and Timedot files.
journalFinalise :: InputOpts -> FilePath -> Text -> ParsedJournal -> ExceptT String IO Journal #
Post-process a Journal that has just been parsed or generated, in this order:
- add misc info (file path, read time)
- reverse transactions into their original parse order
- apply canonical commodity styles
- add tags from account directives to postings' tags
- add forecast transactions if enabled
- add tags from account directives to postings' tags (again to affect forecast transactions)
- add auto postings if enabled
- add tags from account directives to postings' tags (again to affect auto postings)
- evaluate balance assignments and balance each transaction
- check balance assertions if enabled
- infer equity postings in conversion transactions if enabled
- infer market prices from costs if enabled
- check all accounts have been declared if in strict mode
- check all commodities have been declared if in strict mode
journalAddAutoPostings :: Bool -> Day -> BalancingOpts -> Journal -> Either String Journal #
Apply any auto posting rules to generate extra postings on this journal's transactions. With a true first argument, adds visible tags to generated postings and modified transactions.
journalAddForecast :: Bool -> Maybe DateSpan -> Journal -> Journal #
Generate periodic transactions from all periodic transaction rules in the journal. These transactions are added to the in-memory Journal (but not the on-disk file).
The start & end date for generated periodic transactions are determined in a somewhat complicated way; see the hledger manual -> Periodic transactions.
setYear :: forall (m :: Type -> Type). Year -> JournalParser m () #
getYear :: forall (m :: Type -> Type). JournalParser m (Maybe Year) #
setDefaultCommodityAndStyle :: forall (m :: Type -> Type). (CommoditySymbol, AmountStyle) -> JournalParser m () #
getDefaultCommodityAndStyle :: forall (m :: Type -> Type). JournalParser m (Maybe (CommoditySymbol, AmountStyle)) #
getDefaultAmountStyle :: forall (m :: Type -> Type). JournalParser m (Maybe AmountStyle) #
Get amount style associated with default currency.
Returns AmountStyle
used to defined by a latest default commodity directive
prior to current position within this file or its parents.
getAmountStyle :: forall (m :: Type -> Type). CommoditySymbol -> JournalParser m (Maybe AmountStyle) #
Get the AmountStyle
declared by the most recently parsed (in the current or parent files,
prior to the current position) commodity directive for the given commodity, if any.
addDeclaredAccountTags :: forall (m :: Type -> Type). AccountName -> [Tag] -> JournalParser m () #
addDeclaredAccountType :: forall (m :: Type -> Type). AccountName -> AccountType -> JournalParser m () #
pushParentAccount :: forall (m :: Type -> Type). AccountName -> JournalParser m () #
popParentAccount :: forall (m :: Type -> Type). JournalParser m () #
getParentAccount :: forall (m :: Type -> Type). JournalParser m AccountName #
addAccountAlias :: MonadState Journal m => AccountAlias -> m () #
getAccountAliases :: MonadState Journal m => m [AccountAlias] #
clearAccountAliases :: MonadState Journal m => m () #
statusp :: forall (m :: Type -> Type). TextParser m Status #
codep :: forall (m :: Type -> Type). TextParser m Text #
descriptionp :: forall (m :: Type -> Type). TextParser m Text #
Parse possibly empty text until a semicolon or newline. Whitespace is preserved (for now - perhaps helps preserve alignment of same-line comments ?).
datep :: forall (m :: Type -> Type). JournalParser m Day #
Parse a date in YYYY-MM-DD format. Slash (/) and period (.) are also allowed as separators. The year may be omitted if a default year has been set. Leading zeroes may be omitted.
datetimep :: forall (m :: Type -> Type). JournalParser m LocalTime #
Parse a date and time in YYYY-MM-DD HH:MM[:SS][+-ZZZZ] format. Slash (/) and period (.) are also allowed as date separators. The year may be omitted if a default year has been set. Seconds are optional. The timezone is optional and ignored (the time is always interpreted as a local time). Leading zeroes may be omitted (except in a timezone).
secondarydatep :: forall (m :: Type -> Type). Day -> TextParser m Day #
modifiedaccountnamep :: forall (m :: Type -> Type). JournalParser m AccountName #
Parse an account name (plus one following space if present), then apply any parent account prefix and/or account aliases currently in effect, in that order. (Ie first add the parent account prefix, then rewrite with aliases). This calls error if any account alias with an invalid regular expression exists.
accountnamep :: forall (m :: Type -> Type). TextParser m AccountName #
Parse an account name, plus one following space if present. Account names have one or more parts separated by the account separator character, and are terminated by two or more spaces (or end of input). Each part is at least one character long, may have single spaces inside it, and starts with a non-whitespace. Note, this means "{account}", "%^!" and ";comment" are all accepted (parent parsers usually prevent/consume the last). It should have required parts to start with an alphanumeric; for now it remains as-is for backwards compatibility.
noncommenttextp :: forall (m :: Type -> Type). TextParser m Text #
Parse possibly empty text, including whitespace, until a comment start (semicolon) or newline.
noncommenttext1p :: forall (m :: Type -> Type). TextParser m Text #
Parse non-empty text, including whitespace, until a comment start (semicolon) or newline.
singlespacedtext1p :: forall (m :: Type -> Type). TextParser m Text #
Parse non-empty, single-spaced text starting and ending with non-whitespace, until a double space or newline.
singlespacednoncommenttext1p :: forall (m :: Type -> Type). TextParser m Text #
Parse non-empty, single-spaced text starting and ending with non-whitespace, until a comment start (semicolon), double space, or newline.
singlespacedtextsatisfying1p :: forall (m :: Type -> Type). (Char -> Bool) -> TextParser m Text #
Parse non-empty, single-spaced text starting and ending with non-whitespace, where all characters satisfy the given predicate.
singlespacep :: forall (m :: Type -> Type). TextParser m () #
Parse one non-newline whitespace character that is not followed by another one.
spaceandamountormissingp :: forall (m :: Type -> Type). JournalParser m MixedAmount #
Parse whitespace then an amount, or return the special "missing" marker amount.
amountp :: forall (m :: Type -> Type). JournalParser m Amount #
Parse a single-commodity amount, applying the default commodity if there is no commodity symbol; optionally followed by, in any order: a Ledger-style cost, Ledger-style valuation expression, and/or Ledger-style cost basis, which is one or more of lot cost, lot date, and/or lot note (we loosely call this triple the lot's cost basis). The cost basis makes it a lot rather than just an amount. Both cost basis info and valuation expression are discarded for now. The main amount's sign is significant; here are the possibilities and their interpretation. Also imagine an optional VALUATIONEXPR added to any of these (omitted for clarity): @
AMT -- acquiring an amount AMT COST -- acquiring an amount at some cost AMT COST COSTBASIS -- acquiring a lot at some cost, saving its cost basis AMT COSTBASIS COST -- like the above AMT COSTBASIS -- like the above with cost same as the cost basis
- AMT -- releasing an amount
- AMT SELLPRICE -- releasing an amount at some selling price
- AMT SELLPRICE COSTBASISSEL -- releasing a lot at some selling price, selecting it by its cost basis
- AMT COSTBASISSEL SELLPRICE -- like the above
- AMT COSTBASISSEL -- like the above with selling price same as the selected lot's cost basis amount
COST/SELLPRICE can be UNITAMT,
TOTALAMT, (
) UNITAMT, or (@@) TOTALAMT. The () are ignored.
COSTBASIS is one or more of {LOTCOST}, [LOTDATE], (LOTNOTE), in any order, with LOTCOST defaulting to COST.
COSTBASISSEL is one or more of {LOTCOST}, [LOTDATE], (LOTNOTE), in any order.
{LOTCOST} can be {UNITAMT}, {{TOTALAMT}}, {=UNITAMT}, or {{=TOTALAMT}}. The = is ignored.
VALUATIONEXPR can be ((VALUE AMOUNT)) or ((VALUE FUNCTION)).
@ Ledger amount syntax is really complex. Rule of thumb: curly braces, parentheses, and/or square brackets in an amount means a Ledger-style cost basis is involved.
To parse an amount's numeric quantity we need to know which character represents a decimal mark. We find it in one of three ways:
- If a decimal mark has been set explicitly in the journal parse state, we use that
- Or if the journal has a commodity declaration for the amount's commodity, we get the decimal mark from that
- Otherwise we will parse any valid decimal mark appearing in the number, as long as the number appears well formed. (This means we handle files with any supported decimal mark without configuration, but it also allows different decimal marks in different amounts, which is a bit too loose. There's an open issue.)
amountp' :: forall (m :: Type -> Type). Bool -> JournalParser m Amount #
parseamount :: String -> Either HledgerParseErrors Amount #
Try to parse a single-commodity amount from a string
parseamount' :: String -> Amount #
Parse a single-commodity amount from a string, or get an error.
parsemixedamount :: String -> Either HledgerParseErrors MixedAmount #
Like parseamount', but returns a MixedAmount.
parsemixedamount' :: String -> MixedAmount #
Like parseamount', but returns a MixedAmount.
commoditysymbolp :: forall (m :: Type -> Type). TextParser m CommoditySymbol #
costp :: forall (m :: Type -> Type). Amount -> JournalParser m AmountPrice #
Ledger-style cost notation:
UNITAMT,
TOTALAMT, (
) UNITAMT, or (@@) TOTALAMT. The () are ignored.
balanceassertionp :: forall (m :: Type -> Type). JournalParser m BalanceAssertion #
lotcostp :: forall (m :: Type -> Type). JournalParser m () #
numberp :: forall (m :: Type -> Type). Maybe AmountStyle -> TextParser m (Quantity, Word8, Maybe Char, Maybe DigitGroupStyle) #
Parse a string representation of a number for its value and display attributes.
Some international number formats are accepted, eg either period or comma may be used for the decimal mark, and the other of these may be used for separating digit groups in the integer part. See http://en.wikipedia.org/wiki/Decimal_separator for more examples.
This returns: the parsed numeric value, the precision (number of digits seen following the decimal mark), the decimal mark character used if any, and the digit group style if any.
fromRawNumber :: RawNumber -> Maybe Integer -> Either String (Quantity, Word8, Maybe Char, Maybe DigitGroupStyle) #
Interpret a raw number as a decimal number.
Returns: - the decimal number - the precision (number of digits after the decimal point) - the decimal point character, if any - the digit group style, if any (digit group character and sizes of digit groups)
rawnumberp :: forall (m :: Type -> Type). TextParser m (Either AmbiguousNumber RawNumber) #
Parse and interpret the structure of a number without external hints. Numbers are digit strings, possibly separated into digit groups by one of two types of separators. (1) Numbers may optionally have a decimal mark, which may be either a period or comma. (2) Numbers may optionally contain digit group marks, which must all be either a period, a comma, or a space.
It is our task to deduce the characters used as decimal mark and digit group mark, based on the allowed syntax. For instance, we make use of the fact that a decimal mark can occur at most once and must be to the right of all digit group marks.
>>>
parseTest rawnumberp "1,234,567.89"
Right (WithSeparators ',' ["1","234","567"] (Just ('.',"89")))>>>
parseTest rawnumberp "1,000"
Left (AmbiguousNumber "1" ',' "000")>>>
parseTest rawnumberp "1 000"
Right (WithSeparators ' ' ["1","000"] Nothing)
multilinecommentp :: forall (m :: Type -> Type). TextParser m () #
emptyorcommentlinep :: forall (m :: Type -> Type). TextParser m () #
A blank or comment line in journal format: a line that's empty or containing only whitespace or whose first non-whitespace character is semicolon, hash, or star.
isLineCommentStart :: Char -> Bool #
Is this a character that, as the first non-whitespace on a line, starts a comment line ?
isSameLineCommentStart :: Char -> Bool #
Is this a character that, appearing anywhere within a line, starts a comment ?
followingcommentp :: forall (m :: Type -> Type). TextParser m Text #
Parse the text of a (possibly multiline) comment following a journal item.
>>>
rtp followingcommentp "" -- no comment
Right "">>>
rtp followingcommentp ";" -- just a (empty) same-line comment. newline is added
Right "\n">>>
rtp followingcommentp "; \n"
Right "\n">>>
rtp followingcommentp ";\n ;\n" -- a same-line and a next-line comment
Right "\n\n">>>
rtp followingcommentp "\n ;\n" -- just a next-line comment. Insert an empty same-line comment so the next-line comment doesn't become a same-line comment.
Right "\n\n"
transactioncommentp :: forall (m :: Type -> Type). TextParser m (Text, [Tag]) #
Parse a transaction comment and extract its tags.
The first line of a transaction may be followed by comments, which begin with semicolons and extend to the end of the line. Transaction comments may span multiple lines, but comment lines below the transaction must be preceded by leading whitespace.
200011 ; a transaction comment starting on the same line ... ; extending to the next line account1 $1 account2
Tags are name-value pairs.
>>>
let getTags (_,tags) = tags
>>>
let parseTags = fmap getTags . rtp transactioncommentp
>>>
parseTags "; name1: val1, name2:all this is value2"
Right [("name1","val1"),("name2","all this is value2")]
A tag's name must be immediately followed by a colon, without separating whitespace. The corresponding value consists of all the text following the colon up until the next colon or newline, stripped of leading and trailing whitespace.
postingcommentp :: forall (m :: Type -> Type). Maybe Year -> TextParser m (Text, [Tag], Maybe Day, Maybe Day) #
Parse a posting comment and extract its tags and dates.
Postings may be followed by comments, which begin with semicolons and extend to the end of the line. Posting comments may span multiple lines, but comment lines below the posting must be preceded by leading whitespace.
200011 account1 $1 ; a posting comment starting on the same line ... ; extending to the next line
account2 ; a posting comment beginning on the next line
Tags are name-value pairs.
>>>
let getTags (_,tags,_,_) = tags
>>>
let parseTags = fmap getTags . rtp (postingcommentp Nothing)
>>>
parseTags "; name1: val1, name2:all this is value2"
Right [("name1","val1"),("name2","all this is value2")]
A tag's name must be immediately followed by a colon, without separating whitespace. The corresponding value consists of all the text following the colon up until the next colon or newline, stripped of leading and trailing whitespace.
Posting dates may be expressed with "date"/"date2" tags or with bracketed date syntax. Posting dates will inherit their year from the transaction date if the year is not specified. We throw parse errors on invalid dates.
>>>
let getDates (_,_,d1,d2) = (d1, d2)
>>>
let parseDates = fmap getDates . rtp (postingcommentp (Just 2000))
>>>
parseDates "; date: 1/2, date2: 1999/12/31"
Right (Just 2000-01-02,Just 1999-12-31)>>>
parseDates "; [1/2=1999/12/31]"
Right (Just 2000-01-02,Just 1999-12-31)
Example: tags, date tags, and bracketed dates >>> rtp (postingcommentp (Just 2000)) "; a:b, date:34, [=56]" Right ("a:b, date:34, [=56]n",[("a","b"),("date","3/4")],Just 2000-03-04,Just 2000-05-06)
Example: extraction of dates from date tags ignores trailing text >>> rtp (postingcommentp (Just 2000)) "; date:34=56" Right ("date:34=56n",[("date","34=56")],Just 2000-03-04,Nothing)
bracketeddatetagsp :: forall (m :: Type -> Type). Maybe Year -> TextParser m [(TagName, Day)] #
Parse Ledger-style bracketed posting dates ([DATE=DATE2]), as "date" and/or "date2" tags. Anything that looks like an attempt at this (a square-bracketed sequence of 0123456789/-.= containing at least one digit and one date separator) is also parsed, and will throw an appropriate error.
The dates are parsed in full here so that errors are reported in the right position. A missing year in DATE can be inferred if a default date is provided. A missing year in DATE2 will be inferred from DATE.
>>>
either (Left . customErrorBundlePretty) Right $ rtp (bracketeddatetagsp Nothing) "[2016/1/2=3/4]"
Right [("date",2016-01-02),("date2",2016-03-04)]
>>>
either (Left . customErrorBundlePretty) Right $ rtp (bracketeddatetagsp Nothing) "[1]"
Left ...not a bracketed date...
>>>
either (Left . customErrorBundlePretty) Right $ rtp (bracketeddatetagsp Nothing) "[2016/1/32]"
Left ...1:2:...This date is invalid...
>>>
either (Left . customErrorBundlePretty) Right $ rtp (bracketeddatetagsp Nothing) "[1/31]"
Left ...1:2:...The partial date 1/31 can not be parsed...
>>>
either (Left . customErrorBundlePretty) Right $ rtp (bracketeddatetagsp Nothing) "[0123456789/-.=/-.=]"
Left ...1:13:...expecting month or day...
aliasesFromOpts :: InputOpts -> [AccountAlias] #
Get the account name aliases from options, if any.
accountaliasp :: forall (m :: Type -> Type). TextParser m AccountAlias #
runJournalParser :: Monad m => JournalParser m a -> Text -> m (Either HledgerParseErrors a) #
Run a journal parser in some monad. See also: parseWithState.
findReader :: forall (m :: Type -> Type). MonadIO m => Maybe StorageFormat -> Maybe FilePath -> Maybe (Reader m) #
findReader mformat mpath
Find the reader named by mformat
, if provided.
Or, if a file path is provided, find the first reader that handles
its file extension, if any.
splitReaderPrefix :: PrefixedFilePath -> (Maybe String, FilePath) #
If a filepath is prefixed by one of the reader names and a colon, split that off. Eg "csv:-" -> (Just "csv", "-").
tmpostingrulep :: forall (m :: Type -> Type). Maybe Year -> JournalParser m TMPostingRule #
defaultJournal :: IO Journal #
Read the default journal file specified by the environment, or raise an error.
defaultJournalPath :: IO String #
Get the default journal file path specified by the environment.
Like ledger, we look first for the LEDGER_FILE environment
variable, and if that does not exist, for the legacy LEDGER
environment variable. If neither is set, or the value is blank,
return the hard-coded default, which is .hledger.journal
in the
users's home directory (or in the current directory, if we cannot
determine a home directory).
readJournal :: InputOpts -> Maybe FilePath -> Text -> ExceptT String IO Journal #
readJournal iopts mfile txt
Read a Journal from some text, or return an error message.
The reader (data format) is chosen based on, in this order:
- a reader name provided in
iopts
- a reader prefix in the
mfile
path - a file extension in
mfile
If none of these is available, or if the reader name is unrecognised, we use the journal reader. (We used to try all readers in this case; since hledger 1.17, we prefer predictability.)
readJournalFile :: InputOpts -> PrefixedFilePath -> ExceptT String IO Journal #
Read a Journal from this file, or from stdin if the file path is -, or return an error message. The file path can have a READER: prefix.
The reader (data format) to use is determined from (in priority order):
the mformat_
specified in the input options, if any;
the file path's READER: prefix, if any;
a recognised file name extension.
if none of these identify a known reader, the journal reader is used.
The input options can also configure balance assertion checking, automated posting generation, a rules file for converting CSV data, etc.
readJournalFiles :: InputOpts -> [PrefixedFilePath] -> ExceptT String IO Journal #
Read a Journal from each specified file path and combine them into one. Or, return the first error message.
Combining Journals means concatenating them, basically. The parse state resets at the start of each file, which means that directives & aliases do not affect subsequent sibling or parent files. They do affect included child files though. Also the final parse state saved in the Journal does span all files.
readJournal' :: Text -> IO Journal #
An easy version of readJournal
which assumes default options, and fails
in the IO monad.
readJournalFile' :: PrefixedFilePath -> IO Journal #
An easy version of readJournalFile
which assumes default options, and fails
in the IO monad.
readJournalFiles' :: [PrefixedFilePath] -> IO Journal #
An easy version of readJournalFiles'
which assumes default options, and fails
in the IO monad.
orDieTrying :: MonadIO m => ExceptT String m a -> m a #
Extract ExceptT to the IO monad, failing with an error message if necessary.
requireJournalFileExists :: FilePath -> IO () #
If the specified journal file does not exist (and is not "-"), give a helpful error and quit.
ensureJournalFileExists :: FilePath -> IO () #
Ensure there is a journal file at the given path, creating an empty one if needed.
On Windows, also ensure that the path contains no trailing dots
which could cause data loss (see isWindowsUnsafeDotPath
).
tests_Read :: TestTree #
Arguments
:: HasCallStack | |
=> String | A message that is displayed with the assertion failure |
-> IO a |
Unconditionally signals that a failure has occured. All other assertions can be expressed with the form:
if conditionIsMet then return () else assertFailure msg
Arguments
:: HasCallStack | |
=> String | The message that is displayed if the assertion fails |
-> Bool | The condition |
-> Assertion |
Asserts that the specified condition holds.
Arguments
:: (Eq a, Show a, HasCallStack) | |
=> String | The message prefix |
-> a | The expected value |
-> a | The actual value |
-> Assertion |
Asserts that the specified actual value is equal to the expected value. The output message will contain the prefix, the expected value, and the actual value.
If the prefix is the empty string (i.e., ""
), then the prefix is omitted
and only the expected and actual values are output.
Arguments
:: (Eq a, Show a, HasCallStack) | |
=> a | The expected value |
-> a | The actual value |
-> Assertion |
Asserts that the specified actual value is equal to the expected value (with the expected value on the left-hand side).
Arguments
:: (Eq a, Show a, HasCallStack) | |
=> a | The actual value |
-> a | The expected value |
-> Assertion |
Asserts that the specified actual value is equal to the expected value (with the actual value on the left-hand side).
Arguments
:: (AssertionPredicable t, HasCallStack) | |
=> t | A value of which the asserted condition is predicated |
-> String | A message that is displayed if the assertion fails |
-> Assertion |
An infix and flipped version of assertBool
. E.g. instead of
assertBool "Non-empty list" (null [1])
you can write
null [1] @? "Non-empty list"
@?
is also overloaded to accept
predicates, so instead
ofIO
Bool
do e <- doesFileExist "test" e @? "File does not exist"
you can write
doesFileExist "test" @? "File does not exist"
Arguments
:: HasCallStack | |
=> String | The message that is displayed with the assertion failure |
-> Assertion |
Signals an assertion failure if a non-empty message (i.e., a message
other than ""
) is passed.
testCaseSteps :: TestName -> ((String -> IO ()) -> Assertion) -> TestTree #
Create a multi-step unit test.
Example:
main = defaultMain $ testCaseSteps "Multi-step test" $ \step -> do step "Preparing..." -- do something step "Running part 1" -- do something step "Running part 2" -- do something assertFailure "BAM!" step "Running part 3" -- do something
The step
calls are mere annotations. They let you see which steps were
performed successfully, and which step failed.
You can think of step
as putStrLn
, except putStrLn
would mess up the output with the
console reporter and get lost with the others.
For the example above, the output will be
Multi-step test: FAIL Preparing... Running part 1 Running part 2 BAM! 1 out of 1 tests failed (0.00s)
Note that:
- Tasty still treats this as a single test, even though it consists of multiple steps.
- The execution stops after the first failure. When we are looking at a failed test, we know that all displayed steps but the last one were successful, and the last one failed. The steps after the failed one are not displayed, since they didn't run.
testCaseInfo :: TestName -> IO String -> TestTree #
Like testCase
, except in case the test succeeds, the returned string
will be shown as the description. If the empty string is returned, it
will be ignored.
fromJust :: HasCallStack => Maybe a -> a #
maybeToList :: Maybe a -> [a] #
maximumMay :: Ord a => [a] -> Maybe a #
maximumByMay :: (a -> a -> Ordering) -> [a] -> Maybe a #
minimumMay :: Ord a => [a] -> Maybe a #
minimumByMay :: (a -> a -> Ordering) -> [a] -> Maybe a #
listToMaybe :: [a] -> Maybe a #
iso8601DateFormat :: Maybe String -> String #
writeOutput :: CliOpts -> String -> IO () #
Write some output to stdout or to a file selected by --output-file. If the file exists it will be overwritten.
foldl1Note :: Partial => String -> (a -> a -> a) -> [a] -> a #
foldr1Note :: Partial => String -> (a -> a -> a) -> [a] -> a #
minimumNote :: (Partial, Ord a) => String -> [a] -> a #
maximumNote :: (Partial, Ord a) => String -> [a] -> a #
minimumByNote :: Partial => String -> (a -> a -> Ordering) -> [a] -> a #
maximumByNote :: Partial => String -> (a -> a -> Ordering) -> [a] -> a #
maximumBoundBy :: a -> (a -> a -> Ordering) -> [a] -> a #
The largest element of a list with respect to the given comparison function. The result is bounded by the value given as the first argument.
minimumBoundBy :: a -> (a -> a -> Ordering) -> [a] -> a #
The smallest element of a list with respect to the given comparison function. The result is bounded by the value given as the first argument.
maximumBound :: Ord a => a -> [a] -> a #
The largest element of a list. The result is bounded by the value given as the first argument.
minimumBound :: Ord a => a -> [a] -> a #
The smallest element of a list. The result is bounded by the value given as the first argument.
maximumBounded :: (Ord a, Bounded a) => [a] -> a #
The largest element of a list.
The result is bounded by minBound
.
minimumBounded :: (Ord a, Bounded a) => [a] -> a #
The largest element of a list.
The result is bounded by maxBound
.
findJustDef :: a -> (a -> Bool) -> [a] -> a #
findJustNote :: Partial => String -> (a -> Bool) -> [a] -> a #
minimumDef :: Ord a => a -> [a] -> a #
New users are recommended to use minimumBound
or maximumBound
instead.
maximumDef :: Ord a => a -> [a] -> a #
New users are recommended to use minimumBound
or maximumBound
instead.
minimumByDef :: a -> (a -> a -> Ordering) -> [a] -> a #
New users are recommended to use minimumBoundBy
or maximumBoundBy
instead.
maximumByDef :: a -> (a -> a -> Ordering) -> [a] -> a #
New users are recommended to use minimumBoundBy
or maximumBoundBy
instead.
tailNote :: Partial => String -> [a] -> [a] #
tailNote "help me" [] = error "Safe.tailNote [], help me" tailNote "help me" [1,3,4] = [3,4]
foldl1May' :: (a -> a -> a) -> [a] -> Maybe a #
foldl1Note' :: Partial => String -> (a -> a -> a) -> [a] -> a #
scanr1Note :: Partial => String -> (a -> a -> a) -> [a] -> [a] #
scanl1Note :: Partial => String -> (a -> a -> a) -> [a] -> [a] #
fromJustDef :: a -> Maybe a -> a #
fromJustNote :: Partial => String -> Maybe a -> a #
assertNote :: Partial => String -> Bool -> a -> a #
readEitherSafe :: Read a => String -> Either String a #
This function provides a more precise error message than readEither
from base
.
readNote :: (Partial, Read a) => String -> String -> a #
readNote
uses readEitherSafe
for the error message.
lookupJust :: (Eq a, Partial) => a -> [(a, b)] -> b #
lookupJust key = fromJust . lookup key
lookupJustDef :: Eq a => b -> a -> [(a, b)] -> b #
lookupJustNote :: (Partial, Eq a) => String -> a -> [(a, b)] -> b #
elemIndexJust :: (Partial, Eq a) => a -> [a] -> Int #
elemIndexJust op = fromJust . elemIndex op
elemIndexJustDef :: Eq a => Int -> a -> [a] -> Int #
elemIndexJustNote :: (Partial, Eq a) => String -> a -> [a] -> Int #
findIndexJust :: (a -> Bool) -> [a] -> Int #
findIndexJust op = fromJust . findIndex op
findIndexJustDef :: Int -> (a -> Bool) -> [a] -> Int #
findIndexJustNote :: Partial => String -> (a -> Bool) -> [a] -> Int #
toEnumNote :: (Partial, Enum a, Bounded a) => String -> Int -> a #
toEnumSafe :: (Enum a, Bounded a) => Int -> a #
foldl1Def' :: a -> (a -> a -> a) -> [a] -> a #
scaleCalendarDiffDays :: Integer -> CalendarDiffDays -> CalendarDiffDays #
addGregorianDurationClip :: CalendarDiffDays -> Day -> Day #
addGregorianDurationRollOver :: CalendarDiffDays -> Day -> Day #
addGregorianMonthsClip :: Integer -> Day -> Day #
addGregorianMonthsRollOver :: Integer -> Day -> Day #
addGregorianYearsClip :: Integer -> Day -> Day #
addGregorianYearsRollOver :: Integer -> Day -> Day #
diffGregorianDurationClip :: Day -> Day -> CalendarDiffDays #
diffGregorianDurationRollOver :: Day -> Day -> CalendarDiffDays #
fromGregorian :: Year -> MonthOfYear -> DayOfMonth -> Day #
fromGregorianValid :: Year -> MonthOfYear -> DayOfMonth -> Maybe Day #
gregorianMonthLength :: Year -> MonthOfYear -> DayOfMonth #
showGregorian :: Day -> String #
toGregorian :: Day -> (Year, MonthOfYear, DayOfMonth) #
isLeapYear :: Year -> Bool #
dayOfWeekDiff :: DayOfWeek -> DayOfWeek -> Int #
firstDayOfWeekOnAfter :: DayOfWeek -> Day -> Day #
parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t #
parseTimeOrError :: ParseTime t => Bool -> TimeLocale -> String -> String -> t #
readPTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadP t #
zonedTimeToUTC :: ZonedTime -> UTCTime #
addLocalTime :: NominalDiffTime -> LocalTime -> LocalTime #
diffLocalTime :: LocalTime -> LocalTime -> NominalDiffTime #
localTimeToUT1 :: Rational -> LocalTime -> UniversalTime #
localTimeToUTC :: TimeZone -> LocalTime -> UTCTime #
ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime #
utcToLocalTime :: TimeZone -> UTCTime -> LocalTime #
getZonedTime :: IO ZonedTime #
utcToLocalZonedTime :: UTCTime -> IO ZonedTime #
utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime #
diffTimeToPicoseconds :: DiffTime -> Integer #
picosecondsToDiffTime :: Integer -> DiffTime #
secondsToDiffTime :: Integer -> DiffTime #
nominalDiffTimeToSeconds :: NominalDiffTime -> Pico #
secondsToNominalDiffTime :: Pico -> NominalDiffTime #
addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime #
diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime #
getCurrentTime :: IO UTCTime #
formatTime :: FormatTime t => TimeLocale -> String -> t -> String #
scaleCalendarDiffTime :: Integer -> CalendarDiffTime -> CalendarDiffTime #
dayFractionToTimeOfDay :: Rational -> TimeOfDay #
daysAndTimeOfDayToTime :: Integer -> TimeOfDay -> NominalDiffTime #
localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) #
makeTimeOfDayValid :: Int -> Int -> Pico -> Maybe TimeOfDay #
pastMidnight :: DiffTime -> TimeOfDay #
sinceMidnight :: TimeOfDay -> DiffTime #
timeOfDayToDayFraction :: TimeOfDay -> Rational #
timeOfDayToTime :: TimeOfDay -> DiffTime #
timeToDaysAndTimeOfDay :: NominalDiffTime -> (Integer, TimeOfDay) #
timeToTimeOfDay :: DiffTime -> TimeOfDay #
utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) #
getTimeZone :: UTCTime -> IO TimeZone #
hoursToTimeZone :: Int -> TimeZone #
minutesToTimeZone :: Int -> TimeZone #
timeZoneOffsetString :: TimeZone -> String #
prognameandversion :: String #
The program name and version string for this build of the hledger tool, including any git info available at build time.
versionString :: ProgramName -> PackageVersion -> String #
A helper to generate the best version string we can from the given program name and package version strings, current os and architecture, and any git info available at build time (commit hash, commit date, branch name, patchlevel since latest release tag for that program's package). Typically called for programs "hledger", "hledger-ui", or "hledger-web".
The git info changes whenever any file in the repository changes. Keeping this template haskell call here and not down in Hledger.Cli.Version helps reduce the number of modules recompiled.
detailedversionflag :: Flag RawOpts #
A hidden flag just for the hledger executable.
flattreeflags :: Bool -> [Flag RawOpts] #
Flags for selecting flat/tree mode, used for reports organised by account. With a True argument, shows some extra help about inclusive/exclusive amounts.
Common flags that are accepted but not shown in --help, such as --effective, --aux-date.
inputflags :: [Flag RawOpts] #
Common input-related flags: --file, --rules-file, --alias...
reportflags :: [Flag RawOpts] #
Common report-related flags: --period, --cost, etc.
outputFormatFlag :: [String] -> Flag RawOpts #
Common output-related flags: --output-file, --output-format...
generalflagsgroup1 :: (String, [Flag RawOpts]) #
generalflagsgroup2 :: (String, [Flag RawOpts]) #
generalflagsgroup3 :: (String, [Flag RawOpts]) #
An empty cmdargs mode to use as a template. Modes describe the top-level command, ie the program, or a subcommand, telling cmdargs how to parse a command line and how to generate the command's usage text.
defCommandMode :: [Name] -> Mode RawOpts #
A cmdargs mode suitable for a hledger built-in command with the given names (primary name + optional aliases). The usage message shows [QUERY] as argument.
addonCommandMode :: Name -> Mode RawOpts #
A cmdargs mode representing the hledger add-on command with the given name, providing hledger's common inputreportinghelp flags. Just used when invoking addons.
hledgerCommandMode :: CommandDoc -> [Flag RawOpts] -> [(String, [Flag RawOpts])] -> [Flag RawOpts] -> ([Arg RawOpts], Maybe (Arg RawOpts)) -> Mode RawOpts #
Build a cmdarg mode for a hledger command, from a help template and flag/argument specifications. Reduces boilerplate a little, though the complicated cmdargs flag and argument specs are still required.
showModeUsage :: Mode a -> String #
Get a mode's usage message as a nicely wrapped string.
withAliases :: String -> [String] -> String #
Add command aliases to the command's help string.
likelyExecutablesInPath :: IO [String] #
Get all sorted unique filenames in the current user's PATH. We do not currently filter out non-file objects or files without execute permission.
hledgerExecutablesInPath :: IO [String] #
Get the sorted unique filenames of all hledger-* executables in the current user's PATH. These are files in any of the PATH directories, named hledger-*, with either no extension (and no periods in the name) or one of the addonExtensions. We do not currently filter out non-file objects or files without execute permission.
ensureDebugHasArg :: (Eq (t Char), IsString (t Char), Foldable t) => [t Char] -> [t Char] #
Convert an argument-less --debug flag to --debug=1 in the given arguments list. Used by hledgeruiweb to make their command line parsing easier somehow.
defcliopts :: CliOpts #
getHledgerCliOpts' :: Mode RawOpts -> [String] -> IO CliOpts #
A helper for addon commands: this parses options and arguments from the current command line using the given hledger-style cmdargs mode, and returns a CliOpts. Or, with --help or -h present, it prints long or short help, and exits the program. When --debug is present, also prints some debug output. Note this is not used by the main hledger executable.
The help texts are generated from the mode. Long help includes the full usage description generated by cmdargs (including all supported options), framed by whatever pre- and postamble text the mode specifies. It's intended that this forms a complete help document or manual.
Short help is a truncated version of the above: the preamble and the first part of the usage, up to the first line containing "flags:" (normally this marks the start of the common hledger flags); plus a mention of --help and the (presumed supported) common hledger options not displayed.
Tips: Empty lines in the pre/postamble are removed by cmdargs; add a space character to preserve them.
rawOptsToCliOpts :: RawOpts -> IO CliOpts #
Parse raw option string values to the desired final data types. Any relative smart dates will be converted to fixed dates based on today's date. Parsing failures will raise an error. Also records the terminal width, if supported.
outputFormats :: [String] #
journalFilePathFromOpts :: CliOpts -> IO [String] #
Get the (tilde-expanded, absolute) journal file path from 1. options, 2. an environment variable, or 3. the default. Actually, returns one or more file paths. There will be more than one if multiple -f options were provided. File paths can have a READER: prefix naming a reader/data format.
rulesFilePathFromOpts :: CliOpts -> IO (Maybe FilePath) #
Get the (tilde-expanded) rules file path from options, if any.
outputFileFromOpts :: CliOpts -> IO (Maybe FilePath) #
Get the expanded, absolute output file path specified by an -o/--output-file options, or nothing, meaning stdout.
outputFormatFromOpts :: CliOpts -> String #
Get the output format from the --output-format option, otherwise from a recognised file extension in the --output-file option, otherwise the default (txt).
defaultWidth :: Int #
Default width for hledger console output, when not otherwise specified.
replaceNumericFlags :: [String] -> [String] #
Replace any numeric flags (eg -2) with their long form (--depth 2), as I'm guessing cmdargs doesn't support this directly.
registerWidthsFromOpts :: CliOpts -> (Int, Maybe Int) #
Get the width in characters to use for the register command's console output,
and also the description column width if specified (following the main width, comma-separated).
The widths will be as follows:
no --width flag - overall width is the available width (COLUMNS, or posix terminal width, or 80); description width is unspecified (auto)
--width W - overall width is W, description width is auto
--width W,D - overall width is W, description width is D
Will raise a parse error for a malformed --width argument.
hledgerAddons :: IO [String] #
Get the sorted unique canonical names of hledger addon commands found in the current user's PATH. These are used in command line parsing and to display the commands list.
Canonical addon names are the filenames of hledger-* executables in PATH, without the "hledger-" prefix, and without the file extension except when it's needed for disambiguation (see below).
When there are exactly two versions of an executable (same base name, different extensions) that look like a source and compiled pair (one has .exe, .com, or no extension), the source version will be excluded (even if it happens to be newer). When there are three or more versions (or two versions that don't look like a source/compiled pair), they are all included, with file extensions intact.
topicForMode :: Mode a -> Topic #
Get the most appropriate documentation topic for a mode. Currently, that is either the hledger, hledger-ui or hledger-web manual.
printHelpForTopic :: Tool -> Maybe Topic -> IO () #
Print plain text help for this tool. Takes an optional topic argument for convenience but it is currently ignored.
runManForTopic :: Tool -> Maybe Topic -> IO () #
Display a man page for this tool, scrolled to the given topic if provided, using the "man" executable in $PATH. Note when a topic is provided we force man to use the "less" executable in $PATH, ignoring $MANPAGER and $PAGER.
runInfoForTopic :: Tool -> Maybe Topic -> IO () #
Display an info manual for this topic, opened at the given topic if provided, using the "info" executable in $PATH.
runPagerForTopic :: Tool -> Maybe Topic -> IO () #
Display plain text help for this tool, scrolled to the given topic if provided, using the given pager executable. Note when a topic is provided we ignore the provided pager and use the "less" executable in $PATH.
unsupportedOutputFormatError :: String -> String #
Standard error message for a bad output format specified with -O/-o.
withJournalDo :: CliOpts -> (Journal -> IO a) -> IO a #
Parse the user's specified journal file(s) as a Journal, maybe apply some transformations according to options, and run a hledger command with it. Or, throw an error.
writeOutputLazyText :: CliOpts -> Text -> IO () #
Write some output to stdout or to a file selected by --output-file. If the file exists it will be overwritten. This function operates on Lazy Text values.
journalTransform :: CliOpts -> Journal -> Journal #
Apply some extra post-parse transformations to the journal, if specified by options. These happen after journal validation, but before report calculation. They include:
- adding forecast transactions (--forecast)
- pivoting account names (--pivot)
- anonymising (--anonymise).
This will return an error message if the query in any auto posting rule fails to parse, or the generated transactions are not balanced.
journalReload :: CliOpts -> ExceptT String IO Journal #
Re-read the journal file(s) specified by options, applying any transformations specified by options. Or return an error string. Reads the full journal, without filtering.
journalReloadIfChanged :: CliOpts -> Day -> Journal -> ExceptT String IO (Journal, Bool) #
Re-read the option-specified journal file(s), but only if any of them has changed since last read. (If the file is standard input, this will either do nothing or give an error, not tested yet). Returns a journal or error message, and a flag indicating whether it was re-read or not. Like withJournalDo and journalReload, reads the full journal, without filtering.
journalFileIsNewer :: Journal -> FilePath -> IO Bool #
Has the specified file changed since the journal was last read ? Typically this is one of the journal's journalFilePaths. These are not always real files, so the file's existence is tested first; for non-files the answer is always no.
openBrowserOn :: String -> IO ExitCode #
Attempt to open a web browser on the given url, all platforms.
writeFileWithBackup :: FilePath -> String -> IO () #
Back up this file with a (incrementing) numbered suffix, then overwrite it with this new text, or give an error.
writeFileWithBackupIfChanged :: FilePath -> Text -> IO Bool #
Back up this file with a (incrementing) numbered suffix then overwrite it with this new text, or give an error, but only if the text is different from the current file contents, and return a flag indicating whether we did anything.
The given text should have unix line endings (n); the existing file content will be normalised to unix line endings before comparing the two. If the file is overwritten, the new file will have the current system's native line endings (n on unix, rn on windows). This could be different from the file's previous line endings, if working with a DOS file on unix or vice-versa.
readFileStrictly :: FilePath -> IO Text #
pivotByOpts :: CliOpts -> Journal -> Journal #
Apply the pivot transformation on a journal, if option is present.
anonymiseByOpts :: CliOpts -> Journal -> Journal #
Apply the anonymisation transformation on a journal, if option is present
journalSimilarTransaction :: CliOpts -> Journal -> Text -> Maybe Transaction #
postingsOrTransactionsReportAsText :: Bool -> CliOpts -> (Int -> Int -> (a, [WideBuilder], [WideBuilder]) -> Builder) -> (a -> MixedAmount) -> (a -> MixedAmount) -> [a] -> Builder #
Render a PostingsReport
or AccountTransactionsReport
as Text,
determining the appropriate starting widths and increasing as necessary.
splitFileName :: FilePath -> (String, String) #
takeDirectory :: FilePath -> FilePath #
argsToCliOpts :: [String] -> [String] -> IO CliOpts #
Parse hledger CLI options from these command line arguments and add-on command names, or raise any error.
packageversion :: PackageVersion #
The "1.31" string defined with -D in this package's package.yaml/.cabal file (by Shake setversion), if any. Normally a dotted number string with 1-3 components.
progname :: ProgramName #
The name of this package's main executable.
versionStringWith :: Either String GitInfo -> ProgramName -> PackageVersion -> VersionString #
Given possible git state info from the build directory (or an error message, which is ignored), the name of a program (executable) in the currently building package, and the package's version, make a complete version string. Here is the logic:
- Program name, OS and architecture are always shown.
- The package version is always shown.
- If there is git info at build time, the latest commit hash and commit date are shown, and (TODO, requires githash to use -uno for giDirty): if the working copy has uncommitted changes a + sign is appended.
- (TODO, requires adding --match support to githash: If there are tags matching THISPKG-[0-9]*, the latest one is used to calculate patch level (number of commits since tag), and if non-zero, it and the branch name are shown.)
Some example outputs:
- A homebrew binary, not built in git repo: hledger-ui 1.24, mac-aarch64
- A CI release build, built in git repo at release tag: hledger-ui 1.24.1-g455b35293-20211210, mac-x86_64
- (TODO) A dev build, built in git repo: hledger-ui 1.24.1+1-g4abd8ef10-20211210 (1.24-branch), mac-x86_64
This function requires git log to show the default (rfc2822-style) date format, so that must not be overridden by a log.date git config variable.
testcmd :: CliOpts -> Journal -> IO () #
The test command, which runs the hledger and hledger-lib packages' unit tests. This command also accepts tasty test runner options, written after a -- (double hyphen).
Unlike most hledger commands, this one does not read the user's journal.
A Journal
argument remains in the type signature, but it should
not be used (and would raise an error).
builtinCommands :: [(Mode RawOpts, CliOpts -> Journal -> IO ())] #
The cmdargs subcommand mode (for command-line parsing) and IO action (for doing the command's work) for each builtin command. Command actions take parsed CLI options and a (lazy) finalised journal.
builtinCommandNames :: [String] #
All names and aliases of the builtin commands.
findBuiltinCommand :: String -> Maybe (Mode RawOpts, CliOpts -> Journal -> IO ()) #
Look up a builtin command's mode and action by exact command name or alias.
knownAddonCommands :: [String] #
Canonical names of the known addon commands which have a slot in the commands list, in alphabetical order.
knownCommands :: [String] #
Canonical names of all commands which have a slot in the commands list, in alphabetical order. These include the builtin commands and the known addon commands.
printCommandsList :: String -> [String] -> IO () #
Print the commands list, with a pager if appropriate, customising the commandsList template above with the given version string and the installed addons. Uninstalled known addons will be removed from the list, installed known addons will have the + prefix removed, and installed unknown addons will be added under Misc.
accountsmode :: Mode RawOpts #
Command line options for this command.
activitymode :: Mode RawOpts #
appendToJournalFileOrStdout :: FilePath -> Text -> IO () #
Append a string, typically one or more transactions, to a journal file, or if the file is "-", dump it to stdout. Tries to avoid excess whitespace.
XXX This writes unix line endings (n), some at least, even if the file uses dos line endings (rn), which could leave mixed line endings in the file. See also writeFileWithBackupIfChanged.
journalAddTransaction :: Journal -> CliOpts -> Transaction -> IO Journal #
Append this transaction to the journal's file and transaction list.
postingsReportAsText :: CliOpts -> PostingsReport -> Text #
Render a register report as plain text suitable for console output.
balancemode :: Mode RawOpts #
Command line options for this command.
balanceReportAsText :: ReportOpts -> BalanceReport -> Builder #
Render a single-column balance report as plain text.
balanceReportAsCsv :: ReportOpts -> BalanceReport -> CSV #
Render a single-column balance report as CSV.
balanceReportItemAsText :: ReportOpts -> BalanceReportItem -> (Builder, [Int]) #
Render one balance report line item as plain text suitable for console output (or whatever string format is specified). Note, prices will not be rendered, and differently-priced quantities of the same commodity will appear merged. The output will be one or more lines depending on the format and number of commodities.
multiBalanceRowAsCsvText :: ReportOpts -> [DateSpan] -> PeriodicReportRow a MixedAmount -> [[Text]] #
multiBalanceRowAsTableText :: ReportOpts -> PeriodicReportRow a MixedAmount -> [[WideBuilder]] #
multiBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> Text #
Render a multi-column balance report as plain text suitable for console output.
multiBalanceReportAsCsv :: ReportOpts -> MultiBalanceReport -> CSV #
Render a multi-column balance report as CSV. The CSV will always include the initial headings row, and will include the final totals row unless --no-total is set.
multiBalanceReportAsHtml :: ReportOpts -> MultiBalanceReport -> Html () #
Render a multi-column balance report as HTML.
multiBalanceReportHtmlRows :: ReportOpts -> MultiBalanceReport -> (Html (), [Html ()], [Html ()]) #
Render the HTML table rows for a MultiBalanceReport. Returns the heading row, 0 or more body rows, and the totals row if enabled.
multiBalanceReportHtmlFootRow :: ReportOpts -> [Text] -> Html () #
Render one MultiBalanceReport totals row as a HTML table row.
balanceReportAsTable :: ReportOpts -> MultiBalanceReport -> Table Text Text WideBuilder #
Build a Table
from a multi-column balance report.
balancesheet :: CliOpts -> Journal -> IO () #
balancesheetequity :: CliOpts -> Journal -> IO () #
cashflowmode :: Mode RawOpts #
commoditiesmode :: Mode RawOpts #
Command line options for this command.
commodities :: CliOpts -> Journal -> IO () #
descriptionsmode :: Mode RawOpts #
Command line options for this command.
descriptions :: CliOpts -> Journal -> IO () #
The descriptions command.
help' :: CliOpts -> Journal -> IO () #
Display the hledger manual in various formats. You can select a docs viewer with one of the `--info`, `--man`, `--pager` flags. Otherwise it will use the first available of: info, man, $PAGER, less, stdout (and always stdout if output is non-interactive).
importmode :: Mode RawOpts #
incomestatement :: CliOpts -> Journal -> IO () #
payeesmode :: Mode RawOpts #
Command line options for this command.
pricesmode :: Mode RawOpts #
transactionWithMostlyOriginalPostings :: Transaction -> Transaction #
Replace this transaction's postings with the original postings if any, but keep the current possibly rewritten account names, and the inferred values of any auto postings. This is mainly for showing transactions with the amounts in their original journal format.
registermode :: Mode RawOpts #
postingsReportItemAsText :: CliOpts -> Int -> Int -> (PostingsReportItem, [WideBuilder], [WideBuilder]) -> Builder #
Render one register report line item as plain text. Layout is like so:
width (specified, terminal width, or 80) --------------------
date (10) description account amount (12) balance (12)
DDDDDDDDDD dddddddddddddddddddd aaaaaaaaaaaaaaaaaaa AAAAAAAAAAAA AAAAAAAAAAAA
If description's width is specified, account will use the remaining space.
Otherwise, description and account divide up the space equally.
With a report interval, the layout is like so:
width (specified, terminal width, or 80) --------------------
date (21) account amount (12) balance (12)
DDDDDDDDDDDDDDDDDDDDD aaaaaaaaaaaaaaaaaaaaaaaaaaaaa AAAAAAAAAAAA AAAAAAAAAAAA
date and description are shown for the first posting of a transaction only.
Returns a string which can be multi-line, eg if the running balance has multiple commodities. Does not yet support formatting control like balance reports.
Also returns the natural width (without padding) of the amount and balance fields.
rewritemode :: Mode RawOpts #
parseTimeMultipleM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> [(String, String)] -> m t #
periodAllDays :: DayPeriod p => p -> [Day] #
periodFromDay :: DayPeriod p => Day -> (p, Int) #
periodLength :: DayPeriod p => p -> Int #
periodToDay :: DayPeriod p => p -> Int -> Day #
periodToDayValid :: DayPeriod p => p -> Int -> Maybe Day #
isPathSeparator :: Char -> Bool #
isRelative :: FilePath -> Bool #
splitExtension :: FilePath -> (String, String) #
takeBaseName :: FilePath -> String #
takeExtension :: FilePath -> String #
addExtension :: FilePath -> String -> FilePath #
makeRelative :: FilePath -> FilePath -> FilePath #
dropExtension :: FilePath -> FilePath #
dropExtensions :: FilePath -> FilePath #
dropFileName :: FilePath -> FilePath #
equalFilePath :: FilePath -> FilePath -> Bool #
extSeparator :: Char #
getSearchPath :: IO [FilePath] #
hasExtension :: FilePath -> Bool #
hasTrailingPathSeparator :: FilePath -> Bool #
isAbsolute :: FilePath -> Bool #
isExtSeparator :: Char -> Bool #
isExtensionOf :: String -> FilePath -> Bool #
isSearchPathSeparator :: Char -> Bool #
pathSeparator :: Char #
pathSeparators :: [Char] #
replaceBaseName :: FilePath -> String -> FilePath #
replaceDirectory :: FilePath -> String -> FilePath #
replaceExtension :: FilePath -> String -> FilePath #
replaceExtensions :: FilePath -> String -> FilePath #
replaceFileName :: FilePath -> String -> FilePath #
splitDirectories :: FilePath -> [FilePath] #
splitDrive :: FilePath -> (FilePath, FilePath) #
splitExtensions :: FilePath -> (FilePath, String) #
splitSearchPath :: String -> [FilePath] #
takeExtensions :: FilePath -> String #
takeFileName :: FilePath -> FilePath #
weekAllDays :: DayOfWeek -> Day -> [Day] #
weekFirstDay :: DayOfWeek -> Day -> Day #
weekLastDay :: DayOfWeek -> Day -> Day #
activity :: CliOpts -> Journal -> IO () #
Print a bar chart of number of postings per report interval.
showHistogram :: ReportSpec -> Journal -> String #
printDayWith :: (PrintfArg t1, PrintfType t2) => (t3 -> t1) -> (DateSpan, t3) -> t2 #