{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE EmptyDataDeriving #-}
{-# LANGUAGE StrictData #-}
module Hledger.UI.UITypes where
import Data.Text (Text)
import Data.Time.Calendar (Day)
import Data.Time.Clock (UTCTime)
import Brick.Widgets.List (List)
import Brick.Widgets.Edit (Editor)
import Lens.Micro.Platform (makeLenses)
import Text.Show.Functions ()
import Hledger
import Hledger.Cli (HasCliOpts(..))
import Hledger.UI.UIOptions
data AppEvent =
FileChange
| DateChange Day Day
deriving (AppEvent -> AppEvent -> Bool
(AppEvent -> AppEvent -> Bool)
-> (AppEvent -> AppEvent -> Bool) -> Eq AppEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AppEvent -> AppEvent -> Bool
== :: AppEvent -> AppEvent -> Bool
$c/= :: AppEvent -> AppEvent -> Bool
/= :: AppEvent -> AppEvent -> Bool
Eq, Int -> AppEvent -> ShowS
[AppEvent] -> ShowS
AppEvent -> String
(Int -> AppEvent -> ShowS)
-> (AppEvent -> String) -> ([AppEvent] -> ShowS) -> Show AppEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AppEvent -> ShowS
showsPrec :: Int -> AppEvent -> ShowS
$cshow :: AppEvent -> String
show :: AppEvent -> String
$cshowList :: [AppEvent] -> ShowS
showList :: [AppEvent] -> ShowS
Show)
data UIState = UIState {
UIState -> UIOpts
astartupopts :: UIOpts
,UIState -> UIOpts
aopts :: UIOpts
,UIState -> Journal
ajournal :: Journal
,UIState -> Journal
auncollapsedjournal :: Journal
,UIState -> Screen
aScreen :: ~Screen
,UIState -> [Screen]
aPrevScreens :: ~[Screen]
,UIState -> Mode
aMode :: Mode
,UIState -> [String]
aWarnings :: [String]
,UIState -> ClickFocus
aClickFocus :: ClickFocus
} deriving (Int -> UIState -> ShowS
[UIState] -> ShowS
UIState -> String
(Int -> UIState -> ShowS)
-> (UIState -> String) -> ([UIState] -> ShowS) -> Show UIState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UIState -> ShowS
showsPrec :: Int -> UIState -> ShowS
$cshow :: UIState -> String
show :: UIState -> String
$cshowList :: [UIState] -> ShowS
showList :: [UIState] -> ShowS
Show)
data ClickFocus =
Unfocused
| FocusGainedAt UTCTime
| IgnoringClick
deriving (Int -> ClickFocus -> ShowS
[ClickFocus] -> ShowS
ClickFocus -> String
(Int -> ClickFocus -> ShowS)
-> (ClickFocus -> String)
-> ([ClickFocus] -> ShowS)
-> Show ClickFocus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClickFocus -> ShowS
showsPrec :: Int -> ClickFocus -> ShowS
$cshow :: ClickFocus -> String
show :: ClickFocus -> String
$cshowList :: [ClickFocus] -> ShowS
showList :: [ClickFocus] -> ShowS
Show,ClickFocus -> ClickFocus -> Bool
(ClickFocus -> ClickFocus -> Bool)
-> (ClickFocus -> ClickFocus -> Bool) -> Eq ClickFocus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClickFocus -> ClickFocus -> Bool
== :: ClickFocus -> ClickFocus -> Bool
$c/= :: ClickFocus -> ClickFocus -> Bool
/= :: ClickFocus -> ClickFocus -> Bool
Eq)
data Mode =
Normal
| Help
| Minibuffer Text (Editor String Name)
deriving (Int -> Mode -> ShowS
[Mode] -> ShowS
Mode -> String
(Int -> Mode -> ShowS)
-> (Mode -> String) -> ([Mode] -> ShowS) -> Show Mode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Mode -> ShowS
showsPrec :: Int -> Mode -> ShowS
$cshow :: Mode -> String
show :: Mode -> String
$cshowList :: [Mode] -> ShowS
showList :: [Mode] -> ShowS
Show,Mode -> Mode -> Bool
(Mode -> Mode -> Bool) -> (Mode -> Mode -> Bool) -> Eq Mode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Mode -> Mode -> Bool
== :: Mode -> Mode -> Bool
$c/= :: Mode -> Mode -> Bool
/= :: Mode -> Mode -> Bool
Eq)
instance Eq (Editor l n) where Editor l n
_ == :: Editor l n -> Editor l n -> Bool
== Editor l n
_ = Bool
True
data Name =
HelpDialog
| MinibufferEditor
|
| AccountsViewport
| AccountsList
| RegisterViewport
| RegisterList
| TransactionEditor
deriving (Eq Name
Eq Name =>
(Name -> Name -> Ordering)
-> (Name -> Name -> Bool)
-> (Name -> Name -> Bool)
-> (Name -> Name -> Bool)
-> (Name -> Name -> Bool)
-> (Name -> Name -> Name)
-> (Name -> Name -> Name)
-> Ord Name
Name -> Name -> Bool
Name -> Name -> Ordering
Name -> Name -> Name
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Name -> Name -> Ordering
compare :: Name -> Name -> Ordering
$c< :: Name -> Name -> Bool
< :: Name -> Name -> Bool
$c<= :: Name -> Name -> Bool
<= :: Name -> Name -> Bool
$c> :: Name -> Name -> Bool
> :: Name -> Name -> Bool
$c>= :: Name -> Name -> Bool
>= :: Name -> Name -> Bool
$cmax :: Name -> Name -> Name
max :: Name -> Name -> Name
$cmin :: Name -> Name -> Name
min :: Name -> Name -> Name
Ord, Int -> Name -> ShowS
[Name] -> ShowS
Name -> String
(Int -> Name -> ShowS)
-> (Name -> String) -> ([Name] -> ShowS) -> Show Name
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Name -> ShowS
showsPrec :: Int -> Name -> ShowS
$cshow :: Name -> String
show :: Name -> String
$cshowList :: [Name] -> ShowS
showList :: [Name] -> ShowS
Show, Name -> Name -> Bool
(Name -> Name -> Bool) -> (Name -> Name -> Bool) -> Eq Name
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Name -> Name -> Bool
== :: Name -> Name -> Bool
$c/= :: Name -> Name -> Bool
/= :: Name -> Name -> Bool
Eq)
data AccountsScreenKind =
AllAccounts
| CashAccounts
| BalancesheetAccounts
| IncomestatementAccounts
deriving (Eq AccountsScreenKind
Eq AccountsScreenKind =>
(AccountsScreenKind -> AccountsScreenKind -> Ordering)
-> (AccountsScreenKind -> AccountsScreenKind -> Bool)
-> (AccountsScreenKind -> AccountsScreenKind -> Bool)
-> (AccountsScreenKind -> AccountsScreenKind -> Bool)
-> (AccountsScreenKind -> AccountsScreenKind -> Bool)
-> (AccountsScreenKind -> AccountsScreenKind -> AccountsScreenKind)
-> (AccountsScreenKind -> AccountsScreenKind -> AccountsScreenKind)
-> Ord AccountsScreenKind
AccountsScreenKind -> AccountsScreenKind -> Bool
AccountsScreenKind -> AccountsScreenKind -> Ordering
AccountsScreenKind -> AccountsScreenKind -> AccountsScreenKind
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: AccountsScreenKind -> AccountsScreenKind -> Ordering
compare :: AccountsScreenKind -> AccountsScreenKind -> Ordering
$c< :: AccountsScreenKind -> AccountsScreenKind -> Bool
< :: AccountsScreenKind -> AccountsScreenKind -> Bool
$c<= :: AccountsScreenKind -> AccountsScreenKind -> Bool
<= :: AccountsScreenKind -> AccountsScreenKind -> Bool
$c> :: AccountsScreenKind -> AccountsScreenKind -> Bool
> :: AccountsScreenKind -> AccountsScreenKind -> Bool
$c>= :: AccountsScreenKind -> AccountsScreenKind -> Bool
>= :: AccountsScreenKind -> AccountsScreenKind -> Bool
$cmax :: AccountsScreenKind -> AccountsScreenKind -> AccountsScreenKind
max :: AccountsScreenKind -> AccountsScreenKind -> AccountsScreenKind
$cmin :: AccountsScreenKind -> AccountsScreenKind -> AccountsScreenKind
min :: AccountsScreenKind -> AccountsScreenKind -> AccountsScreenKind
Ord, Int -> AccountsScreenKind -> ShowS
[AccountsScreenKind] -> ShowS
AccountsScreenKind -> String
(Int -> AccountsScreenKind -> ShowS)
-> (AccountsScreenKind -> String)
-> ([AccountsScreenKind] -> ShowS)
-> Show AccountsScreenKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountsScreenKind -> ShowS
showsPrec :: Int -> AccountsScreenKind -> ShowS
$cshow :: AccountsScreenKind -> String
show :: AccountsScreenKind -> String
$cshowList :: [AccountsScreenKind] -> ShowS
showList :: [AccountsScreenKind] -> ShowS
Show, AccountsScreenKind -> AccountsScreenKind -> Bool
(AccountsScreenKind -> AccountsScreenKind -> Bool)
-> (AccountsScreenKind -> AccountsScreenKind -> Bool)
-> Eq AccountsScreenKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountsScreenKind -> AccountsScreenKind -> Bool
== :: AccountsScreenKind -> AccountsScreenKind -> Bool
$c/= :: AccountsScreenKind -> AccountsScreenKind -> Bool
/= :: AccountsScreenKind -> AccountsScreenKind -> Bool
Eq)
data Screen =
MS MenuScreenState
| AS AccountsScreenState
| RS RegisterScreenState
| TS TransactionScreenState
| ES ErrorScreenState
deriving (Int -> Screen -> ShowS
[Screen] -> ShowS
Screen -> String
(Int -> Screen -> ShowS)
-> (Screen -> String) -> ([Screen] -> ShowS) -> Show Screen
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Screen -> ShowS
showsPrec :: Int -> Screen -> ShowS
$cshow :: Screen -> String
show :: Screen -> String
$cshowList :: [Screen] -> ShowS
showList :: [Screen] -> ShowS
Show)
data = MSS {
MenuScreenState -> List Name MenuScreenItem
_mssList :: List Name MenuScreenItem
,MenuScreenState -> ()
_mssUnused :: ()
} deriving (Int -> MenuScreenState -> ShowS
[MenuScreenState] -> ShowS
MenuScreenState -> String
(Int -> MenuScreenState -> ShowS)
-> (MenuScreenState -> String)
-> ([MenuScreenState] -> ShowS)
-> Show MenuScreenState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MenuScreenState -> ShowS
showsPrec :: Int -> MenuScreenState -> ShowS
$cshow :: MenuScreenState -> String
show :: MenuScreenState -> String
$cshowList :: [MenuScreenState] -> ShowS
showList :: [MenuScreenState] -> ShowS
Show)
data AccountsScreenState = ASS {
AccountsScreenState -> AccountsScreenKind
_assKind :: AccountsScreenKind
,AccountsScreenState -> Text
_assSelectedAccount :: AccountName
,AccountsScreenState -> List Name AccountsScreenItem
_assList :: List Name AccountsScreenItem
} deriving (Int -> AccountsScreenState -> ShowS
[AccountsScreenState] -> ShowS
AccountsScreenState -> String
(Int -> AccountsScreenState -> ShowS)
-> (AccountsScreenState -> String)
-> ([AccountsScreenState] -> ShowS)
-> Show AccountsScreenState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountsScreenState -> ShowS
showsPrec :: Int -> AccountsScreenState -> ShowS
$cshow :: AccountsScreenState -> String
show :: AccountsScreenState -> String
$cshowList :: [AccountsScreenState] -> ShowS
showList :: [AccountsScreenState] -> ShowS
Show)
data RegisterScreenState = {
:: AccountName
, :: Bool
, :: List Name RegisterScreenItem
} deriving (Int -> RegisterScreenState -> ShowS
[RegisterScreenState] -> ShowS
RegisterScreenState -> String
(Int -> RegisterScreenState -> ShowS)
-> (RegisterScreenState -> String)
-> ([RegisterScreenState] -> ShowS)
-> Show RegisterScreenState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegisterScreenState -> ShowS
showsPrec :: Int -> RegisterScreenState -> ShowS
$cshow :: RegisterScreenState -> String
show :: RegisterScreenState -> String
$cshowList :: [RegisterScreenState] -> ShowS
showList :: [RegisterScreenState] -> ShowS
Show)
data TransactionScreenState = TSS {
TransactionScreenState -> Text
_tssAccount :: AccountName
,TransactionScreenState -> Bool
_tssForceInclusive :: Bool
,TransactionScreenState -> [NumberedTransaction]
_tssTransactions :: [NumberedTransaction]
,TransactionScreenState -> NumberedTransaction
_tssTransaction :: NumberedTransaction
} deriving (Int -> TransactionScreenState -> ShowS
[TransactionScreenState] -> ShowS
TransactionScreenState -> String
(Int -> TransactionScreenState -> ShowS)
-> (TransactionScreenState -> String)
-> ([TransactionScreenState] -> ShowS)
-> Show TransactionScreenState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionScreenState -> ShowS
showsPrec :: Int -> TransactionScreenState -> ShowS
$cshow :: TransactionScreenState -> String
show :: TransactionScreenState -> String
$cshowList :: [TransactionScreenState] -> ShowS
showList :: [TransactionScreenState] -> ShowS
Show)
data ErrorScreenState = ESS {
ErrorScreenState -> String
_essError :: String
,ErrorScreenState -> ()
_essUnused :: ()
} deriving (Int -> ErrorScreenState -> ShowS
[ErrorScreenState] -> ShowS
ErrorScreenState -> String
(Int -> ErrorScreenState -> ShowS)
-> (ErrorScreenState -> String)
-> ([ErrorScreenState] -> ShowS)
-> Show ErrorScreenState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ErrorScreenState -> ShowS
showsPrec :: Int -> ErrorScreenState -> ShowS
$cshow :: ErrorScreenState -> String
show :: ErrorScreenState -> String
$cshowList :: [ErrorScreenState] -> ShowS
showList :: [ErrorScreenState] -> ShowS
Show)
data = {
MenuScreenItem -> Text
msItemScreenName :: Text
,MenuScreenItem -> AccountsScreenKind
msItemScreen :: AccountsScreenKind
} deriving (Int -> MenuScreenItem -> ShowS
[MenuScreenItem] -> ShowS
MenuScreenItem -> String
(Int -> MenuScreenItem -> ShowS)
-> (MenuScreenItem -> String)
-> ([MenuScreenItem] -> ShowS)
-> Show MenuScreenItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MenuScreenItem -> ShowS
showsPrec :: Int -> MenuScreenItem -> ShowS
$cshow :: MenuScreenItem -> String
show :: MenuScreenItem -> String
$cshowList :: [MenuScreenItem] -> ShowS
showList :: [MenuScreenItem] -> ShowS
Show)
data AccountsScreenItem = AccountsScreenItem {
AccountsScreenItem -> Int
asItemIndentLevel :: Int
,AccountsScreenItem -> Text
asItemAccountName :: AccountName
,AccountsScreenItem -> Text
asItemDisplayAccountName :: AccountName
,AccountsScreenItem -> Maybe MixedAmount
asItemMixedAmount :: Maybe MixedAmount
} deriving (Int -> AccountsScreenItem -> ShowS
[AccountsScreenItem] -> ShowS
AccountsScreenItem -> String
(Int -> AccountsScreenItem -> ShowS)
-> (AccountsScreenItem -> String)
-> ([AccountsScreenItem] -> ShowS)
-> Show AccountsScreenItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountsScreenItem -> ShowS
showsPrec :: Int -> AccountsScreenItem -> ShowS
$cshow :: AccountsScreenItem -> String
show :: AccountsScreenItem -> String
$cshowList :: [AccountsScreenItem] -> ShowS
showList :: [AccountsScreenItem] -> ShowS
Show)
data RegisterScreenItem = RegisterScreenItem {
RegisterScreenItem -> Text
rsItemDate :: Text
,RegisterScreenItem -> Status
rsItemStatus :: Status
,RegisterScreenItem -> Text
rsItemDescription :: Text
,RegisterScreenItem -> Text
rsItemOtherAccounts :: Text
,RegisterScreenItem -> WideBuilder
rsItemChangeAmount :: WideBuilder
,RegisterScreenItem -> WideBuilder
rsItemBalanceAmount :: WideBuilder
,RegisterScreenItem -> Transaction
rsItemTransaction :: Transaction
}
deriving (Int -> RegisterScreenItem -> ShowS
[RegisterScreenItem] -> ShowS
RegisterScreenItem -> String
(Int -> RegisterScreenItem -> ShowS)
-> (RegisterScreenItem -> String)
-> ([RegisterScreenItem] -> ShowS)
-> Show RegisterScreenItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegisterScreenItem -> ShowS
showsPrec :: Int -> RegisterScreenItem -> ShowS
$cshow :: RegisterScreenItem -> String
show :: RegisterScreenItem -> String
$cshowList :: [RegisterScreenItem] -> ShowS
showList :: [RegisterScreenItem] -> ShowS
Show)
type NumberedTransaction = (Integer, Transaction)
makeLenses ''MenuScreenState
makeLenses ''AccountsScreenState
makeLenses ''TransactionScreenState
makeLenses ''ErrorScreenState
uioptslens :: (UIOpts -> f UIOpts) -> UIState -> f UIState
uioptslens UIOpts -> f UIOpts
f UIState
ui = (\UIOpts
x -> UIState
ui{aopts=x}) (UIOpts -> UIState) -> f UIOpts -> f UIState
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> UIOpts -> f UIOpts
f (UIState -> UIOpts
aopts UIState
ui)
instance HasCliOpts UIState where
cliOpts :: Lens' UIState CliOpts
cliOpts = (UIOpts -> f UIOpts) -> UIState -> f UIState
forall {f :: * -> *}.
Functor f =>
(UIOpts -> f UIOpts) -> UIState -> f UIState
uioptslens((UIOpts -> f UIOpts) -> UIState -> f UIState)
-> ((CliOpts -> f CliOpts) -> UIOpts -> f UIOpts)
-> (CliOpts -> f CliOpts)
-> UIState
-> f UIState
forall b c a. (b -> c) -> (a -> b) -> a -> c
.(CliOpts -> f CliOpts) -> UIOpts -> f UIOpts
forall c. HasCliOpts c => Lens' c CliOpts
Lens' UIOpts CliOpts
cliOpts
instance HasInputOpts UIState where
inputOpts :: Lens' UIState InputOpts
inputOpts = (UIOpts -> f UIOpts) -> UIState -> f UIState
forall {f :: * -> *}.
Functor f =>
(UIOpts -> f UIOpts) -> UIState -> f UIState
uioptslens((UIOpts -> f UIOpts) -> UIState -> f UIState)
-> ((InputOpts -> f InputOpts) -> UIOpts -> f UIOpts)
-> (InputOpts -> f InputOpts)
-> UIState
-> f UIState
forall b c a. (b -> c) -> (a -> b) -> a -> c
.(InputOpts -> f InputOpts) -> UIOpts -> f UIOpts
forall c. HasInputOpts c => Lens' c InputOpts
Lens' UIOpts InputOpts
inputOpts
instance HasBalancingOpts UIState where
balancingOpts :: Lens' UIState BalancingOpts
balancingOpts = (UIOpts -> f UIOpts) -> UIState -> f UIState
forall {f :: * -> *}.
Functor f =>
(UIOpts -> f UIOpts) -> UIState -> f UIState
uioptslens((UIOpts -> f UIOpts) -> UIState -> f UIState)
-> ((BalancingOpts -> f BalancingOpts) -> UIOpts -> f UIOpts)
-> (BalancingOpts -> f BalancingOpts)
-> UIState
-> f UIState
forall b c a. (b -> c) -> (a -> b) -> a -> c
.(BalancingOpts -> f BalancingOpts) -> UIOpts -> f UIOpts
forall c. HasBalancingOpts c => Lens' c BalancingOpts
Lens' UIOpts BalancingOpts
balancingOpts
instance HasReportSpec UIState where
reportSpec :: Lens' UIState ReportSpec
reportSpec = (UIOpts -> f UIOpts) -> UIState -> f UIState
forall {f :: * -> *}.
Functor f =>
(UIOpts -> f UIOpts) -> UIState -> f UIState
uioptslens((UIOpts -> f UIOpts) -> UIState -> f UIState)
-> ((ReportSpec -> f ReportSpec) -> UIOpts -> f UIOpts)
-> (ReportSpec -> f ReportSpec)
-> UIState
-> f UIState
forall b c a. (b -> c) -> (a -> b) -> a -> c
.(ReportSpec -> f ReportSpec) -> UIOpts -> f UIOpts
forall c. HasReportSpec c => Lens' c ReportSpec
Lens' UIOpts ReportSpec
reportSpec
instance HasReportOptsNoUpdate UIState where
reportOptsNoUpdate :: Lens' UIState ReportOpts
reportOptsNoUpdate = (UIOpts -> f UIOpts) -> UIState -> f UIState
forall {f :: * -> *}.
Functor f =>
(UIOpts -> f UIOpts) -> UIState -> f UIState
uioptslens((UIOpts -> f UIOpts) -> UIState -> f UIState)
-> ((ReportOpts -> f ReportOpts) -> UIOpts -> f UIOpts)
-> (ReportOpts -> f ReportOpts)
-> UIState
-> f UIState
forall b c a. (b -> c) -> (a -> b) -> a -> c
.(ReportOpts -> f ReportOpts) -> UIOpts -> f UIOpts
forall c. HasReportOptsNoUpdate c => Lens' c ReportOpts
Lens' UIOpts ReportOpts
reportOptsNoUpdate
instance HasReportOpts UIState where
reportOpts :: ReportableLens' UIState ReportOpts
reportOpts = (UIOpts -> f UIOpts) -> UIState -> f UIState
forall {f :: * -> *}.
Functor f =>
(UIOpts -> f UIOpts) -> UIState -> f UIState
uioptslens((UIOpts -> f UIOpts) -> UIState -> f UIState)
-> ((ReportOpts -> f ReportOpts) -> UIOpts -> f UIOpts)
-> (ReportOpts -> f ReportOpts)
-> UIState
-> f UIState
forall b c a. (b -> c) -> (a -> b) -> a -> c
.(ReportOpts -> f ReportOpts) -> UIOpts -> f UIOpts
forall a. HasReportOpts a => ReportableLens' a ReportOpts
ReportableLens' UIOpts ReportOpts
reportOpts