From fbb987b3c24b296697d7495048bcd272a63b6533 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sun, 31 Oct 2021 20:04:48 -0700 Subject: Add details to error message regarding purpose of `signal` field. --- src/Xmobar/Config/Parse.hs | 3 ++- src/Xmobar/Config/Types.hs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Xmobar/Config') diff --git a/src/Xmobar/Config/Parse.hs b/src/Xmobar/Config/Parse.hs index 123d00d..f7c8b31 100644 --- a/src/Xmobar/Config/Parse.hs +++ b/src/Xmobar/Config/Parse.hs @@ -106,7 +106,8 @@ parseConfig defaultConfig = pAlpha = readField alpha "alpha" pVerbose = readField verbose "verbose" - pSignal = field signal "signal" $ fail "use default signal" + pSignal = field signal "signal" $ + fail "signal is meant for use with Xmobar as a library.\n It is not meant for use in the configuration file." pCommands = field commands "commands" readCommands diff --git a/src/Xmobar/Config/Types.hs b/src/Xmobar/Config/Types.hs index dd5aeb8..8bbae40 100644 --- a/src/Xmobar/Config/Types.hs +++ b/src/Xmobar/Config/Types.hs @@ -99,7 +99,7 @@ data Border = NoBorder newtype SignalChan = SignalChan { unSignalChan :: Maybe (STM.TMVar SignalType) } instance Read SignalChan where - readsPrec _ _ = fail "Trying to read a SignalChan" + readsPrec _ _ = fail "SignalChan is not readable from a String" instance Show SignalChan where show (SignalChan (Just _)) = "SignalChan (Just )" -- cgit v1.2.3