module Summoner.Mode
( Interactivity (..)
, isNonInteractive
, ConnectMode (..)
, isOffline
) where
data Interactivity
= Interactive
| NonInteractive
deriving stock (Int -> Interactivity -> ShowS
[Interactivity] -> ShowS
Interactivity -> String
(Int -> Interactivity -> ShowS)
-> (Interactivity -> String)
-> ([Interactivity] -> ShowS)
-> Show Interactivity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Interactivity] -> ShowS
$cshowList :: [Interactivity] -> ShowS
show :: Interactivity -> String
$cshow :: Interactivity -> String
showsPrec :: Int -> Interactivity -> ShowS
$cshowsPrec :: Int -> Interactivity -> ShowS
Show, Interactivity -> Interactivity -> Bool
(Interactivity -> Interactivity -> Bool)
-> (Interactivity -> Interactivity -> Bool) -> Eq Interactivity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Interactivity -> Interactivity -> Bool
$c/= :: Interactivity -> Interactivity -> Bool
== :: Interactivity -> Interactivity -> Bool
$c== :: Interactivity -> Interactivity -> Bool
Eq)
isNonInteractive :: Interactivity -> Bool
isNonInteractive :: Interactivity -> Bool
isNonInteractive = \case
NonInteractive -> Bool
True
Interactive -> Bool
False
data ConnectMode
= Online
| Offline
deriving stock (Int -> ConnectMode -> ShowS
[ConnectMode] -> ShowS
ConnectMode -> String
(Int -> ConnectMode -> ShowS)
-> (ConnectMode -> String)
-> ([ConnectMode] -> ShowS)
-> Show ConnectMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectMode] -> ShowS
$cshowList :: [ConnectMode] -> ShowS
show :: ConnectMode -> String
$cshow :: ConnectMode -> String
showsPrec :: Int -> ConnectMode -> ShowS
$cshowsPrec :: Int -> ConnectMode -> ShowS
Show, ConnectMode -> ConnectMode -> Bool
(ConnectMode -> ConnectMode -> Bool)
-> (ConnectMode -> ConnectMode -> Bool) -> Eq ConnectMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectMode -> ConnectMode -> Bool
$c/= :: ConnectMode -> ConnectMode -> Bool
== :: ConnectMode -> ConnectMode -> Bool
$c== :: ConnectMode -> ConnectMode -> Bool
Eq)
isOffline :: ConnectMode -> Bool
isOffline :: ConnectMode -> Bool
isOffline = \case
Offline -> Bool
True
Online -> Bool
False