diff --git a/lib/ghcitui-core/Ghcitui/Ghcid/Daemon.hs b/lib/ghcitui-core/Ghcitui/Ghcid/Daemon.hs index c905bb0..22799fa 100644 --- a/lib/ghcitui-core/Ghcitui/Ghcid/Daemon.hs +++ b/lib/ghcitui-core/Ghcitui/Ghcid/Daemon.hs @@ -73,7 +73,7 @@ import Ghcitui.Util (showT) import qualified Ghcitui.Util as Util data InterpState a = InterpState - { _ghci :: Ghcid.Ghci + { _ghci :: !Ghcid.Ghci -- ^ GHCiD handle. , func :: !(Maybe T.Text) -- ^ Current pause position function name. @@ -81,11 +81,11 @@ data InterpState a = InterpState -- ^ Current pause position. , moduleFileMap :: !Loc.ModuleFileMap -- ^ Mapping between modules and their filepaths. - , stack :: [T.Text] + , stack :: ![T.Text] -- ^ Program stack (only available during tracing). - , breakpoints :: [(Int, Loc.ModuleLoc)] + , breakpoints :: ![(Int, Loc.ModuleLoc)] -- ^ Currently set breakpoint locations. - , bindings :: Either DaemonError [NameBinding.NameBinding T.Text] + , bindings :: !(Either DaemonError [NameBinding.NameBinding T.Text]) -- ^ Current context value bindings. , status :: !(Either T.Text a) -- ^ IDK? I had an idea here at one point. @@ -108,7 +108,7 @@ instance Show (InterpState a) where srcRngFmt = [i|{sourceRange=(#{startLine},#{startCol})-(#{endLine},#{endCol})}|] in [i|{func=#{func'}, filepath=#{filepath'}, #{srcRngFmt}}|] - _ -> "" :: String + Nothing -> "" :: String in msg {- | Create an empty/starting interpreter state. @@ -183,7 +183,7 @@ startupStreamCallback stream msg = do -- | Shut down the GHCi Daemon. quit :: InterpState a -> IO (InterpState a) quit state = do - Ghcid.quit (state._ghci) + Ghcid.quit state._ghci pure state -- | Update the interpreter state. Wrapper around other updaters. @@ -358,7 +358,7 @@ data BreakpointArg = -- | Location in the current file. LocalLine !Int | -- | Location in a module. - ModLoc Loc.ModuleLoc + ModLoc !Loc.ModuleLoc deriving (Show, Eq, Ord) -- | Toggle a breakpoint (disable/enable) at a given location. @@ -516,11 +516,11 @@ logHelper outputLoc prefix msg = do -- Misc data DaemonError - = GenericError T.Text - | UpdateBindingError T.Text - | UpdateBreakListError T.Text - | BreakpointError T.Text - | UpdateContextError T.Text + = GenericError !T.Text + | UpdateBindingError !T.Text + | UpdateBreakListError !T.Text + | BreakpointError !T.Text + | UpdateContextError !T.Text deriving (Eq, Show) {- | An IO operation that can fail into a DaemonError. diff --git a/lib/ghcitui-core/Ghcitui/Ghcid/LogConfig.hs b/lib/ghcitui-core/Ghcitui/Ghcid/LogConfig.hs index ea98519..8f493d2 100644 --- a/lib/ghcitui-core/Ghcitui/Ghcid/LogConfig.hs +++ b/lib/ghcitui-core/Ghcitui/Ghcid/LogConfig.hs @@ -4,4 +4,4 @@ module Ghcitui.Ghcid.LogConfig where newtype LogLevel = LogLevel Int deriving (Eq, Ord, Show) -- | Determines where the daemon logs are written. -data LogOutput = LogOutputStdOut | LogOutputStdErr | LogOutputFile FilePath deriving (Show) +data LogOutput = LogOutputStdOut | LogOutputStdErr | LogOutputFile !FilePath deriving (Show)