úÎBû=ß:      !"#$%&'()*+,-./0123456789Safe%&*,0123469:;<=?DOQRT:Repeat f zero or more timesÿtNote that this is a free monad construction, but the difference is in the MonadPlus instead. We regard successive PSucc applications to indicate "more success". This is very useful in parser construction: if all parsers for all constructors fail immediately, we want to show an error message for all the top-level parsers ("expected T1 or T2 .."). But if the parser for T1, say, success in parsing the tag for T1, then we don't want to try any more parsers for other constructors even if the parser for T1 now fails in parsing the arguments of T1. Instead, we want to give the error message about attempting to parse T1. :;<=>?@ABCDEF:;<=>? :;<=>?@ABCDENone%&*+,0123469:;<=?DOQRT ÿ;For some values we can support "updating" the value with a "partial" JSON value; record types are the prime example (and the only one supported by the generic function). For non-record types we typically can only replace the value with a "complete" JSON value; in this case, we simply ignore the old value (see "*). Typical class instances will look like ^instance UpdateFromJSON SomeRecordType where updateFromJSON = gupdateFromJSON <jsonOptions>or Sinstance UpdateFromJSON SomeNonRecordType where updateFromJSON = replaceWithJSON˜NOTE: The generic function uses one-level lenses for the object fields. We could generalize this to arbitrary paths, but then the type would change to 2updateFromJSON :: Value -> Parser (a -> UpdateM a)NI.e., updating a value from JSON would, in general, involve a database write.Constructor tag“For a datatype with a single constructor we do not need to tag values with their constructor; but for a datatype with multiple constructors we do."JSON encoder/decoder configurationbConstruct the name for JSON object fields (not for the tags that are used for sum-types, however)GThe default just uses the name of the corresponding Haskell constructor+Construct the name for a tag for sum-types.:The default just uses the name of the Haskell constructor.G¹Given information about a constructor, check if the given value has the right shape, and if so, return a product of (still encoded) values for each of the arguments of the constructor"MFor types that we can only replace "whole", rather than update field by field#HConversely, for types that we can only parse if we have a starting point$ŒConstruct a function that updates a value of some record type, given a JSON object with new values for some (or none, or all) of the fieldsHÐGiven a product of keys in a particular order, and a list of values indexed by keys, reorder the second list in the order specified by the first list. Unexpected keys make the whole thing fail (outer monad m+); missing keys make the inner monad fail m'.(The following are instances of this type ”NP (K String) xs -> [(String, Value)] -> Parser (NP (K (Parser Value)) xs) NP (K String) xs -> [(String, Value)] -> Parser (NP (K (Maybe Value)) xs)lThe first form is useful when all fields of a record need to be present; the second when they are optional.I0Error message for a missing key (used in lineup)J5Remove the first element that satisfies the predicate3K L!MNGO"#$PHIJQRSTUVWXYZ-The name of the type you are trying to parse.The actual value encountered.%&'()*+,!  !"#$# !$"# )K L!MNGO"#$PHIJQRSTUVWXYZ%&'()*+,None%&*,0123469:;<=?DOQRT/%Generic computation of the JSON model?Do NOT use for recursive types, you will get an infinite model.-./[\]^_`abc0123456789 -./-./ -./[\]^_`abc0123456789d       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl&json-sop-0.2.0.2-4v3j0ndv8GT11kgQZhQ74Generics.SOP.JSONGenerics.SOP.JSON.ModelGenerics.SOP.Util.PartialResult$aeson-1.1.2.0-8Bbu4LUWABUC58FIY0dgenData.Aeson.Types.ToJSONtoEncodingList toJSONList toEncodingtoJSONToJSONData.Aeson.Types.FromJSON parseJSONList parseJSONFromJSONbase Data.ProxyProxy#tagged-0.8.5-HBjpONNM7bk4tkR2ik8YoD Data.TaggeduntagunTaggedTaggedUpdateFromJSONupdateFromJSONJsonInfoJsonZeroJsonOne JsonMultiple JsonRecordTagNoTag JsonOptions jsonFieldName jsonTagName JsonTagName JsonFieldNamedefaultJsonOptionsjsonInfogtoJSON gparseJSONreplaceWithJSON parseWithgupdateFromJSON$fUpdateFromJSON[]$fUpdateFromJSONText$fUpdateFromJSONBool$fUpdateFromJSONRatio$fUpdateFromJSONDouble$fUpdateFromJSONInt$fUpdateFromJSONMaybe$fUpdateFromJSON[]0 JsonModel jsonModel gjsonModel$fJsonModelMaybe $fJsonModel[]$fJsonModelBool$fJsonModelRatio$fJsonModelDouble$fJsonModelInt$fJsonModel[]0$fJsonModelText$fJsonModelText0$fJsonModelUTCTimePartialFailPZeroPSucc partialResult runPartial$fAlternativePartial$fApplicativePartial$fMonadTransPartial$fMonadPlusPartial$fMonadPartial$fFunctorPartialtransformers-0.5.2.0Control.Monad.Trans.Classlift parseValueslineup missingKeyremove jsonInfoForgtoJSON' gparseJSON'parseConstructor gupdateRecordtagValueptallptpfallpfpu withObjectwithText withArray typeMismatch gjsonModel'constructorModel tupleModel objectModelconstructorModelOne jsonModelKtagModelpallp