Revision 7a51281a src/Ganeti/THH.hs
b/src/Ganeti/THH.hs | ||
---|---|---|
237 | 237 |
-> [(String, JSON.JSValue)] -> JSON.JSValue -> JSON.Result a |
238 | 238 |
numericalReadFn _ _ v@(JSON.JSRational _ _) = JSON.readJSON v |
239 | 239 |
numericalReadFn f _ (JSON.JSString x) = f $ JSON.fromJSString x |
240 |
numericalReadFn _ _ _ = JSON.Error "A numerical field has to be a number or\
|
|
240 |
numericalReadFn _ _ _ = JSON.Error "A numerical field has to be a number or\ |
|
241 | 241 |
\ a string." |
242 | 242 |
|
243 | 243 |
-- | Sets the read function to also accept string parsable by the given |
Also available in: Unified diff