From bb733cd6da555791389d3b606d618f67e5ef3a42 Mon Sep 17 00:00:00 2001 From: Jon Kristensen Date: Thu, 14 Jun 2012 20:05:13 +0200 Subject: [PATCH] fromJust patch analogous to the last one --- source/Network/Xmpp/Types.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Network/Xmpp/Types.hs b/source/Network/Xmpp/Types.hs index a9e1c62..704e4ca 100644 --- a/source/Network/Xmpp/Types.hs +++ b/source/Network/Xmpp/Types.hs @@ -565,7 +565,7 @@ instance Ord Version where | otherwise = compare aminor bminor instance Read Version where - readsPrec _ txt = [(fromJust $ versionFromText $ Text.pack txt, "")] + readsPrec _ txt = (,"") <$> maybeToList (versionFromText $ Text.pack txt) instance Show Version where show (Version major minor) = (show major) ++ "." ++ (show minor)