diff --git a/htools/Ganeti/Query/Language.hs b/htools/Ganeti/Query/Language.hs index f074439981a78db391bb2061086866a3bba37521..6987c7d7009aedea7ebd7049b74723e4153c5837 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