hledger-flow-0.16.1: src/Hledger/Flow/Types.hs
{-# LANGUAGE FlexibleInstances #-}
module Hledger.Flow.Types where
import qualified Data.Text as T
import Hledger.Flow.PathHelpers
import qualified Turtle (ExitCode, Line, NominalDiffTime, Shell)
type BaseDir = AbsDir
type RunDir = RelDir
data LogMessage = StdOut T.Text | StdErr T.Text | Terminate deriving (Show)
type FullOutput = (Turtle.ExitCode, T.Text, T.Text)
type FullTimedOutput = (FullOutput, Turtle.NominalDiffTime)
type ProcFun = T.Text -> [T.Text] -> Turtle.Shell Turtle.Line -> IO FullOutput
type ProcInput = (T.Text, [T.Text], Turtle.Shell Turtle.Line)
data HledgerInfo = HledgerInfo
{ hlPath :: AbsFile,
hlVersion :: T.Text
}
deriving (Show)
class HasVerbosity a where
verbose :: a -> Bool
class HasBaseDir a where
baseDir :: a -> BaseDir
class HasRunDir a where
importRunDir :: a -> RunDir
class HasSequential a where
sequential :: a -> Bool
class HasBatchSize a where
batchSize :: a -> Int
class HasPrettyReports a where
prettyReports :: a -> Bool