packages feed

hydra-kernel-0.18.1: src/main/haskell/Hydra/Core/Dsl/Json/Decoding.hs

-- Note: this is an automatically generated file. Do not edit.

-- | DSL functions for hydra.core.json.decoding

module Hydra.Core.Dsl.Json.Decoding where

import qualified Hydra.Core.Dsl.Json.Model as DslJsonModel
import qualified Hydra.Core.Dsl.Lib.Eithers as Eithers
import qualified Hydra.Core.Dsl.Lib.Maps as Maps
import qualified Hydra.Core.Dsl.Lib.Optionals as Optionals
import qualified Hydra.Core.Dsl.Lib.Strings as Strings
import qualified Hydra.Core.Json.Decoding as Decoding
import qualified Hydra.Core.Json.Model as JsonModel
import qualified Hydra.Core.Model as Model
import qualified Hydra.Core.Typed as Typed
import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, lines, map, pure, sum, unlines)
import qualified Data.Scientific as Sci
import Data.Void
import qualified Data.Map as M

-- | DSL reference to hydra.core.json.decoding.decodeArray
decodeArray :: Typed.TypedTerm (JsonModel.Value -> Either String t0) -> Typed.TypedTerm JsonModel.Value -> Typed.TypedTerm (Either String [t0])
decodeArray arg0 arg1 =
    Typed.TypedTerm (Model.TermApplication (Model.Application {
      Model.applicationFunction = (Model.TermApplication (Model.Application {
        Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.json.decoding.decodeArray")),
        Model.applicationArgument = (Typed.unTypedTerm arg0)})),
      Model.applicationArgument = (Typed.unTypedTerm arg1)}))

-- | DSL reference to hydra.core.json.decoding.decodeBoolean
decodeBoolean :: Typed.TypedTerm JsonModel.Value -> Typed.TypedTerm (Either String Bool)
decodeBoolean arg0 =
    Typed.TypedTerm (Model.TermApplication (Model.Application {
      Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.json.decoding.decodeBoolean")),
      Model.applicationArgument = (Typed.unTypedTerm arg0)}))

-- | DSL reference to hydra.core.json.decoding.decodeField
decodeField :: Typed.TypedTerm (t0 -> Either String t1) -> Typed.TypedTerm String -> Typed.TypedTerm (M.Map String t0) -> Typed.TypedTerm (Either String t1)
decodeField arg0 arg1 arg2 =
    Typed.TypedTerm (Model.TermApplication (Model.Application {
      Model.applicationFunction = (Model.TermApplication (Model.Application {
        Model.applicationFunction = (Model.TermApplication (Model.Application {
          Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.json.decoding.decodeField")),
          Model.applicationArgument = (Typed.unTypedTerm arg0)})),
        Model.applicationArgument = (Typed.unTypedTerm arg1)})),
      Model.applicationArgument = (Typed.unTypedTerm arg2)}))

-- | DSL reference to hydra.core.json.decoding.decodeObject
decodeObject :: Typed.TypedTerm JsonModel.Value -> Typed.TypedTerm (Either String (M.Map String JsonModel.Value))
decodeObject arg0 =
    Typed.TypedTerm (Model.TermApplication (Model.Application {
      Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.json.decoding.decodeObject")),
      Model.applicationArgument = (Typed.unTypedTerm arg0)}))

-- | DSL reference to hydra.core.json.decoding.decodeOptionalField
decodeOptionalField :: Typed.TypedTerm (t0 -> Either t1 t2) -> Typed.TypedTerm t3 -> Typed.TypedTerm (M.Map t3 t0) -> Typed.TypedTerm (Either t1 (Maybe t2))
decodeOptionalField arg0 arg1 arg2 =
    Typed.TypedTerm (Model.TermApplication (Model.Application {
      Model.applicationFunction = (Model.TermApplication (Model.Application {
        Model.applicationFunction = (Model.TermApplication (Model.Application {
          Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.json.decoding.decodeOptionalField")),
          Model.applicationArgument = (Typed.unTypedTerm arg0)})),
        Model.applicationArgument = (Typed.unTypedTerm arg1)})),
      Model.applicationArgument = (Typed.unTypedTerm arg2)}))

-- | DSL reference to hydra.core.json.decoding.decodeString
decodeString :: Typed.TypedTerm JsonModel.Value -> Typed.TypedTerm (Either String String)
decodeString arg0 =
    Typed.TypedTerm (Model.TermApplication (Model.Application {
      Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.json.decoding.decodeString")),
      Model.applicationArgument = (Typed.unTypedTerm arg0)}))