From 4d85ce5584c5bc69b402b7d3b94c623f37ea69f5 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 18:52:25 +0100 Subject: src: replace all undefined with typeMismatch --- src/Reaktor/Internal.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Reaktor/Internal.hs') 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" -- cgit v1.2.3