module Chiasma.Codec.Data.Session where

import Chiasma.Codec (TmuxCodec)
import Chiasma.Data.TmuxId (SessionId)

-- must be data for now because of how derivation of `TmuxCodec` is implemented
data Session =
  Session {
    Session -> SessionId
sessionId :: SessionId
  }
  deriving (Session -> Session -> Bool
(Session -> Session -> Bool)
-> (Session -> Session -> Bool) -> Eq Session
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Session -> Session -> Bool
$c/= :: Session -> Session -> Bool
== :: Session -> Session -> Bool
$c== :: Session -> Session -> Bool
Eq, Int -> Session -> ShowS
[Session] -> ShowS
Session -> String
(Int -> Session -> ShowS)
-> (Session -> String) -> ([Session] -> ShowS) -> Show Session
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Session] -> ShowS
$cshowList :: [Session] -> ShowS
show :: Session -> String
$cshow :: Session -> String
showsPrec :: Int -> Session -> ShowS
$cshowsPrec :: Int -> Session -> ShowS
Show, (forall x. Session -> Rep Session x)
-> (forall x. Rep Session x -> Session) -> Generic Session
forall x. Rep Session x -> Session
forall x. Session -> Rep Session x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Session x -> Session
$cfrom :: forall x. Session -> Rep Session x
Generic, TmuxQuery
Text -> Either TmuxDecodeError Session
(Text -> Either TmuxDecodeError Session)
-> TmuxQuery -> TmuxCodec Session
forall a.
(Text -> Either TmuxDecodeError a) -> TmuxQuery -> TmuxCodec a
query :: TmuxQuery
$cquery :: TmuxQuery
decode :: Text -> Either TmuxDecodeError Session
$cdecode :: Text -> Either TmuxDecodeError Session
TmuxCodec)