arctrl 3.0.0a3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arctrl/__init__.py +18 -0
- arctrl/py/CWL/__init__.py +0 -0
- arctrl/py/CWL/cwltypes.py +150 -0
- arctrl/py/CWL/decode.py +973 -0
- arctrl/py/CWL/encode.py +1 -0
- arctrl/py/CWL/inputs.py +88 -0
- arctrl/py/CWL/outputs.py +85 -0
- arctrl/py/CWL/requirements.py +77 -0
- arctrl/py/CWL/tool_description.py +103 -0
- arctrl/py/CWL/workflow_description.py +104 -0
- arctrl/py/CWL/workflow_steps.py +113 -0
- arctrl/py/Contract/__init__.py +0 -0
- arctrl/py/Contract/arc.py +60 -0
- arctrl/py/Contract/arc_assay.py +125 -0
- arctrl/py/Contract/arc_investigation.py +88 -0
- arctrl/py/Contract/arc_run.py +125 -0
- arctrl/py/Contract/arc_study.py +126 -0
- arctrl/py/Contract/arc_workflow.py +125 -0
- arctrl/py/Contract/contract.py +153 -0
- arctrl/py/Contract/datamap.py +372 -0
- arctrl/py/Contract/git.py +118 -0
- arctrl/py/Contract/validation_packages_config.py +107 -0
- arctrl/py/ContractIO/__init__.py +0 -0
- arctrl/py/ContractIO/contract_io.py +344 -0
- arctrl/py/ContractIO/file_system_helper.py +264 -0
- arctrl/py/Core/Helper/__init__.py +0 -0
- arctrl/py/Core/Helper/collections_.py +438 -0
- arctrl/py/Core/Helper/date_time.py +26 -0
- arctrl/py/Core/Helper/hash_codes.py +60 -0
- arctrl/py/Core/Helper/identifier.py +248 -0
- arctrl/py/Core/Helper/orcid.py +42 -0
- arctrl/py/Core/Helper/printer.py +13 -0
- arctrl/py/Core/Helper/regex.py +554 -0
- arctrl/py/Core/Helper/sem_ver.py +71 -0
- arctrl/py/Core/Helper/url.py +148 -0
- arctrl/py/Core/Process/__init__.py +0 -0
- arctrl/py/Core/Process/column_index.py +280 -0
- arctrl/py/Core/Process/component.py +200 -0
- arctrl/py/Core/Process/factor.py +151 -0
- arctrl/py/Core/Process/factor_value.py +182 -0
- arctrl/py/Core/Process/material.py +74 -0
- arctrl/py/Core/Process/material_attribute.py +95 -0
- arctrl/py/Core/Process/material_attribute_value.py +184 -0
- arctrl/py/Core/Process/material_type.py +45 -0
- arctrl/py/Core/Process/process.py +477 -0
- arctrl/py/Core/Process/process_input.py +265 -0
- arctrl/py/Core/Process/process_output.py +235 -0
- arctrl/py/Core/Process/process_parameter_value.py +200 -0
- arctrl/py/Core/Process/process_sequence.py +435 -0
- arctrl/py/Core/Process/protocol.py +175 -0
- arctrl/py/Core/Process/protocol_parameter.py +98 -0
- arctrl/py/Core/Process/sample.py +82 -0
- arctrl/py/Core/Process/source.py +62 -0
- arctrl/py/Core/Table/__init__.py +0 -0
- arctrl/py/Core/Table/arc_table.py +1264 -0
- arctrl/py/Core/Table/arc_table_aux.py +575 -0
- arctrl/py/Core/Table/arc_tables.py +591 -0
- arctrl/py/Core/Table/composite_cell.py +319 -0
- arctrl/py/Core/Table/composite_column.py +73 -0
- arctrl/py/Core/Table/composite_header.py +739 -0
- arctrl/py/Core/__init__.py +0 -0
- arctrl/py/Core/arc_types.py +5064 -0
- arctrl/py/Core/comment.py +128 -0
- arctrl/py/Core/comment_list.py +127 -0
- arctrl/py/Core/conversion.py +1313 -0
- arctrl/py/Core/data.py +245 -0
- arctrl/py/Core/data_context.py +157 -0
- arctrl/py/Core/data_file.py +112 -0
- arctrl/py/Core/data_map.py +225 -0
- arctrl/py/Core/identifier_setters.py +31 -0
- arctrl/py/Core/iproperty_value.py +36 -0
- arctrl/py/Core/ontology_annotation.py +299 -0
- arctrl/py/Core/ontology_source_reference.py +114 -0
- arctrl/py/Core/person.py +259 -0
- arctrl/py/Core/publication.py +161 -0
- arctrl/py/Core/template.py +231 -0
- arctrl/py/Core/templates.py +148 -0
- arctrl/py/Core/uri.py +11 -0
- arctrl/py/Core/value.py +188 -0
- arctrl/py/FileSystem/__init__.py +0 -0
- arctrl/py/FileSystem/commit.py +21 -0
- arctrl/py/FileSystem/default_gitattributes.py +5 -0
- arctrl/py/FileSystem/default_gitignore.py +5 -0
- arctrl/py/FileSystem/file_system.py +58 -0
- arctrl/py/FileSystem/file_system_tree.py +426 -0
- arctrl/py/FileSystem/path.py +64 -0
- arctrl/py/Json/DataMap/__init__.py +0 -0
- arctrl/py/Json/DataMap/data_context.py +101 -0
- arctrl/py/Json/DataMap/data_map.py +53 -0
- arctrl/py/Json/Process/__init__.py +0 -0
- arctrl/py/Json/Process/assay_materials.py +46 -0
- arctrl/py/Json/Process/component.py +79 -0
- arctrl/py/Json/Process/factor.py +107 -0
- arctrl/py/Json/Process/factor_value.py +101 -0
- arctrl/py/Json/Process/material.py +226 -0
- arctrl/py/Json/Process/material_attribute.py +79 -0
- arctrl/py/Json/Process/material_attribute_value.py +101 -0
- arctrl/py/Json/Process/material_type.py +53 -0
- arctrl/py/Json/Process/process.py +296 -0
- arctrl/py/Json/Process/process_input.py +83 -0
- arctrl/py/Json/Process/process_output.py +67 -0
- arctrl/py/Json/Process/process_parameter_value.py +81 -0
- arctrl/py/Json/Process/protocol.py +354 -0
- arctrl/py/Json/Process/protocol_parameter.py +79 -0
- arctrl/py/Json/Process/sample.py +277 -0
- arctrl/py/Json/Process/source.py +214 -0
- arctrl/py/Json/Process/study_materials.py +52 -0
- arctrl/py/Json/Process/value.py +56 -0
- arctrl/py/Json/ROCrate/__init__.py +0 -0
- arctrl/py/Json/ROCrate/ldcontext.py +133 -0
- arctrl/py/Json/ROCrate/ldgraph.py +111 -0
- arctrl/py/Json/ROCrate/ldnode.py +290 -0
- arctrl/py/Json/ROCrate/ldref.py +44 -0
- arctrl/py/Json/ROCrate/ldvalue.py +102 -0
- arctrl/py/Json/Table/__init__.py +0 -0
- arctrl/py/Json/Table/arc_table.py +393 -0
- arctrl/py/Json/Table/cell_table.py +83 -0
- arctrl/py/Json/Table/composite_cell.py +136 -0
- arctrl/py/Json/Table/composite_header.py +67 -0
- arctrl/py/Json/Table/iotype.py +24 -0
- arctrl/py/Json/Table/oatable.py +82 -0
- arctrl/py/Json/Table/templates.py +281 -0
- arctrl/py/Json/__init__.py +0 -0
- arctrl/py/Json/assay.py +600 -0
- arctrl/py/Json/comment.py +206 -0
- arctrl/py/Json/context/rocrate/__init__.py +0 -0
- arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
- arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
- arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
- arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
- arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
- arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
- arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
- arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
- arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
- arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
- arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
- arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
- arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
- arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
- arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
- arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
- arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
- arctrl/py/Json/converter_options.py +23 -0
- arctrl/py/Json/data.py +356 -0
- arctrl/py/Json/data_file.py +63 -0
- arctrl/py/Json/decode.py +155 -0
- arctrl/py/Json/encode.py +92 -0
- arctrl/py/Json/idtable.py +44 -0
- arctrl/py/Json/investigation.py +695 -0
- arctrl/py/Json/ontology_annotation.py +404 -0
- arctrl/py/Json/ontology_source_reference.py +255 -0
- arctrl/py/Json/person.py +658 -0
- arctrl/py/Json/property_value.py +359 -0
- arctrl/py/Json/publication.py +279 -0
- arctrl/py/Json/string_table.py +76 -0
- arctrl/py/Json/study.py +793 -0
- arctrl/py/JsonIO/DataMap/__init__.py +0 -0
- arctrl/py/JsonIO/DataMap/data_map.py +53 -0
- arctrl/py/JsonIO/Process/__init__.py +0 -0
- arctrl/py/JsonIO/Process/component.py +60 -0
- arctrl/py/JsonIO/Process/factor.py +36 -0
- arctrl/py/JsonIO/Process/factor_value.py +38 -0
- arctrl/py/JsonIO/Process/material.py +60 -0
- arctrl/py/JsonIO/Process/material_attribute.py +38 -0
- arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
- arctrl/py/JsonIO/Process/material_type.py +36 -0
- arctrl/py/JsonIO/Process/process.py +60 -0
- arctrl/py/JsonIO/Process/process_input.py +38 -0
- arctrl/py/JsonIO/Process/process_output.py +60 -0
- arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
- arctrl/py/JsonIO/Process/process_sequence.py +71 -0
- arctrl/py/JsonIO/Process/protocol.py +60 -0
- arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
- arctrl/py/JsonIO/Process/sample.py +60 -0
- arctrl/py/JsonIO/Process/source.py +60 -0
- arctrl/py/JsonIO/Process/study_materials.py +52 -0
- arctrl/py/JsonIO/Process/value.py +32 -0
- arctrl/py/JsonIO/Table/__init__.py +0 -0
- arctrl/py/JsonIO/Table/arc_table.py +121 -0
- arctrl/py/JsonIO/Table/composite_cell.py +36 -0
- arctrl/py/JsonIO/Table/composite_header.py +36 -0
- arctrl/py/JsonIO/Table/compression.py +85 -0
- arctrl/py/JsonIO/Table/iotype.py +36 -0
- arctrl/py/JsonIO/Table/templates.py +113 -0
- arctrl/py/JsonIO/__init__.py +0 -0
- arctrl/py/JsonIO/assay.py +113 -0
- arctrl/py/JsonIO/comment.py +80 -0
- arctrl/py/JsonIO/data.py +60 -0
- arctrl/py/JsonIO/data_file.py +58 -0
- arctrl/py/JsonIO/decode.py +9 -0
- arctrl/py/JsonIO/encode.py +1 -0
- arctrl/py/JsonIO/investigation.py +113 -0
- arctrl/py/JsonIO/ldobject.py +106 -0
- arctrl/py/JsonIO/ontology_annotation.py +80 -0
- arctrl/py/JsonIO/ontology_source_reference.py +80 -0
- arctrl/py/JsonIO/person.py +82 -0
- arctrl/py/JsonIO/publication.py +82 -0
- arctrl/py/JsonIO/study.py +114 -0
- arctrl/py/ROCrate/Generic/__init__.py +0 -0
- arctrl/py/ROCrate/Generic/comment.py +131 -0
- arctrl/py/ROCrate/Generic/dataset.py +817 -0
- arctrl/py/ROCrate/Generic/defined_term.py +131 -0
- arctrl/py/ROCrate/Generic/file.py +237 -0
- arctrl/py/ROCrate/Generic/lab_process.py +324 -0
- arctrl/py/ROCrate/Generic/lab_protocol.py +338 -0
- arctrl/py/ROCrate/Generic/organization.py +83 -0
- arctrl/py/ROCrate/Generic/person.py +484 -0
- arctrl/py/ROCrate/Generic/postal_address.py +195 -0
- arctrl/py/ROCrate/Generic/property_value.py +696 -0
- arctrl/py/ROCrate/Generic/sample.py +202 -0
- arctrl/py/ROCrate/Generic/scholarly_article.py +229 -0
- arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
- arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
- arctrl/py/ROCrate/ISAProfile/data.py +65 -0
- arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
- arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
- arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
- arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
- arctrl/py/ROCrate/ISAProfile/person.py +72 -0
- arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
- arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
- arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
- arctrl/py/ROCrate/ISAProfile/study.py +74 -0
- arctrl/py/ROCrate/__init__.py +0 -0
- arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
- arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
- arctrl/py/ROCrate/helper.py +8 -0
- arctrl/py/ROCrate/ldcontext.py +362 -0
- arctrl/py/ROCrate/ldobject.py +1247 -0
- arctrl/py/ROCrate/rocrate_context.py +51 -0
- arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +193 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +210 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
- arctrl/py/Spreadsheet/DataMapTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/DataMapTable/data_map_column.py +114 -0
- arctrl/py/Spreadsheet/DataMapTable/data_map_header.py +618 -0
- arctrl/py/Spreadsheet/DataMapTable/data_map_table.py +119 -0
- arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
- arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
- arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
- arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
- arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
- arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
- arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
- arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
- arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
- arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
- arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
- arctrl/py/Spreadsheet/Metadata/run.py +122 -0
- arctrl/py/Spreadsheet/Metadata/sparse_table.py +508 -0
- arctrl/py/Spreadsheet/Metadata/study.py +312 -0
- arctrl/py/Spreadsheet/Metadata/workflow.py +151 -0
- arctrl/py/Spreadsheet/__init__.py +0 -0
- arctrl/py/Spreadsheet/arc_assay.py +233 -0
- arctrl/py/Spreadsheet/arc_investigation.py +418 -0
- arctrl/py/Spreadsheet/arc_run.py +190 -0
- arctrl/py/Spreadsheet/arc_study.py +144 -0
- arctrl/py/Spreadsheet/arc_workflow.py +176 -0
- arctrl/py/Spreadsheet/assembly_info.py +1 -0
- arctrl/py/Spreadsheet/collection_aux.py +167 -0
- arctrl/py/Spreadsheet/data_map.py +44 -0
- arctrl/py/Spreadsheet/template.py +460 -0
- arctrl/py/ValidationPackages/__init__.py +0 -0
- arctrl/py/ValidationPackages/validation_package.py +82 -0
- arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
- arctrl/py/WebRequest/__init__.py +0 -0
- arctrl/py/WebRequest/web_request.py +9 -0
- arctrl/py/WebRequest/web_request_py.py +135 -0
- arctrl/py/Yaml/__init__.py +0 -0
- arctrl/py/Yaml/decode.py +1 -0
- arctrl/py/Yaml/encode.py +10 -0
- arctrl/py/Yaml/validation_package.py +77 -0
- arctrl/py/Yaml/validation_packages_config.py +86 -0
- arctrl/py/__init__.py +0 -0
- arctrl/py/arc.py +1400 -0
- arctrl/py/column_index.py +280 -0
- arctrl/py/conversion.py +2184 -0
- arctrl/py/cross_async.py +76 -0
- arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
- arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
- arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
- arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
- arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
- arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
- arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
- arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
- arctrl/py/fable_modules/fable_library/__init__.py +0 -0
- arctrl/py/fable_modules/fable_library/array_.py +1528 -0
- arctrl/py/fable_modules/fable_library/async_.py +377 -0
- arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
- arctrl/py/fable_modules/fable_library/big_int.py +330 -0
- arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
- arctrl/py/fable_modules/fable_library/boolean.py +26 -0
- arctrl/py/fable_modules/fable_library/char.py +237 -0
- arctrl/py/fable_modules/fable_library/choice.py +212 -0
- arctrl/py/fable_modules/fable_library/date.py +779 -0
- arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
- arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
- arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
- arctrl/py/fable_modules/fable_library/double.py +87 -0
- arctrl/py/fable_modules/fable_library/encoding.py +41 -0
- arctrl/py/fable_modules/fable_library/event.py +206 -0
- arctrl/py/fable_modules/fable_library/file.py +107 -0
- arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
- arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
- arctrl/py/fable_modules/fable_library/global_.py +63 -0
- arctrl/py/fable_modules/fable_library/guid.py +41 -0
- arctrl/py/fable_modules/fable_library/int32.py +73 -0
- arctrl/py/fable_modules/fable_library/list.py +1788 -0
- arctrl/py/fable_modules/fable_library/long.py +240 -0
- arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
- arctrl/py/fable_modules/fable_library/map.py +1854 -0
- arctrl/py/fable_modules/fable_library/map_util.py +148 -0
- arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
- arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
- arctrl/py/fable_modules/fable_library/native.py +45 -0
- arctrl/py/fable_modules/fable_library/numeric.py +46 -0
- arctrl/py/fable_modules/fable_library/observable.py +222 -0
- arctrl/py/fable_modules/fable_library/option.py +128 -0
- arctrl/py/fable_modules/fable_library/path.py +62 -0
- arctrl/py/fable_modules/fable_library/range.py +117 -0
- arctrl/py/fable_modules/fable_library/reflection.py +463 -0
- arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
- arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
- arctrl/py/fable_modules/fable_library/result.py +212 -0
- arctrl/py/fable_modules/fable_library/seq.py +1979 -0
- arctrl/py/fable_modules/fable_library/seq2.py +221 -0
- arctrl/py/fable_modules/fable_library/set.py +2414 -0
- arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
- arctrl/py/fable_modules/fable_library/string_.py +573 -0
- arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
- arctrl/py/fable_modules/fable_library/system_text.py +237 -0
- arctrl/py/fable_modules/fable_library/task.py +116 -0
- arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
- arctrl/py/fable_modules/fable_library/thread.py +5 -0
- arctrl/py/fable_modules/fable_library/time_span.py +283 -0
- arctrl/py/fable_modules/fable_library/timer.py +24 -0
- arctrl/py/fable_modules/fable_library/types.py +401 -0
- arctrl/py/fable_modules/fable_library/uri.py +109 -0
- arctrl/py/fable_modules/fable_library/util.py +2735 -0
- arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
- arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
- arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
- arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
- arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
- arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +338 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +469 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +464 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +57 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +217 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +47 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +186 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +90 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +78 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +393 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +127 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
- arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +218 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +180 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +600 -0
- arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +330 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +63 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/table.py +53 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +40 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +54 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
- arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_core/decode.py +1588 -0
- arctrl/py/fable_modules/thoth_json_core/encode.py +261 -0
- arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
- arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
- arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
- arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
- arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
- arctrl/py/fable_modules/yamlicious/encode.py +84 -0
- arctrl/py/fable_modules/yamlicious/library.py +10 -0
- arctrl/py/fable_modules/yamlicious/persil.py +57 -0
- arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
- arctrl/py/fable_modules/yamlicious/reader.py +665 -0
- arctrl/py/fable_modules/yamlicious/regex.py +21 -0
- arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +256 -0
- arctrl/py/fable_modules/yamlicious/writer.py +175 -0
- arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
- arctrl/py/json.py +213 -0
- arctrl/py/rocrate_io.py +72 -0
- arctrl/py/template_web.py +23 -0
- arctrl/py/xlsx.py +148 -0
- arctrl/rocrate.py +21 -0
- arctrl-3.0.0a3.dist-info/LICENSE +21 -0
- arctrl-3.0.0a3.dist-info/METADATA +119 -0
- arctrl-3.0.0a3.dist-info/RECORD +456 -0
- arctrl-3.0.0a3.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1588 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from abc import abstractmethod
|
|
3
|
+
from collections.abc import Callable
|
|
4
|
+
from decimal import Decimal
|
|
5
|
+
from typing import (Any, Protocol, Generic, TypeVar)
|
|
6
|
+
from ..fable_library.array_ import (fold as fold_1, fill)
|
|
7
|
+
from ..fable_library.big_int import (from_int32, try_parse as try_parse_4)
|
|
8
|
+
from ..fable_library.date import (min_value, try_parse as try_parse_6)
|
|
9
|
+
from ..fable_library.decimal_ import (Decimal as Decimal_1, try_parse as try_parse_5)
|
|
10
|
+
from ..fable_library.guid import try_parse as try_parse_1
|
|
11
|
+
from ..fable_library.int32 import try_parse as try_parse_2
|
|
12
|
+
from ..fable_library.list import (map as map_1, try_last, FSharpList, fold, empty, append, singleton, of_seq, reverse as reverse_1, cons, is_empty, head as head_1, tail as tail_1, length)
|
|
13
|
+
from ..fable_library.long import (to_number, from_number, try_parse as try_parse_3)
|
|
14
|
+
from ..fable_library.map import (of_list, of_seq as of_seq_1)
|
|
15
|
+
from ..fable_library.option import (some, default_arg, value as value_7)
|
|
16
|
+
from ..fable_library.reflection import (TypeInfo, class_type)
|
|
17
|
+
from ..fable_library.result import (FSharpResult_2, Result_MapError, Result_Map)
|
|
18
|
+
from ..fable_library.seq import (reverse, append as append_1, to_list)
|
|
19
|
+
from ..fable_library.string_ import join
|
|
20
|
+
from ..fable_library.time_span import (create, try_parse as try_parse_7)
|
|
21
|
+
from ..fable_library.types import (FSharpRef, int8, uint8, int16 as int16_1, uint16 as uint16_1, uint32 as uint32_1, int64 as int64_1, uint64 as uint64_1, float32 as float32_1, Array)
|
|
22
|
+
from ..fable_library.util import (int32_to_string, IEnumerable_1, to_enumerable, compare_primitives, compare)
|
|
23
|
+
from .types import (ErrorReason_1, IDecoderHelpers_1, Decoder_1)
|
|
24
|
+
|
|
25
|
+
_JSONVALUE = TypeVar("_JSONVALUE")
|
|
26
|
+
|
|
27
|
+
_T = TypeVar("_T")
|
|
28
|
+
|
|
29
|
+
__A_ = TypeVar("__A_")
|
|
30
|
+
|
|
31
|
+
_VALUE = TypeVar("_VALUE")
|
|
32
|
+
|
|
33
|
+
_VALUE_ = TypeVar("_VALUE_")
|
|
34
|
+
|
|
35
|
+
__A = TypeVar("__A")
|
|
36
|
+
|
|
37
|
+
_OUTPUT_ = TypeVar("_OUTPUT_")
|
|
38
|
+
|
|
39
|
+
_A_ = TypeVar("_A_")
|
|
40
|
+
|
|
41
|
+
__C_ = TypeVar("__C_")
|
|
42
|
+
|
|
43
|
+
_B_ = TypeVar("_B_")
|
|
44
|
+
|
|
45
|
+
_A = TypeVar("_A")
|
|
46
|
+
|
|
47
|
+
_B = TypeVar("_B")
|
|
48
|
+
|
|
49
|
+
_OUTPUT = TypeVar("_OUTPUT")
|
|
50
|
+
|
|
51
|
+
__B_ = TypeVar("__B_")
|
|
52
|
+
|
|
53
|
+
__D_ = TypeVar("__D_")
|
|
54
|
+
|
|
55
|
+
_C_ = TypeVar("_C_")
|
|
56
|
+
|
|
57
|
+
_C = TypeVar("_C")
|
|
58
|
+
|
|
59
|
+
__E_ = TypeVar("__E_")
|
|
60
|
+
|
|
61
|
+
_D_ = TypeVar("_D_")
|
|
62
|
+
|
|
63
|
+
_D = TypeVar("_D")
|
|
64
|
+
|
|
65
|
+
__F_ = TypeVar("__F_")
|
|
66
|
+
|
|
67
|
+
_E_ = TypeVar("_E_")
|
|
68
|
+
|
|
69
|
+
_E = TypeVar("_E")
|
|
70
|
+
|
|
71
|
+
__G_ = TypeVar("__G_")
|
|
72
|
+
|
|
73
|
+
_F_ = TypeVar("_F_")
|
|
74
|
+
|
|
75
|
+
_F = TypeVar("_F")
|
|
76
|
+
|
|
77
|
+
__H_ = TypeVar("__H_")
|
|
78
|
+
|
|
79
|
+
_G_ = TypeVar("_G_")
|
|
80
|
+
|
|
81
|
+
_G = TypeVar("_G")
|
|
82
|
+
|
|
83
|
+
__I_ = TypeVar("__I_")
|
|
84
|
+
|
|
85
|
+
_H_ = TypeVar("_H_")
|
|
86
|
+
|
|
87
|
+
_H = TypeVar("_H")
|
|
88
|
+
|
|
89
|
+
_JSONVALUE_ = TypeVar("_JSONVALUE_")
|
|
90
|
+
|
|
91
|
+
_T2 = TypeVar("_T2")
|
|
92
|
+
|
|
93
|
+
_T1 = TypeVar("_T1")
|
|
94
|
+
|
|
95
|
+
_T3 = TypeVar("_T3")
|
|
96
|
+
|
|
97
|
+
_T4 = TypeVar("_T4")
|
|
98
|
+
|
|
99
|
+
_T5 = TypeVar("_T5")
|
|
100
|
+
|
|
101
|
+
_T6 = TypeVar("_T6")
|
|
102
|
+
|
|
103
|
+
_T7 = TypeVar("_T7")
|
|
104
|
+
|
|
105
|
+
_T8 = TypeVar("_T8")
|
|
106
|
+
|
|
107
|
+
_KEY_ = TypeVar("_KEY_")
|
|
108
|
+
|
|
109
|
+
_KEY = TypeVar("_KEY")
|
|
110
|
+
|
|
111
|
+
def Helpers_prependPath(path: str, err_: str, err__1: ErrorReason_1[Any]) -> tuple[str, ErrorReason_1[_JSONVALUE]]:
|
|
112
|
+
err: tuple[str, ErrorReason_1[_JSONVALUE]] = (err_, err__1)
|
|
113
|
+
return (path + err[0], err[1])
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def generic_msg(helpers: IDecoderHelpers_1[Any], msg: str, value_1: Any, new_line: bool) -> str:
|
|
117
|
+
try:
|
|
118
|
+
return ((("Expecting " + msg) + " but instead got:") + ("\n" if new_line else " ")) + helpers.any_to_string(value_1)
|
|
119
|
+
|
|
120
|
+
except Exception as match_value:
|
|
121
|
+
return (("Expecting " + msg) + " but decoder failed. Couldn\'t report given value due to circular structure.") + ("\n" if new_line else " ")
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def error_to_string(helpers: IDecoderHelpers_1[Any], path: str, error: ErrorReason_1[Any]) -> str:
|
|
126
|
+
def mapping(error_1: tuple[str, ErrorReason_1[_JSONVALUE]], helpers: Any=helpers, path: Any=path, error: Any=error) -> str:
|
|
127
|
+
tupled_arg: tuple[str, ErrorReason_1[_JSONVALUE]] = Helpers_prependPath(path, error_1[0], error_1[1])
|
|
128
|
+
return error_to_string(helpers, tupled_arg[0], tupled_arg[1])
|
|
129
|
+
|
|
130
|
+
reason_1: str = generic_msg(helpers, error.fields[0], error.fields[1], True) if (error.tag == 2) else (((generic_msg(helpers, error.fields[0], error.fields[1], False) + "\nReason: ") + error.fields[2]) if (error.tag == 1) else (generic_msg(helpers, error.fields[0], error.fields[1], True) if (error.tag == 3) else ((generic_msg(helpers, error.fields[0], error.fields[1], True) + (("\nNode `" + error.fields[2]) + "` is unkown.")) if (error.tag == 4) else (((("Expecting " + error.fields[0]) + ".\n") + helpers.any_to_string(error.fields[1])) if (error.tag == 5) else (("The following errors were found:\n\n" + join("\n\n", map_1(mapping, error.fields[0]))) if (error.tag == 7) else (("The following `failure` occurred with the decoder: " + error.fields[0]) if (error.tag == 6) else generic_msg(helpers, error.fields[0], error.fields[1], False)))))))
|
|
131
|
+
if error.tag == 7:
|
|
132
|
+
return reason_1
|
|
133
|
+
|
|
134
|
+
else:
|
|
135
|
+
return (("Error at: `" + path) + "`\n") + reason_1
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def Advanced_fromValue(helpers: IDecoderHelpers_1[Any], decoder: Decoder_1[Any], value_1: Any) -> FSharpResult_2[Any, str]:
|
|
140
|
+
match_value: FSharpResult_2[_T, tuple[str, ErrorReason_1[_JSONVALUE]]] = decoder.Decode(helpers, value_1)
|
|
141
|
+
if match_value.tag == 1:
|
|
142
|
+
error: tuple[str, ErrorReason_1[_JSONVALUE]] = match_value.fields[0]
|
|
143
|
+
return FSharpResult_2(1, error_to_string(helpers, error[0], error[1]))
|
|
144
|
+
|
|
145
|
+
else:
|
|
146
|
+
return FSharpResult_2(0, match_value.fields[0])
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class ObjectExpr67(Decoder_1[str]):
|
|
151
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[str, tuple[str, ErrorReason_1[__A_]]]:
|
|
152
|
+
return FSharpResult_2(0, helpers.as_string(value_1)) if helpers.is_string(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a string", value_1)))
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
string: Decoder_1[str] = ObjectExpr67()
|
|
156
|
+
|
|
157
|
+
class ObjectExpr68(Decoder_1[str]):
|
|
158
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[str, tuple[str, ErrorReason_1[__A_]]]:
|
|
159
|
+
if helpers.is_string(value_1):
|
|
160
|
+
str_1: str = helpers.as_string(value_1)
|
|
161
|
+
return FSharpResult_2(0, str_1[0]) if (len(str_1) == 1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a single character string", value_1)))
|
|
162
|
+
|
|
163
|
+
else:
|
|
164
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a char", value_1)))
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
char: Decoder_1[str] = ObjectExpr68()
|
|
169
|
+
|
|
170
|
+
class ObjectExpr71(Decoder_1[str]):
|
|
171
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[str, tuple[str, ErrorReason_1[__A_]]]:
|
|
172
|
+
if helpers.is_string(value_1):
|
|
173
|
+
match_value: tuple[bool, str]
|
|
174
|
+
out_arg: str = "00000000-0000-0000-0000-000000000000"
|
|
175
|
+
def _arrow69(__unit: None=None) -> str:
|
|
176
|
+
return out_arg
|
|
177
|
+
|
|
178
|
+
def _arrow70(v: str) -> None:
|
|
179
|
+
nonlocal out_arg
|
|
180
|
+
out_arg = v
|
|
181
|
+
|
|
182
|
+
match_value = (try_parse_1(helpers.as_string(value_1), FSharpRef(_arrow69, _arrow70)), out_arg)
|
|
183
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a guid", value_1)))
|
|
184
|
+
|
|
185
|
+
else:
|
|
186
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a guid", value_1)))
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
guid: Decoder_1[str] = ObjectExpr71()
|
|
191
|
+
|
|
192
|
+
class ObjectExpr72(Decoder_1[None]):
|
|
193
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[None, tuple[str, ErrorReason_1[__A_]]]:
|
|
194
|
+
return FSharpResult_2(0, None) if helpers.is_null_value(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "null", value_1)))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
unit: Decoder_1[None] = ObjectExpr72()
|
|
198
|
+
|
|
199
|
+
class ObjectExpr75(Decoder_1[int8]):
|
|
200
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int8, tuple[str, ErrorReason_1[__A_]]]:
|
|
201
|
+
if helpers.is_number(value_2):
|
|
202
|
+
if helpers.is_integral_value(value_2):
|
|
203
|
+
float_value: float = helpers.as_float(value_2)
|
|
204
|
+
return FSharpResult_2(0, (int(float_value) + 0x80 & 0xFF) - 0x80) if ((float_value <= int8(127)) if (int8(-128) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "a sbyte", value_2, "Value was either too large or too small for a sbyte")))
|
|
205
|
+
|
|
206
|
+
else:
|
|
207
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "a sbyte", value_2, "Value is not an integral value")))
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
elif helpers.is_string(value_2):
|
|
211
|
+
match_value: tuple[bool, int8]
|
|
212
|
+
out_arg: int8 = int8(0) or 0
|
|
213
|
+
def _arrow73(__unit: None=None) -> int8:
|
|
214
|
+
return out_arg
|
|
215
|
+
|
|
216
|
+
def _arrow74(v: int8) -> None:
|
|
217
|
+
nonlocal out_arg
|
|
218
|
+
out_arg = v or 0
|
|
219
|
+
|
|
220
|
+
match_value = (try_parse_2(helpers.as_string(value_2), 511, False, 8, FSharpRef(_arrow73, _arrow74)), out_arg)
|
|
221
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a sbyte", value_2)))
|
|
222
|
+
|
|
223
|
+
else:
|
|
224
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a sbyte", value_2)))
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
sbyte: Decoder_1[int8] = ObjectExpr75()
|
|
229
|
+
|
|
230
|
+
class ObjectExpr78(Decoder_1[uint8]):
|
|
231
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint8, tuple[str, ErrorReason_1[__A_]]]:
|
|
232
|
+
if helpers.is_number(value_2):
|
|
233
|
+
if helpers.is_integral_value(value_2):
|
|
234
|
+
float_value: float = helpers.as_float(value_2)
|
|
235
|
+
return FSharpResult_2(0, int(float_value+0x100 if float_value < 0 else float_value) & 0xFF) if ((float_value <= uint8(255)) if (uint8(0) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "a byte", value_2, "Value was either too large or too small for a byte")))
|
|
236
|
+
|
|
237
|
+
else:
|
|
238
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "a byte", value_2, "Value is not an integral value")))
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
elif helpers.is_string(value_2):
|
|
242
|
+
match_value: tuple[bool, uint8]
|
|
243
|
+
out_arg: uint8 = uint8(0)
|
|
244
|
+
def _arrow76(__unit: None=None) -> uint8:
|
|
245
|
+
return out_arg
|
|
246
|
+
|
|
247
|
+
def _arrow77(v: uint8) -> None:
|
|
248
|
+
nonlocal out_arg
|
|
249
|
+
out_arg = v
|
|
250
|
+
|
|
251
|
+
match_value = (try_parse_2(helpers.as_string(value_2), 511, True, 8, FSharpRef(_arrow76, _arrow77)), out_arg)
|
|
252
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a byte", value_2)))
|
|
253
|
+
|
|
254
|
+
else:
|
|
255
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a byte", value_2)))
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
byte: Decoder_1[uint8] = ObjectExpr78()
|
|
260
|
+
|
|
261
|
+
class ObjectExpr81(Decoder_1[int16_1]):
|
|
262
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int16_1, tuple[str, ErrorReason_1[__A_]]]:
|
|
263
|
+
if helpers.is_number(value_2):
|
|
264
|
+
if helpers.is_integral_value(value_2):
|
|
265
|
+
float_value: float = helpers.as_float(value_2)
|
|
266
|
+
return FSharpResult_2(0, (int(float_value) + 0x8000 & 0xFFFF) - 0x8000) if ((float_value <= int16_1(32767)) if (int16_1(-32768) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an int16", value_2, "Value was either too large or too small for an int16")))
|
|
267
|
+
|
|
268
|
+
else:
|
|
269
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "an int16", value_2, "Value is not an integral value")))
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
elif helpers.is_string(value_2):
|
|
273
|
+
match_value: tuple[bool, int16_1]
|
|
274
|
+
out_arg: int16_1 = int16_1(0) or 0
|
|
275
|
+
def _arrow79(__unit: None=None) -> int16_1:
|
|
276
|
+
return out_arg
|
|
277
|
+
|
|
278
|
+
def _arrow80(v: int16_1) -> None:
|
|
279
|
+
nonlocal out_arg
|
|
280
|
+
out_arg = v or 0
|
|
281
|
+
|
|
282
|
+
match_value = (try_parse_2(helpers.as_string(value_2), 511, False, 16, FSharpRef(_arrow79, _arrow80)), out_arg)
|
|
283
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an int16", value_2)))
|
|
284
|
+
|
|
285
|
+
else:
|
|
286
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an int16", value_2)))
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
int16: Decoder_1[int16_1] = ObjectExpr81()
|
|
291
|
+
|
|
292
|
+
class ObjectExpr84(Decoder_1[uint16_1]):
|
|
293
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint16_1, tuple[str, ErrorReason_1[__A_]]]:
|
|
294
|
+
if helpers.is_number(value_2):
|
|
295
|
+
if helpers.is_integral_value(value_2):
|
|
296
|
+
float_value: float = helpers.as_float(value_2)
|
|
297
|
+
return FSharpResult_2(0, int(float_value+0x10000 if float_value < 0 else float_value) & 0xFFFF) if ((float_value <= uint16_1(65535)) if (uint16_1(0) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an uint16", value_2, "Value was either too large or too small for an uint16")))
|
|
298
|
+
|
|
299
|
+
else:
|
|
300
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "an uint16", value_2, "Value is not an integral value")))
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
elif helpers.is_string(value_2):
|
|
304
|
+
match_value: tuple[bool, uint16_1]
|
|
305
|
+
out_arg: uint16_1 = uint16_1(0)
|
|
306
|
+
def _arrow82(__unit: None=None) -> uint16_1:
|
|
307
|
+
return out_arg
|
|
308
|
+
|
|
309
|
+
def _arrow83(v: uint16_1) -> None:
|
|
310
|
+
nonlocal out_arg
|
|
311
|
+
out_arg = v
|
|
312
|
+
|
|
313
|
+
match_value = (try_parse_2(helpers.as_string(value_2), 511, True, 16, FSharpRef(_arrow82, _arrow83)), out_arg)
|
|
314
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an uint16", value_2)))
|
|
315
|
+
|
|
316
|
+
else:
|
|
317
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an uint16", value_2)))
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
uint16: Decoder_1[uint16_1] = ObjectExpr84()
|
|
322
|
+
|
|
323
|
+
class ObjectExpr87(Decoder_1[int]):
|
|
324
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int, tuple[str, ErrorReason_1[__A_]]]:
|
|
325
|
+
if helpers.is_number(value_2):
|
|
326
|
+
if helpers.is_integral_value(value_2):
|
|
327
|
+
float_value: float = helpers.as_float(value_2)
|
|
328
|
+
return FSharpResult_2(0, int(float_value)) if ((float_value <= 2147483647) if (-2147483648 <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an int", value_2, "Value was either too large or too small for an int")))
|
|
329
|
+
|
|
330
|
+
else:
|
|
331
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "an int", value_2, "Value is not an integral value")))
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
elif helpers.is_string(value_2):
|
|
335
|
+
match_value: tuple[bool, int]
|
|
336
|
+
out_arg: int = 0
|
|
337
|
+
def _arrow85(__unit: None=None) -> int:
|
|
338
|
+
return out_arg
|
|
339
|
+
|
|
340
|
+
def _arrow86(v: int) -> None:
|
|
341
|
+
nonlocal out_arg
|
|
342
|
+
out_arg = v or 0
|
|
343
|
+
|
|
344
|
+
match_value = (try_parse_2(helpers.as_string(value_2), 511, False, 32, FSharpRef(_arrow85, _arrow86)), out_arg)
|
|
345
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an int", value_2)))
|
|
346
|
+
|
|
347
|
+
else:
|
|
348
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an int", value_2)))
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
int_1: Decoder_1[int] = ObjectExpr87()
|
|
353
|
+
|
|
354
|
+
class ObjectExpr90(Decoder_1[uint32_1]):
|
|
355
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint32_1, tuple[str, ErrorReason_1[__A_]]]:
|
|
356
|
+
if helpers.is_number(value_2):
|
|
357
|
+
if helpers.is_integral_value(value_2):
|
|
358
|
+
float_value: float = helpers.as_float(value_2)
|
|
359
|
+
return FSharpResult_2(0, int(float_value+0x100000000 if float_value < 0 else float_value)) if ((float_value <= uint32_1(4294967295)) if (uint32_1(0) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an uint32", value_2, "Value was either too large or too small for an uint32")))
|
|
360
|
+
|
|
361
|
+
else:
|
|
362
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "an uint32", value_2, "Value is not an integral value")))
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
elif helpers.is_string(value_2):
|
|
366
|
+
match_value: tuple[bool, uint32_1]
|
|
367
|
+
out_arg: uint32_1 = uint32_1(0)
|
|
368
|
+
def _arrow88(__unit: None=None) -> uint32_1:
|
|
369
|
+
return out_arg
|
|
370
|
+
|
|
371
|
+
def _arrow89(v: uint32_1) -> None:
|
|
372
|
+
nonlocal out_arg
|
|
373
|
+
out_arg = v
|
|
374
|
+
|
|
375
|
+
match_value = (try_parse_2(helpers.as_string(value_2), 511, True, 32, FSharpRef(_arrow88, _arrow89)), out_arg)
|
|
376
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an uint32", value_2)))
|
|
377
|
+
|
|
378
|
+
else:
|
|
379
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an uint32", value_2)))
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
uint32: Decoder_1[uint32_1] = ObjectExpr90()
|
|
384
|
+
|
|
385
|
+
class ObjectExpr93(Decoder_1[int64_1]):
|
|
386
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[int64_1, tuple[str, ErrorReason_1[__A_]]]:
|
|
387
|
+
if helpers.is_number(value_2):
|
|
388
|
+
if helpers.is_integral_value(value_2):
|
|
389
|
+
float_value: float = helpers.as_float(value_2)
|
|
390
|
+
return FSharpResult_2(0, from_number(float_value, False)) if ((float_value <= to_number(int64_1(9223372036854775807))) if (to_number(int64_1(-9223372036854775808)) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an int64", value_2, "Value was either too large or too small for an int64")))
|
|
391
|
+
|
|
392
|
+
else:
|
|
393
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "an int64", value_2, "Value is not an integral value")))
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
elif helpers.is_string(value_2):
|
|
397
|
+
match_value: tuple[bool, int64_1]
|
|
398
|
+
out_arg: int64_1 = int64_1(0)
|
|
399
|
+
def _arrow91(__unit: None=None) -> int64_1:
|
|
400
|
+
return out_arg
|
|
401
|
+
|
|
402
|
+
def _arrow92(v: int64_1) -> None:
|
|
403
|
+
nonlocal out_arg
|
|
404
|
+
out_arg = v
|
|
405
|
+
|
|
406
|
+
match_value = (try_parse_3(helpers.as_string(value_2), 511, False, 64, FSharpRef(_arrow91, _arrow92)), out_arg)
|
|
407
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an int64", value_2)))
|
|
408
|
+
|
|
409
|
+
else:
|
|
410
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an int64", value_2)))
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
int64: Decoder_1[int64_1] = ObjectExpr93()
|
|
415
|
+
|
|
416
|
+
class ObjectExpr96(Decoder_1[uint64_1]):
|
|
417
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_2: Any) -> FSharpResult_2[uint64_1, tuple[str, ErrorReason_1[__A_]]]:
|
|
418
|
+
if helpers.is_number(value_2):
|
|
419
|
+
if helpers.is_integral_value(value_2):
|
|
420
|
+
float_value: float = helpers.as_float(value_2)
|
|
421
|
+
return FSharpResult_2(0, from_number(float_value, True)) if ((float_value <= to_number(uint64_1(18446744073709551615))) if (to_number(uint64_1(0)) <= float_value) else False) else FSharpResult_2(1, ("", ErrorReason_1(1, "an uint64", value_2, "Value was either too large or too small for an uint64")))
|
|
422
|
+
|
|
423
|
+
else:
|
|
424
|
+
return FSharpResult_2(1, ("", ErrorReason_1(1, "an uint64", value_2, "Value is not an integral value")))
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
elif helpers.is_string(value_2):
|
|
428
|
+
match_value: tuple[bool, uint64_1]
|
|
429
|
+
out_arg: uint64_1 = uint64_1(0)
|
|
430
|
+
def _arrow94(__unit: None=None) -> uint64_1:
|
|
431
|
+
return out_arg
|
|
432
|
+
|
|
433
|
+
def _arrow95(v: uint64_1) -> None:
|
|
434
|
+
nonlocal out_arg
|
|
435
|
+
out_arg = v
|
|
436
|
+
|
|
437
|
+
match_value = (try_parse_3(helpers.as_string(value_2), 511, True, 64, FSharpRef(_arrow94, _arrow95)), out_arg)
|
|
438
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "an uint64", value_2)))
|
|
439
|
+
|
|
440
|
+
else:
|
|
441
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an uint64", value_2)))
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
uint64: Decoder_1[uint64_1] = ObjectExpr96()
|
|
446
|
+
|
|
447
|
+
class ObjectExpr99(Decoder_1[int]):
|
|
448
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[int, tuple[str, ErrorReason_1[__A_]]]:
|
|
449
|
+
if helpers.is_number(value_1):
|
|
450
|
+
return FSharpResult_2(0, from_int32(helpers.as_int(value_1)))
|
|
451
|
+
|
|
452
|
+
elif helpers.is_string(value_1):
|
|
453
|
+
parse_result: tuple[bool, int]
|
|
454
|
+
out_arg: int = from_int32(0)
|
|
455
|
+
def _arrow97(__unit: None=None) -> int:
|
|
456
|
+
return out_arg
|
|
457
|
+
|
|
458
|
+
def _arrow98(v: int) -> None:
|
|
459
|
+
nonlocal out_arg
|
|
460
|
+
out_arg = v
|
|
461
|
+
|
|
462
|
+
parse_result = (try_parse_4(helpers.as_string(value_1), FSharpRef(_arrow97, _arrow98)), out_arg)
|
|
463
|
+
return FSharpResult_2(0, parse_result[1]) if parse_result[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a bigint", value_1)))
|
|
464
|
+
|
|
465
|
+
else:
|
|
466
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a bigint", value_1)))
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
bigint: Decoder_1[int] = ObjectExpr99()
|
|
471
|
+
|
|
472
|
+
class ObjectExpr100(Decoder_1[bool]):
|
|
473
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[bool, tuple[str, ErrorReason_1[__A_]]]:
|
|
474
|
+
return FSharpResult_2(0, helpers.as_boolean(value_1)) if helpers.is_boolean(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a boolean", value_1)))
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
bool_1: Decoder_1[bool] = ObjectExpr100()
|
|
478
|
+
|
|
479
|
+
class ObjectExpr101(Decoder_1[float]):
|
|
480
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[float, tuple[str, ErrorReason_1[__A_]]]:
|
|
481
|
+
return FSharpResult_2(0, helpers.as_float(value_1)) if helpers.is_number(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a float", value_1)))
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
float_1: Decoder_1[float] = ObjectExpr101()
|
|
485
|
+
|
|
486
|
+
class ObjectExpr102(Decoder_1[float32_1]):
|
|
487
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[float32_1, tuple[str, ErrorReason_1[__A_]]]:
|
|
488
|
+
return FSharpResult_2(0, helpers.as_float32(value_1)) if helpers.is_number(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "a float32", value_1)))
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
float32: Decoder_1[float32_1] = ObjectExpr102()
|
|
492
|
+
|
|
493
|
+
class ObjectExpr105(Decoder_1[Decimal]):
|
|
494
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[Decimal, tuple[str, ErrorReason_1[__A_]]]:
|
|
495
|
+
if helpers.is_number(value_1):
|
|
496
|
+
return FSharpResult_2(0, Decimal_1(helpers.as_float(value_1)))
|
|
497
|
+
|
|
498
|
+
elif helpers.is_string(value_1):
|
|
499
|
+
match_value: tuple[bool, Decimal]
|
|
500
|
+
out_arg: Decimal = Decimal_1(0)
|
|
501
|
+
def _arrow103(__unit: None=None) -> Decimal:
|
|
502
|
+
return out_arg
|
|
503
|
+
|
|
504
|
+
def _arrow104(v: Decimal) -> None:
|
|
505
|
+
nonlocal out_arg
|
|
506
|
+
out_arg = v
|
|
507
|
+
|
|
508
|
+
match_value = (try_parse_5(helpers.as_string(value_1), FSharpRef(_arrow103, _arrow104)), out_arg)
|
|
509
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a decimal", value_1)))
|
|
510
|
+
|
|
511
|
+
else:
|
|
512
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a decimal", value_1)))
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
decimal: Decoder_1[Decimal] = ObjectExpr105()
|
|
517
|
+
|
|
518
|
+
class ObjectExpr108(Decoder_1[Any]):
|
|
519
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[Any, tuple[str, ErrorReason_1[__A_]]]:
|
|
520
|
+
if helpers.is_string(value_1):
|
|
521
|
+
match_value: tuple[bool, Any]
|
|
522
|
+
out_arg: Any = min_value()
|
|
523
|
+
def _arrow106(__unit: None=None) -> Any:
|
|
524
|
+
return out_arg
|
|
525
|
+
|
|
526
|
+
def _arrow107(v: Any) -> None:
|
|
527
|
+
nonlocal out_arg
|
|
528
|
+
out_arg = v
|
|
529
|
+
|
|
530
|
+
match_value = (try_parse_6(helpers.as_string(value_1), FSharpRef(_arrow106, _arrow107)), out_arg)
|
|
531
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a datetime", value_1)))
|
|
532
|
+
|
|
533
|
+
else:
|
|
534
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a datetime", value_1)))
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
datetime_local: Decoder_1[Any] = ObjectExpr108()
|
|
539
|
+
|
|
540
|
+
class ObjectExpr111(Decoder_1[Any]):
|
|
541
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[Any, tuple[str, ErrorReason_1[__A_]]]:
|
|
542
|
+
if helpers.is_string(value_1):
|
|
543
|
+
match_value: tuple[bool, Any]
|
|
544
|
+
out_arg: Any = create(0)
|
|
545
|
+
def _arrow109(__unit: None=None) -> Any:
|
|
546
|
+
return out_arg
|
|
547
|
+
|
|
548
|
+
def _arrow110(v: Any) -> None:
|
|
549
|
+
nonlocal out_arg
|
|
550
|
+
out_arg = v
|
|
551
|
+
|
|
552
|
+
match_value = (try_parse_7(helpers.as_string(value_1), FSharpRef(_arrow109, _arrow110)), out_arg)
|
|
553
|
+
return FSharpResult_2(0, match_value[1]) if match_value[0] else FSharpResult_2(1, ("", ErrorReason_1(0, "a timespan", value_1)))
|
|
554
|
+
|
|
555
|
+
else:
|
|
556
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a timespan", value_1)))
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
timespan: Decoder_1[Any] = ObjectExpr111()
|
|
561
|
+
|
|
562
|
+
def decode_maybe_null(helpers: IDecoderHelpers_1[Any], path: str, decoder: Decoder_1[Any], value_1: Any) -> FSharpResult_2[Any | None, tuple[str, ErrorReason_1[_JSONVALUE]]]:
|
|
563
|
+
if helpers.is_null_value(value_1):
|
|
564
|
+
return FSharpResult_2(0, None)
|
|
565
|
+
|
|
566
|
+
else:
|
|
567
|
+
match_value: FSharpResult_2[_VALUE, tuple[str, ErrorReason_1[_JSONVALUE]]] = decoder.Decode(helpers, value_1)
|
|
568
|
+
if match_value.tag == 1:
|
|
569
|
+
def _arrow112(__unit: None=None, helpers: Any=helpers, path: Any=path, decoder: Any=decoder, value_1: Any=value_1) -> tuple[str, ErrorReason_1[_JSONVALUE]]:
|
|
570
|
+
tupled_arg: tuple[str, ErrorReason_1[_JSONVALUE]] = match_value.fields[0]
|
|
571
|
+
return Helpers_prependPath(path, tupled_arg[0], tupled_arg[1])
|
|
572
|
+
|
|
573
|
+
return FSharpResult_2(1, _arrow112())
|
|
574
|
+
|
|
575
|
+
else:
|
|
576
|
+
return FSharpResult_2(0, some(match_value.fields[0]))
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
def optional(field_name: str, decoder: Decoder_1[Any]) -> Decoder_1[Any | None]:
|
|
582
|
+
class ObjectExpr113(Decoder_1[_VALUE_ | None]):
|
|
583
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, field_name: Any=field_name, decoder: Any=decoder) -> FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]]:
|
|
584
|
+
return (decode_maybe_null(helpers, "." + field_name, decoder, helpers.get_property(field_name, value_1)) if helpers.has_property(field_name, value_1) else FSharpResult_2(0, None)) if helpers.is_object(value_1) else FSharpResult_2(1, ("", ErrorReason_1(2, "an object", value_1)))
|
|
585
|
+
|
|
586
|
+
return ObjectExpr113()
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
def bad_path_error(field_names: FSharpList[str], current_path: str | None, value_1: Any) -> FSharpResult_2[Any, tuple[str, ErrorReason_1[__A]]]:
|
|
590
|
+
return FSharpResult_2(1, ("." + default_arg(current_path, join(".", field_names)), ErrorReason_1(4, ("an object with path `" + join(".", field_names)) + "`", value_1, default_arg(try_last(field_names), ""))))
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
def map2(ctor: Callable[[_A, _B], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
594
|
+
class ObjectExpr114(Decoder_1[_OUTPUT_]):
|
|
595
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__C_]]]:
|
|
596
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__C_]]] = d1.Decode(helpers, value_1)
|
|
597
|
+
match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__C_]]] = d2.Decode(helpers, value_1)
|
|
598
|
+
copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__C_]]] = match_value
|
|
599
|
+
if copy_of_struct.tag == 1:
|
|
600
|
+
return FSharpResult_2(1, copy_of_struct.fields[0])
|
|
601
|
+
|
|
602
|
+
else:
|
|
603
|
+
copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__C_]]] = match_value_1
|
|
604
|
+
return FSharpResult_2(1, copy_of_struct_1.fields[0]) if (copy_of_struct_1.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0]))
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
return ObjectExpr114()
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
def optional_at(field_names: FSharpList[str], decoder: Decoder_1[Any]) -> Decoder_1[Any | None]:
|
|
611
|
+
class ObjectExpr115(Decoder_1[_VALUE_ | None]):
|
|
612
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], first_value: Any, field_names: Any=field_names, decoder: Any=decoder) -> FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]]:
|
|
613
|
+
def folder(tupled_arg: tuple[str, __A_, FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None], field_1: str) -> tuple[str, __A_, FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None]:
|
|
614
|
+
cur_path: str = tupled_arg[0]
|
|
615
|
+
cur_value: __A_ = tupled_arg[1]
|
|
616
|
+
res: FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None = tupled_arg[2]
|
|
617
|
+
if res is None:
|
|
618
|
+
if helpers.is_null_value(cur_value):
|
|
619
|
+
return (cur_path, cur_value, FSharpResult_2(0, None))
|
|
620
|
+
|
|
621
|
+
elif helpers.is_object(cur_value):
|
|
622
|
+
if helpers.has_property(field_1, cur_value):
|
|
623
|
+
return ((cur_path + ".") + field_1, helpers.get_property(field_1, cur_value), None)
|
|
624
|
+
|
|
625
|
+
else:
|
|
626
|
+
return (cur_path, cur_value, FSharpResult_2(0, None))
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
else:
|
|
630
|
+
return (cur_path, cur_value, FSharpResult_2(1, (cur_path, ErrorReason_1(2, "an object", cur_value))))
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
else:
|
|
634
|
+
return (cur_path, cur_value, res)
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
_arg: tuple[str, __A_, FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]] | None] = fold(folder, ("", first_value, None), field_names)
|
|
638
|
+
if _arg[2] is None:
|
|
639
|
+
last_value: __A_ = _arg[1]
|
|
640
|
+
return FSharpResult_2(0, None) if helpers.is_null_value(last_value) else decode_maybe_null(helpers, _arg[0], decoder, last_value)
|
|
641
|
+
|
|
642
|
+
else:
|
|
643
|
+
return _arg[2]
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
return ObjectExpr115()
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
def field(field_name: str, decoder: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
650
|
+
class ObjectExpr116(Decoder_1[_VALUE_]):
|
|
651
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, field_name: Any=field_name, decoder: Any=decoder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
|
|
652
|
+
if helpers.is_object(value_1):
|
|
653
|
+
if helpers.has_property(field_name, value_1):
|
|
654
|
+
field_value: __A_ = helpers.get_property(field_name, value_1)
|
|
655
|
+
path: str = "." + field_name
|
|
656
|
+
def mapping(tupled_arg: tuple[str, ErrorReason_1[__A_]]) -> tuple[str, ErrorReason_1[__A_]]:
|
|
657
|
+
return Helpers_prependPath(path, tupled_arg[0], tupled_arg[1])
|
|
658
|
+
|
|
659
|
+
return Result_MapError(mapping, decoder.Decode(helpers, field_value))
|
|
660
|
+
|
|
661
|
+
else:
|
|
662
|
+
return FSharpResult_2(1, ("", ErrorReason_1(3, ("an object with a field named `" + field_name) + "`", value_1)))
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
else:
|
|
666
|
+
return FSharpResult_2(1, ("", ErrorReason_1(2, "an object", value_1)))
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
return ObjectExpr116()
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
def at(field_names: FSharpList[str], decoder: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
673
|
+
class ObjectExpr117(Decoder_1[_VALUE_]):
|
|
674
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], first_value: Any, field_names: Any=field_names, decoder: Any=decoder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
|
|
675
|
+
def folder(tupled_arg: tuple[str, __A_, FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None], field_1: str) -> tuple[str, __A_, FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None]:
|
|
676
|
+
cur_path: str = tupled_arg[0]
|
|
677
|
+
cur_value: __A_ = tupled_arg[1]
|
|
678
|
+
res: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None = tupled_arg[2]
|
|
679
|
+
if res is None:
|
|
680
|
+
if helpers.is_null_value(cur_value):
|
|
681
|
+
return (cur_path, cur_value, bad_path_error(field_names, cur_path, first_value))
|
|
682
|
+
|
|
683
|
+
elif helpers.is_object(cur_value):
|
|
684
|
+
if helpers.has_property(field_1, cur_value):
|
|
685
|
+
return ((cur_path + ".") + field_1, helpers.get_property(field_1, cur_value), None)
|
|
686
|
+
|
|
687
|
+
else:
|
|
688
|
+
return (cur_path, cur_value, bad_path_error(field_names, None, first_value))
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
else:
|
|
692
|
+
return (cur_path, cur_value, FSharpResult_2(1, (cur_path, ErrorReason_1(2, "an object", cur_value))))
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
else:
|
|
696
|
+
return (cur_path, cur_value, res)
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
_arg: tuple[str, __A_, FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] | None] = fold(folder, ("", first_value, None), field_names)
|
|
700
|
+
def mapping(tupled_arg_1: tuple[str, ErrorReason_1[__A_]]) -> tuple[str, ErrorReason_1[__A_]]:
|
|
701
|
+
return Helpers_prependPath(_arg[0], tupled_arg_1[0], tupled_arg_1[1])
|
|
702
|
+
|
|
703
|
+
return Result_MapError(mapping, decoder.Decode(helpers, _arg[1])) if (_arg[2] is None) else _arg[2]
|
|
704
|
+
|
|
705
|
+
return ObjectExpr117()
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
def index(requested_index: int, decoder: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
709
|
+
class ObjectExpr118(Decoder_1[_VALUE_]):
|
|
710
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, requested_index: Any=requested_index, decoder: Any=decoder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
|
|
711
|
+
if helpers.is_array(value_1):
|
|
712
|
+
v_array: Array[__A_] = helpers.as_array(value_1)
|
|
713
|
+
path: str = (".[" + int32_to_string(requested_index)) + "]"
|
|
714
|
+
def mapping(tupled_arg: tuple[str, ErrorReason_1[__A_]]) -> tuple[str, ErrorReason_1[__A_]]:
|
|
715
|
+
return Helpers_prependPath(path, tupled_arg[0], tupled_arg[1])
|
|
716
|
+
|
|
717
|
+
return Result_MapError(mapping, decoder.Decode(helpers, v_array[requested_index])) if (requested_index < len(v_array)) else FSharpResult_2(1, (path, ErrorReason_1(5, ((("a longer array. Need index `" + int32_to_string(requested_index)) + "` but there are only `") + int32_to_string(len(v_array))) + "` entries", value_1)))
|
|
718
|
+
|
|
719
|
+
else:
|
|
720
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an array", value_1)))
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
return ObjectExpr118()
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
def option(decoder: Decoder_1[Any]) -> Decoder_1[Any | None]:
|
|
727
|
+
class ObjectExpr119(Decoder_1[_VALUE_ | None]):
|
|
728
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[_VALUE_ | None, tuple[str, ErrorReason_1[__A_]]]:
|
|
729
|
+
return FSharpResult_2(0, None) if helpers.is_null_value(value_1) else Result_Map(some, decoder.Decode(helpers, value_1))
|
|
730
|
+
|
|
731
|
+
return ObjectExpr119()
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
def list_1(decoder: Decoder_1[Any]) -> Decoder_1[FSharpList[Any]]:
|
|
735
|
+
class ObjectExpr121(Decoder_1[FSharpList[_VALUE_]]):
|
|
736
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[FSharpList[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
|
|
737
|
+
if helpers.is_array(value_1):
|
|
738
|
+
tokens: Array[__A_] = helpers.as_array(value_1)
|
|
739
|
+
i: int = 0
|
|
740
|
+
result: FSharpList[_VALUE_] = empty()
|
|
741
|
+
error: tuple[str, ErrorReason_1[__A_]] | None = None
|
|
742
|
+
while (error is None) if (i < len(tokens)) else False:
|
|
743
|
+
value_2: __A_ = tokens[i]
|
|
744
|
+
match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
|
|
745
|
+
if match_value.tag == 1:
|
|
746
|
+
def _arrow120(__unit: None=None) -> tuple[str, ErrorReason_1[__A_]]:
|
|
747
|
+
tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
|
|
748
|
+
return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
|
|
749
|
+
|
|
750
|
+
x: tuple[str, ErrorReason_1[__A_]] | None = _arrow120()
|
|
751
|
+
error = x
|
|
752
|
+
|
|
753
|
+
else:
|
|
754
|
+
result = append(result, singleton(match_value.fields[0]))
|
|
755
|
+
|
|
756
|
+
i = (i + 1) or 0
|
|
757
|
+
return FSharpResult_2(0, result) if (error is None) else FSharpResult_2(1, value_7(error))
|
|
758
|
+
|
|
759
|
+
else:
|
|
760
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a list", value_1)))
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
return ObjectExpr121()
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
def resize_array(decoder: Decoder_1[Any]) -> Decoder_1[Array[Any]]:
|
|
767
|
+
class ObjectExpr123(Decoder_1[Array[_VALUE_]]):
|
|
768
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
|
|
769
|
+
if helpers.is_array(value_1):
|
|
770
|
+
tokens: Array[__A_] = helpers.as_array(value_1)
|
|
771
|
+
i: int = 0
|
|
772
|
+
result: Array[_VALUE_] = []
|
|
773
|
+
error: tuple[str, ErrorReason_1[__A_]] | None = None
|
|
774
|
+
while (error is None) if (i < len(tokens)) else False:
|
|
775
|
+
value_2: __A_ = tokens[i]
|
|
776
|
+
match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
|
|
777
|
+
if match_value.tag == 1:
|
|
778
|
+
def _arrow122(__unit: None=None) -> tuple[str, ErrorReason_1[__A_]]:
|
|
779
|
+
tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
|
|
780
|
+
return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
|
|
781
|
+
|
|
782
|
+
error = _arrow122()
|
|
783
|
+
|
|
784
|
+
else:
|
|
785
|
+
(result.append(match_value.fields[0]))
|
|
786
|
+
|
|
787
|
+
i = (i + 1) or 0
|
|
788
|
+
return FSharpResult_2(0, list(result)) if (error is None) else FSharpResult_2(1, value_7(error))
|
|
789
|
+
|
|
790
|
+
else:
|
|
791
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a ResizeArray", value_1)))
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
return ObjectExpr123()
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
def seq(decoder: Decoder_1[Any]) -> Decoder_1[IEnumerable_1[Any]]:
|
|
798
|
+
class ObjectExpr125(Decoder_1[IEnumerable_1[_VALUE_]]):
|
|
799
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[IEnumerable_1[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
|
|
800
|
+
if helpers.is_array(value_1):
|
|
801
|
+
i: int = -1
|
|
802
|
+
def folder(acc: FSharpResult_2[IEnumerable_1[_VALUE_], tuple[str, ErrorReason_1[__A_]]], value_2: __A_) -> FSharpResult_2[IEnumerable_1[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
|
|
803
|
+
nonlocal i
|
|
804
|
+
i = (i + 1) or 0
|
|
805
|
+
if acc.tag == 0:
|
|
806
|
+
match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
|
|
807
|
+
if match_value.tag == 0:
|
|
808
|
+
return FSharpResult_2(0, append_1(to_enumerable([match_value.fields[0]]), acc.fields[0]))
|
|
809
|
+
|
|
810
|
+
else:
|
|
811
|
+
def _arrow124(__unit: None=None, acc: Any=acc, value_2: Any=value_2) -> tuple[str, ErrorReason_1[__A_]]:
|
|
812
|
+
tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
|
|
813
|
+
return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
|
|
814
|
+
|
|
815
|
+
return FSharpResult_2(1, _arrow124())
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
else:
|
|
819
|
+
return acc
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
return Result_Map(reverse, fold_1(folder, FSharpResult_2(0, to_enumerable([])), helpers.as_array(value_1)))
|
|
823
|
+
|
|
824
|
+
else:
|
|
825
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "a seq", value_1)))
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
return ObjectExpr125()
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
def array(decoder: Decoder_1[Any]) -> Decoder_1[Array[Any]]:
|
|
832
|
+
class ObjectExpr127(Decoder_1[Array[_VALUE_]]):
|
|
833
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
|
|
834
|
+
if helpers.is_array(value_1):
|
|
835
|
+
i: int = -1
|
|
836
|
+
tokens: Array[__A_] = helpers.as_array(value_1)
|
|
837
|
+
def folder(acc: FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]], value_2: __A_) -> FSharpResult_2[Array[_VALUE_], tuple[str, ErrorReason_1[__A_]]]:
|
|
838
|
+
nonlocal i
|
|
839
|
+
i = (i + 1) or 0
|
|
840
|
+
if acc.tag == 0:
|
|
841
|
+
acc_1: Array[_VALUE_] = acc.fields[0]
|
|
842
|
+
match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, value_2)
|
|
843
|
+
if match_value.tag == 0:
|
|
844
|
+
acc_1[i] = match_value.fields[0]
|
|
845
|
+
return FSharpResult_2(0, acc_1)
|
|
846
|
+
|
|
847
|
+
else:
|
|
848
|
+
def _arrow126(__unit: None=None, acc: Any=acc, value_2: Any=value_2) -> tuple[str, ErrorReason_1[__A_]]:
|
|
849
|
+
tupled_arg: tuple[str, ErrorReason_1[__A_]] = match_value.fields[0]
|
|
850
|
+
return Helpers_prependPath((".[" + int32_to_string(i)) + "]", tupled_arg[0], tupled_arg[1])
|
|
851
|
+
|
|
852
|
+
return FSharpResult_2(1, _arrow126())
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
else:
|
|
856
|
+
return acc
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
return fold_1(folder, FSharpResult_2(0, fill([0] * len(tokens), 0, len(tokens), None)), tokens)
|
|
860
|
+
|
|
861
|
+
else:
|
|
862
|
+
return FSharpResult_2(1, ("", ErrorReason_1(0, "an array", value_1)))
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
return ObjectExpr127()
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
class ObjectExpr128(Decoder_1[FSharpList[str]]):
|
|
869
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> FSharpResult_2[FSharpList[str], tuple[str, ErrorReason_1[__A_]]]:
|
|
870
|
+
return FSharpResult_2(0, of_seq(helpers.get_properties(value_1))) if helpers.is_object(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "an object", value_1)))
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
keys: Decoder_1[FSharpList[str]] = ObjectExpr128()
|
|
874
|
+
|
|
875
|
+
def key_value_pairs(decoder: Decoder_1[Any]) -> Decoder_1[FSharpList[tuple[str, _VALUE]]]:
|
|
876
|
+
class ObjectExpr129(Decoder_1[FSharpList[tuple[str, _VALUE_]]]):
|
|
877
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoder: Any=decoder) -> FSharpResult_2[FSharpList[tuple[str, _VALUE_]], tuple[str, ErrorReason_1[__A_]]]:
|
|
878
|
+
match_value: FSharpResult_2[FSharpList[str], tuple[str, ErrorReason_1[__A_]]] = keys.Decode(helpers, value_1)
|
|
879
|
+
def folder(acc: FSharpResult_2[FSharpList[tuple[str, _VALUE_]], tuple[str, ErrorReason_1[__A_]]], prop: str) -> FSharpResult_2[FSharpList[tuple[str, _VALUE_]], tuple[str, ErrorReason_1[__A_]]]:
|
|
880
|
+
if acc.tag == 0:
|
|
881
|
+
field_value: __A_ = helpers.get_property(prop, value_1)
|
|
882
|
+
match_value_1: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = decoder.Decode(helpers, field_value)
|
|
883
|
+
if match_value_1.tag == 0:
|
|
884
|
+
return FSharpResult_2(0, cons((prop, match_value_1.fields[0]), acc.fields[0]))
|
|
885
|
+
|
|
886
|
+
else:
|
|
887
|
+
return FSharpResult_2(1, match_value_1.fields[0])
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
else:
|
|
891
|
+
return acc
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
return FSharpResult_2(1, match_value.fields[0]) if (match_value.tag == 1) else Result_Map(reverse_1, fold(folder, FSharpResult_2(0, empty()), match_value.fields[0]))
|
|
895
|
+
|
|
896
|
+
return ObjectExpr129()
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
def one_of(decoders: FSharpList[Decoder_1[Any]]) -> Decoder_1[Any]:
|
|
900
|
+
class ObjectExpr130(Decoder_1[_VALUE_]):
|
|
901
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoders: Any=decoders) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
|
|
902
|
+
def runner(decoders_1_mut: FSharpList[Decoder_1[_VALUE_]], errors_mut: FSharpList[tuple[str, ErrorReason_1[__A_]]]) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
|
|
903
|
+
while True:
|
|
904
|
+
(decoders_1, errors) = (decoders_1_mut, errors_mut)
|
|
905
|
+
if is_empty(decoders_1):
|
|
906
|
+
return FSharpResult_2(1, ("", ErrorReason_1(7, errors)))
|
|
907
|
+
|
|
908
|
+
else:
|
|
909
|
+
match_value: FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]] = head_1(decoders_1).Decode(helpers, value_1)
|
|
910
|
+
if match_value.tag == 1:
|
|
911
|
+
decoders_1_mut = tail_1(decoders_1)
|
|
912
|
+
errors_mut = append(errors, singleton(match_value.fields[0]))
|
|
913
|
+
continue
|
|
914
|
+
|
|
915
|
+
else:
|
|
916
|
+
return FSharpResult_2(0, match_value.fields[0])
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
break
|
|
920
|
+
|
|
921
|
+
return runner(decoders, empty())
|
|
922
|
+
|
|
923
|
+
return ObjectExpr130()
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
def nil(output: Any | None=None) -> Decoder_1[Any]:
|
|
927
|
+
class ObjectExpr131(Decoder_1[_A_]):
|
|
928
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, output: Any=output) -> FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]]:
|
|
929
|
+
return FSharpResult_2(0, output) if helpers.is_null_value(value_1) else FSharpResult_2(1, ("", ErrorReason_1(0, "null", value_1)))
|
|
930
|
+
|
|
931
|
+
return ObjectExpr131()
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
def value(_arg: Any, v: Any) -> FSharpResult_2[Any, Any]:
|
|
935
|
+
return FSharpResult_2(0, v)
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
def succeed(output: Any | None=None) -> Decoder_1[Any]:
|
|
939
|
+
class ObjectExpr132(Decoder_1[_A_]):
|
|
940
|
+
def Decode(self, _arg: IDecoderHelpers_1[Any], _arg_1: Any, output: Any=output) -> FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]]:
|
|
941
|
+
return FSharpResult_2(0, output)
|
|
942
|
+
|
|
943
|
+
return ObjectExpr132()
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
def fail(msg: str) -> Decoder_1[Any]:
|
|
947
|
+
class ObjectExpr133(Decoder_1[_A_]):
|
|
948
|
+
def Decode(self, _arg: IDecoderHelpers_1[Any], _arg_1: Any, msg: Any=msg) -> FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]]:
|
|
949
|
+
return FSharpResult_2(1, ("", ErrorReason_1(6, msg)))
|
|
950
|
+
|
|
951
|
+
return ObjectExpr133()
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
def and_then(cb: Callable[[_A], Decoder_1[_B]], decoder: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
955
|
+
class ObjectExpr134(Decoder_1[_B_]):
|
|
956
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, cb: Any=cb, decoder: Any=decoder) -> FSharpResult_2[_B_, tuple[str, ErrorReason_1[__C_]]]:
|
|
957
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__C_]]] = decoder.Decode(helpers, value_1)
|
|
958
|
+
return cb(match_value.fields[0]).Decode(helpers, value_1) if (match_value.tag == 0) else FSharpResult_2(1, match_value.fields[0])
|
|
959
|
+
|
|
960
|
+
return ObjectExpr134()
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
def all(decoders: FSharpList[Decoder_1[Any]]) -> Decoder_1[FSharpList[Any]]:
|
|
964
|
+
class ObjectExpr135(Decoder_1[FSharpList[_A_]]):
|
|
965
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, decoders: Any=decoders) -> FSharpResult_2[FSharpList[_A_], tuple[str, ErrorReason_1[__B_]]]:
|
|
966
|
+
def runner(decoders_1_mut: FSharpList[Decoder_1[_A_]], values_mut: FSharpList[_A_]) -> FSharpResult_2[FSharpList[_A_], tuple[str, ErrorReason_1[__B_]]]:
|
|
967
|
+
while True:
|
|
968
|
+
(decoders_1, values) = (decoders_1_mut, values_mut)
|
|
969
|
+
if is_empty(decoders_1):
|
|
970
|
+
return FSharpResult_2(0, values)
|
|
971
|
+
|
|
972
|
+
else:
|
|
973
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]] = head_1(decoders_1).Decode(helpers, value_1)
|
|
974
|
+
if match_value.tag == 1:
|
|
975
|
+
return FSharpResult_2(1, match_value.fields[0])
|
|
976
|
+
|
|
977
|
+
else:
|
|
978
|
+
decoders_1_mut = tail_1(decoders_1)
|
|
979
|
+
values_mut = append(values, singleton(match_value.fields[0]))
|
|
980
|
+
continue
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
break
|
|
984
|
+
|
|
985
|
+
return runner(decoders, empty())
|
|
986
|
+
|
|
987
|
+
return ObjectExpr135()
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
def map(ctor: Callable[[_A], _OUTPUT], d1: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
991
|
+
class ObjectExpr136(Decoder_1[_OUTPUT_]):
|
|
992
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__B_]]]:
|
|
993
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__B_]]] = d1.Decode(helpers, value_1)
|
|
994
|
+
return FSharpResult_2(1, match_value.fields[0]) if (match_value.tag == 1) else FSharpResult_2(0, ctor(match_value.fields[0]))
|
|
995
|
+
|
|
996
|
+
return ObjectExpr136()
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
def map3(ctor: Callable[[_A, _B, _C], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1000
|
+
class ObjectExpr137(Decoder_1[_OUTPUT_]):
|
|
1001
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__D_]]]:
|
|
1002
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__D_]]] = d1.Decode(helpers, value_1)
|
|
1003
|
+
match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__D_]]] = d2.Decode(helpers, value_1)
|
|
1004
|
+
match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__D_]]] = d3.Decode(helpers, value_1)
|
|
1005
|
+
copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__D_]]] = match_value
|
|
1006
|
+
if copy_of_struct.tag == 1:
|
|
1007
|
+
return FSharpResult_2(1, copy_of_struct.fields[0])
|
|
1008
|
+
|
|
1009
|
+
else:
|
|
1010
|
+
copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__D_]]] = match_value_1
|
|
1011
|
+
if copy_of_struct_1.tag == 1:
|
|
1012
|
+
return FSharpResult_2(1, copy_of_struct_1.fields[0])
|
|
1013
|
+
|
|
1014
|
+
else:
|
|
1015
|
+
copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__D_]]] = match_value_2
|
|
1016
|
+
return FSharpResult_2(1, copy_of_struct_2.fields[0]) if (copy_of_struct_2.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0]))
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
return ObjectExpr137()
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
def map4(ctor: Callable[[_A, _B, _C, _D], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1024
|
+
class ObjectExpr138(Decoder_1[_OUTPUT_]):
|
|
1025
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__E_]]]:
|
|
1026
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__E_]]] = d1.Decode(helpers, value_1)
|
|
1027
|
+
match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__E_]]] = d2.Decode(helpers, value_1)
|
|
1028
|
+
match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__E_]]] = d3.Decode(helpers, value_1)
|
|
1029
|
+
match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__E_]]] = d4.Decode(helpers, value_1)
|
|
1030
|
+
copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__E_]]] = match_value
|
|
1031
|
+
if copy_of_struct.tag == 1:
|
|
1032
|
+
return FSharpResult_2(1, copy_of_struct.fields[0])
|
|
1033
|
+
|
|
1034
|
+
else:
|
|
1035
|
+
copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__E_]]] = match_value_1
|
|
1036
|
+
if copy_of_struct_1.tag == 1:
|
|
1037
|
+
return FSharpResult_2(1, copy_of_struct_1.fields[0])
|
|
1038
|
+
|
|
1039
|
+
else:
|
|
1040
|
+
copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__E_]]] = match_value_2
|
|
1041
|
+
if copy_of_struct_2.tag == 1:
|
|
1042
|
+
return FSharpResult_2(1, copy_of_struct_2.fields[0])
|
|
1043
|
+
|
|
1044
|
+
else:
|
|
1045
|
+
copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__E_]]] = match_value_3
|
|
1046
|
+
return FSharpResult_2(1, copy_of_struct_3.fields[0]) if (copy_of_struct_3.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0]))
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
return ObjectExpr138()
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
def map5(ctor: Callable[[_A, _B, _C, _D, _E], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1055
|
+
class ObjectExpr139(Decoder_1[_OUTPUT_]):
|
|
1056
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__F_]]]:
|
|
1057
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__F_]]] = d1.Decode(helpers, value_1)
|
|
1058
|
+
match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__F_]]] = d2.Decode(helpers, value_1)
|
|
1059
|
+
match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__F_]]] = d3.Decode(helpers, value_1)
|
|
1060
|
+
match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__F_]]] = d4.Decode(helpers, value_1)
|
|
1061
|
+
match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__F_]]] = d5.Decode(helpers, value_1)
|
|
1062
|
+
copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__F_]]] = match_value
|
|
1063
|
+
if copy_of_struct.tag == 1:
|
|
1064
|
+
return FSharpResult_2(1, copy_of_struct.fields[0])
|
|
1065
|
+
|
|
1066
|
+
else:
|
|
1067
|
+
copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__F_]]] = match_value_1
|
|
1068
|
+
if copy_of_struct_1.tag == 1:
|
|
1069
|
+
return FSharpResult_2(1, copy_of_struct_1.fields[0])
|
|
1070
|
+
|
|
1071
|
+
else:
|
|
1072
|
+
copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__F_]]] = match_value_2
|
|
1073
|
+
if copy_of_struct_2.tag == 1:
|
|
1074
|
+
return FSharpResult_2(1, copy_of_struct_2.fields[0])
|
|
1075
|
+
|
|
1076
|
+
else:
|
|
1077
|
+
copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__F_]]] = match_value_3
|
|
1078
|
+
if copy_of_struct_3.tag == 1:
|
|
1079
|
+
return FSharpResult_2(1, copy_of_struct_3.fields[0])
|
|
1080
|
+
|
|
1081
|
+
else:
|
|
1082
|
+
copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__F_]]] = match_value_4
|
|
1083
|
+
return FSharpResult_2(1, copy_of_struct_4.fields[0]) if (copy_of_struct_4.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0]))
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
return ObjectExpr139()
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
def map6(ctor: Callable[[_A, _B, _C, _D, _E, _F], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any], d6: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1093
|
+
class ObjectExpr140(Decoder_1[_OUTPUT_]):
|
|
1094
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5, d6: Any=d6) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__G_]]]:
|
|
1095
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__G_]]] = d1.Decode(helpers, value_1)
|
|
1096
|
+
match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__G_]]] = d2.Decode(helpers, value_1)
|
|
1097
|
+
match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__G_]]] = d3.Decode(helpers, value_1)
|
|
1098
|
+
match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__G_]]] = d4.Decode(helpers, value_1)
|
|
1099
|
+
match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__G_]]] = d5.Decode(helpers, value_1)
|
|
1100
|
+
match_value_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__G_]]] = d6.Decode(helpers, value_1)
|
|
1101
|
+
copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__G_]]] = match_value
|
|
1102
|
+
if copy_of_struct.tag == 1:
|
|
1103
|
+
return FSharpResult_2(1, copy_of_struct.fields[0])
|
|
1104
|
+
|
|
1105
|
+
else:
|
|
1106
|
+
copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__G_]]] = match_value_1
|
|
1107
|
+
if copy_of_struct_1.tag == 1:
|
|
1108
|
+
return FSharpResult_2(1, copy_of_struct_1.fields[0])
|
|
1109
|
+
|
|
1110
|
+
else:
|
|
1111
|
+
copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__G_]]] = match_value_2
|
|
1112
|
+
if copy_of_struct_2.tag == 1:
|
|
1113
|
+
return FSharpResult_2(1, copy_of_struct_2.fields[0])
|
|
1114
|
+
|
|
1115
|
+
else:
|
|
1116
|
+
copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__G_]]] = match_value_3
|
|
1117
|
+
if copy_of_struct_3.tag == 1:
|
|
1118
|
+
return FSharpResult_2(1, copy_of_struct_3.fields[0])
|
|
1119
|
+
|
|
1120
|
+
else:
|
|
1121
|
+
copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__G_]]] = match_value_4
|
|
1122
|
+
if copy_of_struct_4.tag == 1:
|
|
1123
|
+
return FSharpResult_2(1, copy_of_struct_4.fields[0])
|
|
1124
|
+
|
|
1125
|
+
else:
|
|
1126
|
+
copy_of_struct_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__G_]]] = match_value_5
|
|
1127
|
+
return FSharpResult_2(1, copy_of_struct_5.fields[0]) if (copy_of_struct_5.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0], copy_of_struct_5.fields[0]))
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
return ObjectExpr140()
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
def map7(ctor: Callable[[_A, _B, _C, _D, _E, _F, _G], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any], d6: Decoder_1[Any], d7: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1138
|
+
class ObjectExpr141(Decoder_1[_OUTPUT_]):
|
|
1139
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5, d6: Any=d6, d7: Any=d7) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__H_]]]:
|
|
1140
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__H_]]] = d1.Decode(helpers, value_1)
|
|
1141
|
+
match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__H_]]] = d2.Decode(helpers, value_1)
|
|
1142
|
+
match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__H_]]] = d3.Decode(helpers, value_1)
|
|
1143
|
+
match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__H_]]] = d4.Decode(helpers, value_1)
|
|
1144
|
+
match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__H_]]] = d5.Decode(helpers, value_1)
|
|
1145
|
+
match_value_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__H_]]] = d6.Decode(helpers, value_1)
|
|
1146
|
+
match_value_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__H_]]] = d7.Decode(helpers, value_1)
|
|
1147
|
+
copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__H_]]] = match_value
|
|
1148
|
+
if copy_of_struct.tag == 1:
|
|
1149
|
+
return FSharpResult_2(1, copy_of_struct.fields[0])
|
|
1150
|
+
|
|
1151
|
+
else:
|
|
1152
|
+
copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__H_]]] = match_value_1
|
|
1153
|
+
if copy_of_struct_1.tag == 1:
|
|
1154
|
+
return FSharpResult_2(1, copy_of_struct_1.fields[0])
|
|
1155
|
+
|
|
1156
|
+
else:
|
|
1157
|
+
copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__H_]]] = match_value_2
|
|
1158
|
+
if copy_of_struct_2.tag == 1:
|
|
1159
|
+
return FSharpResult_2(1, copy_of_struct_2.fields[0])
|
|
1160
|
+
|
|
1161
|
+
else:
|
|
1162
|
+
copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__H_]]] = match_value_3
|
|
1163
|
+
if copy_of_struct_3.tag == 1:
|
|
1164
|
+
return FSharpResult_2(1, copy_of_struct_3.fields[0])
|
|
1165
|
+
|
|
1166
|
+
else:
|
|
1167
|
+
copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__H_]]] = match_value_4
|
|
1168
|
+
if copy_of_struct_4.tag == 1:
|
|
1169
|
+
return FSharpResult_2(1, copy_of_struct_4.fields[0])
|
|
1170
|
+
|
|
1171
|
+
else:
|
|
1172
|
+
copy_of_struct_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__H_]]] = match_value_5
|
|
1173
|
+
if copy_of_struct_5.tag == 1:
|
|
1174
|
+
return FSharpResult_2(1, copy_of_struct_5.fields[0])
|
|
1175
|
+
|
|
1176
|
+
else:
|
|
1177
|
+
copy_of_struct_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__H_]]] = match_value_6
|
|
1178
|
+
return FSharpResult_2(1, copy_of_struct_6.fields[0]) if (copy_of_struct_6.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0], copy_of_struct_5.fields[0], copy_of_struct_6.fields[0]))
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
return ObjectExpr141()
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
def map8(ctor: Callable[[_A, _B, _C, _D, _E, _F, _G, _H], _OUTPUT], d1: Decoder_1[Any], d2: Decoder_1[Any], d3: Decoder_1[Any], d4: Decoder_1[Any], d5: Decoder_1[Any], d6: Decoder_1[Any], d7: Decoder_1[Any], d8: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1190
|
+
class ObjectExpr142(Decoder_1[_OUTPUT_]):
|
|
1191
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, ctor: Any=ctor, d1: Any=d1, d2: Any=d2, d3: Any=d3, d4: Any=d4, d5: Any=d5, d6: Any=d6, d7: Any=d7, d8: Any=d8) -> FSharpResult_2[_OUTPUT_, tuple[str, ErrorReason_1[__I_]]]:
|
|
1192
|
+
match_value: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__I_]]] = d1.Decode(helpers, value_1)
|
|
1193
|
+
match_value_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__I_]]] = d2.Decode(helpers, value_1)
|
|
1194
|
+
match_value_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__I_]]] = d3.Decode(helpers, value_1)
|
|
1195
|
+
match_value_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__I_]]] = d4.Decode(helpers, value_1)
|
|
1196
|
+
match_value_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__I_]]] = d5.Decode(helpers, value_1)
|
|
1197
|
+
match_value_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__I_]]] = d6.Decode(helpers, value_1)
|
|
1198
|
+
match_value_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__I_]]] = d7.Decode(helpers, value_1)
|
|
1199
|
+
match_value_7: FSharpResult_2[_H_, tuple[str, ErrorReason_1[__I_]]] = d8.Decode(helpers, value_1)
|
|
1200
|
+
copy_of_struct: FSharpResult_2[_A_, tuple[str, ErrorReason_1[__I_]]] = match_value
|
|
1201
|
+
if copy_of_struct.tag == 1:
|
|
1202
|
+
return FSharpResult_2(1, copy_of_struct.fields[0])
|
|
1203
|
+
|
|
1204
|
+
else:
|
|
1205
|
+
copy_of_struct_1: FSharpResult_2[_B_, tuple[str, ErrorReason_1[__I_]]] = match_value_1
|
|
1206
|
+
if copy_of_struct_1.tag == 1:
|
|
1207
|
+
return FSharpResult_2(1, copy_of_struct_1.fields[0])
|
|
1208
|
+
|
|
1209
|
+
else:
|
|
1210
|
+
copy_of_struct_2: FSharpResult_2[_C_, tuple[str, ErrorReason_1[__I_]]] = match_value_2
|
|
1211
|
+
if copy_of_struct_2.tag == 1:
|
|
1212
|
+
return FSharpResult_2(1, copy_of_struct_2.fields[0])
|
|
1213
|
+
|
|
1214
|
+
else:
|
|
1215
|
+
copy_of_struct_3: FSharpResult_2[_D_, tuple[str, ErrorReason_1[__I_]]] = match_value_3
|
|
1216
|
+
if copy_of_struct_3.tag == 1:
|
|
1217
|
+
return FSharpResult_2(1, copy_of_struct_3.fields[0])
|
|
1218
|
+
|
|
1219
|
+
else:
|
|
1220
|
+
copy_of_struct_4: FSharpResult_2[_E_, tuple[str, ErrorReason_1[__I_]]] = match_value_4
|
|
1221
|
+
if copy_of_struct_4.tag == 1:
|
|
1222
|
+
return FSharpResult_2(1, copy_of_struct_4.fields[0])
|
|
1223
|
+
|
|
1224
|
+
else:
|
|
1225
|
+
copy_of_struct_5: FSharpResult_2[_F_, tuple[str, ErrorReason_1[__I_]]] = match_value_5
|
|
1226
|
+
if copy_of_struct_5.tag == 1:
|
|
1227
|
+
return FSharpResult_2(1, copy_of_struct_5.fields[0])
|
|
1228
|
+
|
|
1229
|
+
else:
|
|
1230
|
+
copy_of_struct_6: FSharpResult_2[_G_, tuple[str, ErrorReason_1[__I_]]] = match_value_6
|
|
1231
|
+
if copy_of_struct_6.tag == 1:
|
|
1232
|
+
return FSharpResult_2(1, copy_of_struct_6.fields[0])
|
|
1233
|
+
|
|
1234
|
+
else:
|
|
1235
|
+
copy_of_struct_7: FSharpResult_2[_H_, tuple[str, ErrorReason_1[__I_]]] = match_value_7
|
|
1236
|
+
return FSharpResult_2(1, copy_of_struct_7.fields[0]) if (copy_of_struct_7.tag == 1) else FSharpResult_2(0, ctor(copy_of_struct.fields[0], copy_of_struct_1.fields[0], copy_of_struct_2.fields[0], copy_of_struct_3.fields[0], copy_of_struct_4.fields[0], copy_of_struct_5.fields[0], copy_of_struct_6.fields[0], copy_of_struct_7.fields[0]))
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
return ObjectExpr142()
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
def and_map(__unit: None=None) -> Callable[[Decoder_1[_A], Decoder_1[Callable[[_A], _B]]], Decoder_1[_B]]:
|
|
1249
|
+
def _arrow144(d: Decoder_1[_A]) -> Callable[[Decoder_1[Callable[[_A], _B]]], Decoder_1[_B]]:
|
|
1250
|
+
def _arrow143(d_1: Decoder_1[Callable[[_A], _B]]) -> Decoder_1[_B]:
|
|
1251
|
+
def ctor(arg: _A, func: Callable[[_A], _B]) -> _B:
|
|
1252
|
+
return func(arg)
|
|
1253
|
+
|
|
1254
|
+
return map2(ctor, d, d_1)
|
|
1255
|
+
|
|
1256
|
+
return _arrow143
|
|
1257
|
+
|
|
1258
|
+
return _arrow144
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
class IRequiredGetter(Protocol):
|
|
1262
|
+
@abstractmethod
|
|
1263
|
+
def At(self, __arg0: FSharpList[str], __arg1: Decoder_1[_A]) -> _A:
|
|
1264
|
+
...
|
|
1265
|
+
|
|
1266
|
+
@abstractmethod
|
|
1267
|
+
def Field(self, __arg0: str, __arg1: Decoder_1[_A]) -> _A:
|
|
1268
|
+
...
|
|
1269
|
+
|
|
1270
|
+
@abstractmethod
|
|
1271
|
+
def Raw(self, __arg0: Decoder_1[_A]) -> _A:
|
|
1272
|
+
...
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
class IOptionalGetter(Protocol):
|
|
1276
|
+
@abstractmethod
|
|
1277
|
+
def At(self, __arg0: FSharpList[str], __arg1: Decoder_1[_A]) -> _A | None:
|
|
1278
|
+
...
|
|
1279
|
+
|
|
1280
|
+
@abstractmethod
|
|
1281
|
+
def Field(self, __arg0: str, __arg1: Decoder_1[_A]) -> _A | None:
|
|
1282
|
+
...
|
|
1283
|
+
|
|
1284
|
+
@abstractmethod
|
|
1285
|
+
def Raw(self, __arg0: Decoder_1[_A]) -> _A | None:
|
|
1286
|
+
...
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
class IGetters(Protocol):
|
|
1290
|
+
@property
|
|
1291
|
+
@abstractmethod
|
|
1292
|
+
def Optional(self) -> IOptionalGetter:
|
|
1293
|
+
...
|
|
1294
|
+
|
|
1295
|
+
@property
|
|
1296
|
+
@abstractmethod
|
|
1297
|
+
def Required(self) -> IRequiredGetter:
|
|
1298
|
+
...
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
def unwrap_with(errors: Array[tuple[str, ErrorReason_1[_JSONVALUE]]], helpers: IDecoderHelpers_1[Any], decoder: Decoder_1[Any], value_1: Any) -> Any:
|
|
1302
|
+
match_value: FSharpResult_2[_T, tuple[str, ErrorReason_1[_JSONVALUE]]] = decoder.Decode(helpers, value_1)
|
|
1303
|
+
if match_value.tag == 1:
|
|
1304
|
+
(errors.append(match_value.fields[0]))
|
|
1305
|
+
return None
|
|
1306
|
+
|
|
1307
|
+
else:
|
|
1308
|
+
return match_value.fields[0]
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
def _expr149(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
|
|
1313
|
+
return class_type("Thoth.Json.Core.Decode.Getters`2", [gen0, gen1], Getters_2)
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
class Getters_2(Generic[_JSONVALUE, _T]):
|
|
1317
|
+
def __init__(self, helpers: IDecoderHelpers_1[Any], value_1: Any) -> None:
|
|
1318
|
+
self.errors: Array[tuple[str, ErrorReason_1[_JSONVALUE]]] = []
|
|
1319
|
+
def _arrow146(__unit: None=None) -> IRequiredGetter:
|
|
1320
|
+
_this: Any = self
|
|
1321
|
+
class ObjectExpr145(IRequiredGetter):
|
|
1322
|
+
def Field(self, field_name: str, decoder: Decoder_1[Any]) -> Any:
|
|
1323
|
+
return unwrap_with(_this.errors, helpers, field(field_name, decoder), value_1)
|
|
1324
|
+
|
|
1325
|
+
def At(self, field_names: FSharpList[str], decoder_1: Decoder_1[Any]) -> Any:
|
|
1326
|
+
return unwrap_with(_this.errors, helpers, at(field_names, decoder_1), value_1)
|
|
1327
|
+
|
|
1328
|
+
def Raw(self, decoder_2: Decoder_1[Any]) -> Any:
|
|
1329
|
+
return unwrap_with(_this.errors, helpers, decoder_2, value_1)
|
|
1330
|
+
|
|
1331
|
+
return ObjectExpr145()
|
|
1332
|
+
|
|
1333
|
+
self.required: IRequiredGetter = _arrow146()
|
|
1334
|
+
def _arrow148(__unit: None=None) -> IOptionalGetter:
|
|
1335
|
+
_this_1: Any = self
|
|
1336
|
+
class ObjectExpr147(IOptionalGetter):
|
|
1337
|
+
def Field(self, field_name_1: str, decoder_3: Decoder_1[Any]) -> Any | None:
|
|
1338
|
+
return unwrap_with(_this_1.errors, helpers, optional(field_name_1, decoder_3), value_1)
|
|
1339
|
+
|
|
1340
|
+
def At(self, field_names_1: FSharpList[str], decoder_4: Decoder_1[Any]) -> Any | None:
|
|
1341
|
+
return unwrap_with(_this_1.errors, helpers, optional_at(field_names_1, decoder_4), value_1)
|
|
1342
|
+
|
|
1343
|
+
def Raw(self, decoder_5: Decoder_1[Any]) -> Any | None:
|
|
1344
|
+
match_value: FSharpResult_2[__A_, tuple[str, ErrorReason_1[_JSONVALUE_]]] = decoder_5.Decode(helpers, value_1)
|
|
1345
|
+
if match_value.tag == 1:
|
|
1346
|
+
reason: ErrorReason_1[_JSONVALUE_] = match_value.fields[0][1]
|
|
1347
|
+
error: tuple[str, ErrorReason_1[_JSONVALUE_]] = match_value.fields[0]
|
|
1348
|
+
(pattern_matching_result, v_1) = (None, None)
|
|
1349
|
+
if reason.tag == 1:
|
|
1350
|
+
pattern_matching_result = 0
|
|
1351
|
+
v_1 = reason.fields[1]
|
|
1352
|
+
|
|
1353
|
+
elif reason.tag == 2:
|
|
1354
|
+
pattern_matching_result = 0
|
|
1355
|
+
v_1 = reason.fields[1]
|
|
1356
|
+
|
|
1357
|
+
elif (reason.tag == 3) or (reason.tag == 4):
|
|
1358
|
+
pattern_matching_result = 1
|
|
1359
|
+
|
|
1360
|
+
elif ((reason.tag == 5) or (reason.tag == 6)) or (reason.tag == 7):
|
|
1361
|
+
pattern_matching_result = 2
|
|
1362
|
+
|
|
1363
|
+
else:
|
|
1364
|
+
pattern_matching_result = 0
|
|
1365
|
+
v_1 = reason.fields[1]
|
|
1366
|
+
|
|
1367
|
+
if pattern_matching_result == 0:
|
|
1368
|
+
if helpers.is_null_value(v_1):
|
|
1369
|
+
return None
|
|
1370
|
+
|
|
1371
|
+
else:
|
|
1372
|
+
(_this_1.errors.append(error))
|
|
1373
|
+
return None
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
elif pattern_matching_result == 1:
|
|
1377
|
+
return None
|
|
1378
|
+
|
|
1379
|
+
elif pattern_matching_result == 2:
|
|
1380
|
+
(_this_1.errors.append(error))
|
|
1381
|
+
return None
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
else:
|
|
1385
|
+
return some(match_value.fields[0])
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
return ObjectExpr147()
|
|
1389
|
+
|
|
1390
|
+
self.optional: IOptionalGetter = _arrow148()
|
|
1391
|
+
|
|
1392
|
+
@property
|
|
1393
|
+
def Required(self, __unit: None=None) -> IRequiredGetter:
|
|
1394
|
+
__: Getters_2[_JSONVALUE, _T] = self
|
|
1395
|
+
return __.required
|
|
1396
|
+
|
|
1397
|
+
@property
|
|
1398
|
+
def Optional(self, __unit: None=None) -> IOptionalGetter:
|
|
1399
|
+
__: Getters_2[_JSONVALUE, _T] = self
|
|
1400
|
+
return __.optional
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
Getters_2_reflection = _expr149
|
|
1404
|
+
|
|
1405
|
+
def Getters_2__ctor_Z4BE6C149(helpers: IDecoderHelpers_1[Any], value_1: Any) -> Getters_2[_JSONVALUE]:
|
|
1406
|
+
return Getters_2(helpers, value_1)
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
def Getters_2__get_Errors(__: Getters_2[Any, Any]) -> FSharpList[tuple[str, ErrorReason_1[_JSONVALUE]]]:
|
|
1410
|
+
return to_list(__.errors)
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
def object(builder: Callable[[IGetters], _VALUE]) -> Decoder_1[Any]:
|
|
1414
|
+
class ObjectExpr150(Decoder_1[_VALUE_]):
|
|
1415
|
+
def Decode(self, helpers: IDecoderHelpers_1[Any], value_1: Any, builder: Any=builder) -> FSharpResult_2[_VALUE_, tuple[str, ErrorReason_1[__A_]]]:
|
|
1416
|
+
getters: Getters_2[__A_, Any] = Getters_2__ctor_Z4BE6C149(helpers, value_1)
|
|
1417
|
+
result: _VALUE_ = builder(getters)
|
|
1418
|
+
match_value: FSharpList[tuple[str, ErrorReason_1[__A_]]] = Getters_2__get_Errors(getters)
|
|
1419
|
+
if not is_empty(match_value):
|
|
1420
|
+
errors: FSharpList[tuple[str, ErrorReason_1[__A_]]] = match_value
|
|
1421
|
+
return FSharpResult_2(1, ("", ErrorReason_1(7, errors))) if (length(errors) > 1) else FSharpResult_2(1, head_1(match_value))
|
|
1422
|
+
|
|
1423
|
+
else:
|
|
1424
|
+
return FSharpResult_2(0, result)
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
return ObjectExpr150()
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
def tuple2(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2]]:
|
|
1431
|
+
def cb_1(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2) -> Decoder_1[tuple[_T1, _T2]]:
|
|
1432
|
+
def cb(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2]]:
|
|
1433
|
+
return succeed((v1, v2))
|
|
1434
|
+
|
|
1435
|
+
return and_then(cb, index(1, decoder2))
|
|
1436
|
+
|
|
1437
|
+
return and_then(cb_1, index(0, decoder1))
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
def tuple3(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3]]:
|
|
1441
|
+
def cb_2(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3) -> Decoder_1[tuple[_T1, _T2, _T3]]:
|
|
1442
|
+
def cb_1(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3]]:
|
|
1443
|
+
def cb(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3]]:
|
|
1444
|
+
return succeed((v1, v2, v3))
|
|
1445
|
+
|
|
1446
|
+
return and_then(cb, index(2, decoder3))
|
|
1447
|
+
|
|
1448
|
+
return and_then(cb_1, index(1, decoder2))
|
|
1449
|
+
|
|
1450
|
+
return and_then(cb_2, index(0, decoder1))
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
def tuple4(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
|
|
1454
|
+
def cb_3(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
|
|
1455
|
+
def cb_2(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
|
|
1456
|
+
def cb_1(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
|
|
1457
|
+
def cb(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4]]:
|
|
1458
|
+
return succeed((v1, v2, v3, v4))
|
|
1459
|
+
|
|
1460
|
+
return and_then(cb, index(3, decoder4))
|
|
1461
|
+
|
|
1462
|
+
return and_then(cb_1, index(2, decoder3))
|
|
1463
|
+
|
|
1464
|
+
return and_then(cb_2, index(1, decoder2))
|
|
1465
|
+
|
|
1466
|
+
return and_then(cb_3, index(0, decoder1))
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
def tuple5(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
|
|
1470
|
+
def cb_4(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
|
|
1471
|
+
def cb_3(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
|
|
1472
|
+
def cb_2(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
|
|
1473
|
+
def cb_1(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
|
|
1474
|
+
def cb(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5]]:
|
|
1475
|
+
return succeed((v1, v2, v3, v4, v5))
|
|
1476
|
+
|
|
1477
|
+
return and_then(cb, index(4, decoder5))
|
|
1478
|
+
|
|
1479
|
+
return and_then(cb_1, index(3, decoder4))
|
|
1480
|
+
|
|
1481
|
+
return and_then(cb_2, index(2, decoder3))
|
|
1482
|
+
|
|
1483
|
+
return and_then(cb_3, index(1, decoder2))
|
|
1484
|
+
|
|
1485
|
+
return and_then(cb_4, index(0, decoder1))
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
def tuple6(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any], decoder6: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
|
|
1489
|
+
def cb_5(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5, decoder6: Any=decoder6) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
|
|
1490
|
+
def cb_4(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
|
|
1491
|
+
def cb_3(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
|
|
1492
|
+
def cb_2(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
|
|
1493
|
+
def cb_1(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
|
|
1494
|
+
def cb(v6: _T6 | None=None, v5: Any=v5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]:
|
|
1495
|
+
return succeed((v1, v2, v3, v4, v5, v6))
|
|
1496
|
+
|
|
1497
|
+
return and_then(cb, index(5, decoder6))
|
|
1498
|
+
|
|
1499
|
+
return and_then(cb_1, index(4, decoder5))
|
|
1500
|
+
|
|
1501
|
+
return and_then(cb_2, index(3, decoder4))
|
|
1502
|
+
|
|
1503
|
+
return and_then(cb_3, index(2, decoder3))
|
|
1504
|
+
|
|
1505
|
+
return and_then(cb_4, index(1, decoder2))
|
|
1506
|
+
|
|
1507
|
+
return and_then(cb_5, index(0, decoder1))
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
def tuple7(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any], decoder6: Decoder_1[Any], decoder7: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1511
|
+
def cb_6(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5, decoder6: Any=decoder6, decoder7: Any=decoder7) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1512
|
+
def cb_5(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1513
|
+
def cb_4(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1514
|
+
def cb_3(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1515
|
+
def cb_2(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1516
|
+
def cb_1(v6: _T6 | None=None, v5: Any=v5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1517
|
+
def cb(v7: _T7 | None=None, v6: Any=v6) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7]]:
|
|
1518
|
+
return succeed((v1, v2, v3, v4, v5, v6, v7))
|
|
1519
|
+
|
|
1520
|
+
return and_then(cb, index(6, decoder7))
|
|
1521
|
+
|
|
1522
|
+
return and_then(cb_1, index(5, decoder6))
|
|
1523
|
+
|
|
1524
|
+
return and_then(cb_2, index(4, decoder5))
|
|
1525
|
+
|
|
1526
|
+
return and_then(cb_3, index(3, decoder4))
|
|
1527
|
+
|
|
1528
|
+
return and_then(cb_4, index(2, decoder3))
|
|
1529
|
+
|
|
1530
|
+
return and_then(cb_5, index(1, decoder2))
|
|
1531
|
+
|
|
1532
|
+
return and_then(cb_6, index(0, decoder1))
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
def tuple8(decoder1: Decoder_1[Any], decoder2: Decoder_1[Any], decoder3: Decoder_1[Any], decoder4: Decoder_1[Any], decoder5: Decoder_1[Any], decoder6: Decoder_1[Any], decoder7: Decoder_1[Any], decoder8: Decoder_1[Any]) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1536
|
+
def cb_7(v1: _T1 | None=None, decoder1: Any=decoder1, decoder2: Any=decoder2, decoder3: Any=decoder3, decoder4: Any=decoder4, decoder5: Any=decoder5, decoder6: Any=decoder6, decoder7: Any=decoder7, decoder8: Any=decoder8) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1537
|
+
def cb_6(v2: _T2 | None=None, v1: Any=v1) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1538
|
+
def cb_5(v3: _T3 | None=None, v2: Any=v2) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1539
|
+
def cb_4(v4: _T4 | None=None, v3: Any=v3) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1540
|
+
def cb_3(v5: _T5 | None=None, v4: Any=v4) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1541
|
+
def cb_2(v6: _T6 | None=None, v5: Any=v5) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1542
|
+
def cb_1(v7: _T7 | None=None, v6: Any=v6) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1543
|
+
def cb(v8: _T8 | None=None, v7: Any=v7) -> Decoder_1[tuple[_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]:
|
|
1544
|
+
return succeed((v1, v2, v3, v4, v5, v6, v7, v8))
|
|
1545
|
+
|
|
1546
|
+
return and_then(cb, index(7, decoder8))
|
|
1547
|
+
|
|
1548
|
+
return and_then(cb_1, index(6, decoder7))
|
|
1549
|
+
|
|
1550
|
+
return and_then(cb_2, index(5, decoder6))
|
|
1551
|
+
|
|
1552
|
+
return and_then(cb_3, index(4, decoder5))
|
|
1553
|
+
|
|
1554
|
+
return and_then(cb_4, index(3, decoder4))
|
|
1555
|
+
|
|
1556
|
+
return and_then(cb_5, index(2, decoder3))
|
|
1557
|
+
|
|
1558
|
+
return and_then(cb_6, index(1, decoder2))
|
|
1559
|
+
|
|
1560
|
+
return and_then(cb_7, index(0, decoder1))
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
def dict_1(decoder: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1564
|
+
def _arrow152(elements: FSharpList[tuple[str, _VALUE]], decoder: Any=decoder) -> Any:
|
|
1565
|
+
class ObjectExpr151:
|
|
1566
|
+
@property
|
|
1567
|
+
def Compare(self) -> Callable[[str, str], int]:
|
|
1568
|
+
return compare_primitives
|
|
1569
|
+
|
|
1570
|
+
return of_list(elements, ObjectExpr151())
|
|
1571
|
+
|
|
1572
|
+
return map(_arrow152, key_value_pairs(decoder))
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
def map_0027(key_decoder: Decoder_1[Any], value_decoder: Decoder_1[Any]) -> Decoder_1[Any]:
|
|
1576
|
+
def _arrow154(elements: Array[tuple[_KEY, _VALUE]], key_decoder: Any=key_decoder, value_decoder: Any=value_decoder) -> Any:
|
|
1577
|
+
class ObjectExpr153:
|
|
1578
|
+
@property
|
|
1579
|
+
def Compare(self) -> Callable[[_KEY_, _KEY_], int]:
|
|
1580
|
+
return compare
|
|
1581
|
+
|
|
1582
|
+
return of_seq_1(elements, ObjectExpr153())
|
|
1583
|
+
|
|
1584
|
+
return map(_arrow154, array(tuple2(key_decoder, value_decoder)))
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
__all__ = ["Helpers_prependPath", "generic_msg", "error_to_string", "Advanced_fromValue", "string", "char", "guid", "unit", "sbyte", "byte", "int16", "uint16", "int_1", "uint32", "int64", "uint64", "bigint", "bool_1", "float_1", "float32", "decimal", "datetime_local", "timespan", "decode_maybe_null", "optional", "bad_path_error", "map2", "optional_at", "field", "at", "index", "option", "list_1", "resize_array", "seq", "array", "keys", "key_value_pairs", "one_of", "nil", "value", "succeed", "fail", "and_then", "all", "map", "map3", "map4", "map5", "map6", "map7", "map8", "and_map", "unwrap_with", "Getters_2_reflection", "Getters_2__get_Errors", "object", "tuple2", "tuple3", "tuple4", "tuple5", "tuple6", "tuple7", "tuple8", "dict_1", "map_0027"]
|
|
1588
|
+
|