{-# LANGUAGE NoImplicitPrelude #-}
module Types
( App (..)
, Options (..)
) where
import RIO
import Path
data Options = Options
{ Options -> Bool
optsRecursive :: Bool
, Options -> [FilePath]
optsPaths :: [FilePath]
, Options -> Maybe (SomeBase Dir)
optsBaseDir :: Maybe (SomeBase Dir)
, Options -> Maybe (SomeBase Dir)
optsOutputDir :: Maybe (SomeBase Dir)
, Options -> Bool
optsTrim :: Bool
, Options -> Bool
optsVerbose :: Bool
}
data App = App
{ App -> LogFunc
appLogFunc :: LogFunc
, App -> Bool
appDoTrim :: Bool
, App -> Path Abs Dir
appBaseDir :: Path Abs Dir
, App -> Set (Path Rel File)
appFiles :: Set (Path Rel File)
, App -> Path Abs Dir
appOutputDir :: Path Abs Dir
}
instance HasLogFunc App where
logFuncL :: Lens' App LogFunc
logFuncL :: Lens' App LogFunc
logFuncL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
lens App -> LogFunc
appLogFunc
(\App
it LogFunc
new -> App
it { appLogFunc :: LogFunc
appLogFunc = LogFunc
new })