From 040e7bce798cb13ac2846bbc8afe1eee4efa57b9 Mon Sep 17 00:00:00 2001 From: CrystalSplitter Date: Sat, 16 Mar 2024 00:02:01 -0700 Subject: [PATCH] Add deriving Show to various data types Mostly for better debugging. --- lib/ghcitui-brick/Ghcitui/Brick/AppConfig.hs | 2 +- lib/ghcitui-brick/Ghcitui/Brick/AppInterpState.hs | 2 +- lib/ghcitui-brick/Ghcitui/Brick/AppState.hs | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ghcitui-brick/Ghcitui/Brick/AppConfig.hs b/lib/ghcitui-brick/Ghcitui/Brick/AppConfig.hs index e7ec5b9..4284dd9 100644 --- a/lib/ghcitui-brick/Ghcitui/Brick/AppConfig.hs +++ b/lib/ghcitui-brick/Ghcitui/Brick/AppConfig.hs @@ -43,7 +43,7 @@ data AppConfig = AppConfig -- ^ Command to run to initialise the interpreter. , getStartupCommands :: ![T.Text] -- ^ Commands to run in ghci during start up. - } + } deriving (Show) defaultConfig :: AppConfig defaultConfig = diff --git a/lib/ghcitui-brick/Ghcitui/Brick/AppInterpState.hs b/lib/ghcitui-brick/Ghcitui/Brick/AppInterpState.hs index 2176ede..ca0050f 100644 --- a/lib/ghcitui-brick/Ghcitui/Brick/AppInterpState.hs +++ b/lib/ghcitui-brick/Ghcitui/Brick/AppInterpState.hs @@ -32,7 +32,7 @@ data AppInterpState s n = AppInterpState , _cmdHistory :: ![[s]] , historyPos :: !Int -- ^ Current position - } + } deriving (Show) -- | Lens accessor for the editor. See '_liveEditor'. liveEditor :: Lens.Lens' (AppInterpState s n) (BE.Editor s n) diff --git a/lib/ghcitui-brick/Ghcitui/Brick/AppState.hs b/lib/ghcitui-brick/Ghcitui/Brick/AppState.hs index ed20c5d..a8fd86f 100644 --- a/lib/ghcitui-brick/Ghcitui/Brick/AppState.hs +++ b/lib/ghcitui-brick/Ghcitui/Brick/AppState.hs @@ -67,6 +67,7 @@ data WidgetSizes = WidgetSizes { _wsInfoWidth :: !Int , _wsReplHeight :: !Int } + deriving (Show) {- | Application state wrapper. @@ -106,6 +107,7 @@ data AppState n = AppState , splashContents :: !(Maybe T.Text) -- ^ Splash to show on start up. } + deriving (Show) newtype AppStateM m a = AppStateM {runAppStateM :: m a}