« Previous | Next » 

Revision e8230242

IDe823024266ff0b181cbe282373966360bb499a75

Added by Iustin Pop over 13 years ago

JSON functions: change signature of (maybe)fromObj

Currently, fromObj/maybeFromObj take first the key, and then the
object. This is suboptimal, as this form is not easy to use with
partial functional application.

To make it easier to switch between tryFromObj, fromObj and
maybeFromObj, we unify the latter two functions to the same order
(object and then key) like the first one. The code churn in the other
modules is due to this, but the main change in this patch is in
Utils.hs.

Furthermore, since we change anyway the calls, we do replace fromObj
with tryFromObj in IAllocator.hs so that we get better error messages.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences