aboutsummaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Internal.hs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-27 18:52:25 +0100
committertv <tv@krebsco.de>2019-01-27 18:52:25 +0100
commit4d85ce5584c5bc69b402b7d3b94c623f37ea69f5 (patch)
treeeb1b5b01b521b7d8c695384f3e731413a0f5689a /src/Reaktor/Internal.hs
parent32ddebc0309a73c50e0f1974b4f9435fce3f86c9 (diff)
src: replace all undefined with typeMismatch
Diffstat (limited to 'src/Reaktor/Internal.hs')
-rw-r--r--src/Reaktor/Internal.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Reaktor/Internal.hs b/src/Reaktor/Internal.hs
index 09dd723..66e00af 100644
--- a/src/Reaktor/Internal.hs
+++ b/src/Reaktor/Internal.hs
@@ -6,6 +6,7 @@ module Reaktor.Internal where
import Prelude.Extended
import Blessings
import Data.Aeson
+import Data.Aeson.Types (typeMismatch)
import Data.String.Conversions (convertString)
import qualified Data.Text as T
import Network.Socket as Exports (HostName,ServiceName)
@@ -47,7 +48,7 @@ instance FromJSON Config where
cLogHandle <- pure (cLogHandle def)
cLogTime <- v .:? "logTime" .!= cLogTime def
pure Config{..}
- _ -> undefined
+ invalid -> typeMismatch "Config" invalid
where
tlsPort :: ServiceName
tlsPort = "6697"