module Ghcitui.Brick.AppTopLevel (AppName (..), CustomAppEvent (..)) where
import qualified Data.Text as T
import qualified Ghcitui.Loc as Loc
data AppName
= GHCiTUI
| CodeViewport
| SourceWindowLine Int
| DebugPanel
| LiveInterpreter
| LiveInterpreterViewport
| HelpViewport
| BindingViewport
| ModulesViewport
| TraceViewport
|
SourceList
deriving (AppName -> AppName -> Bool
(AppName -> AppName -> Bool)
-> (AppName -> AppName -> Bool) -> Eq AppName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AppName -> AppName -> Bool
== :: AppName -> AppName -> Bool
$c/= :: AppName -> AppName -> Bool
/= :: AppName -> AppName -> Bool
Eq, Int -> AppName -> ShowS
[AppName] -> ShowS
AppName -> String
(Int -> AppName -> ShowS)
-> (AppName -> String) -> ([AppName] -> ShowS) -> Show AppName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AppName -> ShowS
showsPrec :: Int -> AppName -> ShowS
$cshow :: AppName -> String
show :: AppName -> String
$cshowList :: [AppName] -> ShowS
showList :: [AppName] -> ShowS
Show, Eq AppName
Eq AppName =>
(AppName -> AppName -> Ordering)
-> (AppName -> AppName -> Bool)
-> (AppName -> AppName -> Bool)
-> (AppName -> AppName -> Bool)
-> (AppName -> AppName -> Bool)
-> (AppName -> AppName -> AppName)
-> (AppName -> AppName -> AppName)
-> Ord AppName
AppName -> AppName -> Bool
AppName -> AppName -> Ordering
AppName -> AppName -> AppName
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 :: AppName -> AppName -> Ordering
compare :: AppName -> AppName -> Ordering
$c< :: AppName -> AppName -> Bool
< :: AppName -> AppName -> Bool
$c<= :: AppName -> AppName -> Bool
<= :: AppName -> AppName -> Bool
$c> :: AppName -> AppName -> Bool
> :: AppName -> AppName -> Bool
$c>= :: AppName -> AppName -> Bool
>= :: AppName -> AppName -> Bool
$cmax :: AppName -> AppName -> AppName
max :: AppName -> AppName -> AppName
$cmin :: AppName -> AppName -> AppName
min :: AppName -> AppName -> AppName
Ord)
type AppEventCmd = T.Text
type AppEventLogs = [T.Text]
type AppEventPrefix = T.Text
type AppEventCompletions = [T.Text]
data CustomAppEvent state
= ErrorOnCb state T.Text
| StepCb state
| BreakpointCb state Loc.ModuleLoc
| ReplExecCb state AppEventCmd AppEventLogs
| ReplTabCompleteCb state AppEventCmd (AppEventPrefix, AppEventCompletions)
deriving (CustomAppEvent state -> CustomAppEvent state -> Bool
(CustomAppEvent state -> CustomAppEvent state -> Bool)
-> (CustomAppEvent state -> CustomAppEvent state -> Bool)
-> Eq (CustomAppEvent state)
forall state.
Eq state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall state.
Eq state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
== :: CustomAppEvent state -> CustomAppEvent state -> Bool
$c/= :: forall state.
Eq state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
/= :: CustomAppEvent state -> CustomAppEvent state -> Bool
Eq, Int -> CustomAppEvent state -> ShowS
[CustomAppEvent state] -> ShowS
CustomAppEvent state -> String
(Int -> CustomAppEvent state -> ShowS)
-> (CustomAppEvent state -> String)
-> ([CustomAppEvent state] -> ShowS)
-> Show (CustomAppEvent state)
forall state. Show state => Int -> CustomAppEvent state -> ShowS
forall state. Show state => [CustomAppEvent state] -> ShowS
forall state. Show state => CustomAppEvent state -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall state. Show state => Int -> CustomAppEvent state -> ShowS
showsPrec :: Int -> CustomAppEvent state -> ShowS
$cshow :: forall state. Show state => CustomAppEvent state -> String
show :: CustomAppEvent state -> String
$cshowList :: forall state. Show state => [CustomAppEvent state] -> ShowS
showList :: [CustomAppEvent state] -> ShowS
Show, Eq (CustomAppEvent state)
Eq (CustomAppEvent state) =>
(CustomAppEvent state -> CustomAppEvent state -> Ordering)
-> (CustomAppEvent state -> CustomAppEvent state -> Bool)
-> (CustomAppEvent state -> CustomAppEvent state -> Bool)
-> (CustomAppEvent state -> CustomAppEvent state -> Bool)
-> (CustomAppEvent state -> CustomAppEvent state -> Bool)
-> (CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state)
-> (CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state)
-> Ord (CustomAppEvent state)
CustomAppEvent state -> CustomAppEvent state -> Bool
CustomAppEvent state -> CustomAppEvent state -> Ordering
CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state
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
forall state. Ord state => Eq (CustomAppEvent state)
forall state.
Ord state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
forall state.
Ord state =>
CustomAppEvent state -> CustomAppEvent state -> Ordering
forall state.
Ord state =>
CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state
$ccompare :: forall state.
Ord state =>
CustomAppEvent state -> CustomAppEvent state -> Ordering
compare :: CustomAppEvent state -> CustomAppEvent state -> Ordering
$c< :: forall state.
Ord state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
< :: CustomAppEvent state -> CustomAppEvent state -> Bool
$c<= :: forall state.
Ord state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
<= :: CustomAppEvent state -> CustomAppEvent state -> Bool
$c> :: forall state.
Ord state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
> :: CustomAppEvent state -> CustomAppEvent state -> Bool
$c>= :: forall state.
Ord state =>
CustomAppEvent state -> CustomAppEvent state -> Bool
>= :: CustomAppEvent state -> CustomAppEvent state -> Bool
$cmax :: forall state.
Ord state =>
CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state
max :: CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state
$cmin :: forall state.
Ord state =>
CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state
min :: CustomAppEvent state
-> CustomAppEvent state -> CustomAppEvent state
Ord)