summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJohn Soo <jsoo1@asu.edu>2021-10-31 20:04:48 -0700
committerJohn Soo <jsoo1@asu.edu>2021-11-07 17:49:07 -0800
commitfbb987b3c24b296697d7495048bcd272a63b6533 (patch)
treecfa8afee987c464162eb455f56e821defd5d5844
parent45f5d80798806a21a693913291ea8c79c07c1e1b (diff)
downloadxmobar-fbb987b3c24b296697d7495048bcd272a63b6533.tar.gz
xmobar-fbb987b3c24b296697d7495048bcd272a63b6533.tar.bz2
Add details to error message regarding purpose of `signal` field.
-rw-r--r--src/Xmobar/Config/Parse.hs3
-rw-r--r--src/Xmobar/Config/Types.hs2
2 files changed, 3 insertions, 2 deletions
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 <tmvar>)"