From a1d137f68cd29d9af269f69cb32289792adaefd4 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 10 Dec 2012 09:46:43 +0100 Subject: [PATCH] Simplify a bit the FilterRegex JSON instance Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> --- htools/Ganeti/Query/Language.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htools/Ganeti/Query/Language.hs b/htools/Ganeti/Query/Language.hs index f07443998..6987c7d70 100644 --- a/htools/Ganeti/Query/Language.hs +++ b/htools/Ganeti/Query/Language.hs @@ -357,9 +357,7 @@ instance Eq FilterRegex where -- with the string component. instance JSON FilterRegex where showJSON (FilterRegex re _) = showJSON re - readJSON s = do - re <- readJSON s - mkRegex re + readJSON s = readJSON s >>= mkRegex -- | Name of a field. type FieldName = String -- GitLab