module Chiasma.Codec.Data.PaneCoords where import Chiasma.Codec (TmuxCodec) import Chiasma.Data.TmuxId (HasPaneId, PaneId, SessionId, WindowId) import qualified Chiasma.Data.TmuxId as HasPaneId (HasPaneId (..)) data PaneCoords = PaneCoords { PaneCoords -> SessionId sessionId :: SessionId, PaneCoords -> WindowId windowId :: WindowId, PaneCoords -> PaneId paneId :: PaneId } deriving stock (PaneCoords -> PaneCoords -> Bool (PaneCoords -> PaneCoords -> Bool) -> (PaneCoords -> PaneCoords -> Bool) -> Eq PaneCoords forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: PaneCoords -> PaneCoords -> Bool == :: PaneCoords -> PaneCoords -> Bool $c/= :: PaneCoords -> PaneCoords -> Bool /= :: PaneCoords -> PaneCoords -> Bool Eq, Int -> PaneCoords -> ShowS [PaneCoords] -> ShowS PaneCoords -> String (Int -> PaneCoords -> ShowS) -> (PaneCoords -> String) -> ([PaneCoords] -> ShowS) -> Show PaneCoords forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> PaneCoords -> ShowS showsPrec :: Int -> PaneCoords -> ShowS $cshow :: PaneCoords -> String show :: PaneCoords -> String $cshowList :: [PaneCoords] -> ShowS showList :: [PaneCoords] -> ShowS Show, (forall x. PaneCoords -> Rep PaneCoords x) -> (forall x. Rep PaneCoords x -> PaneCoords) -> Generic PaneCoords forall x. Rep PaneCoords x -> PaneCoords forall x. PaneCoords -> Rep PaneCoords x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. PaneCoords -> Rep PaneCoords x from :: forall x. PaneCoords -> Rep PaneCoords x $cto :: forall x. Rep PaneCoords x -> PaneCoords to :: forall x. Rep PaneCoords x -> PaneCoords Generic) deriving anyclass (TmuxQuery Text -> Either DecodeError PaneCoords (Text -> Either DecodeError PaneCoords) -> TmuxQuery -> TmuxCodec PaneCoords forall a. (Text -> Either DecodeError a) -> TmuxQuery -> TmuxCodec a $cdecode :: Text -> Either DecodeError PaneCoords decode :: Text -> Either DecodeError PaneCoords $cquery :: TmuxQuery query :: TmuxQuery TmuxCodec) instance HasPaneId PaneCoords where paneId :: PaneCoords -> PaneId paneId = (.paneId)