projects
/
ganeti-local
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad1c1e4
)
Simplify a bit the FilterRegex JSON instance
author
Iustin Pop
<iustin@google.com>
Mon, 10 Dec 2012 08:46:43 +0000
(09:46 +0100)
committer
Iustin Pop
<iustin@google.com>
Mon, 17 Dec 2012 11:29:53 +0000
(12:29 +0100)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
htools/Ganeti/Query/Language.hs
patch
|
blob
|
history
diff --git
a/htools/Ganeti/Query/Language.hs
b/htools/Ganeti/Query/Language.hs
index
f074439
..
6987c7d
100644
(file)
--- 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