[{"name":"Rdf","comment":" This module defines the types and helper functions to work with the basic\nbuildings blocks of the RDF ecosystem. If you are new to RDF, you should take\na look at the [RDF 1.1 Primer](https://www.w3.org/TR/rdf11-primer/) for\na introduction on its data model.\n\n@docs Triple, Quad\n@docs Term\n\n\n# Create\n\nThis section contains helper functions to create [`Term`](#Term)'s from Elm\nvalues.\n\n@docs iri\n@docs blankNode\n@docs literal\n@docs varQ, varD\n@docs inverse, sequence, alternative, zeroOrMore, oneOrMore, zeroOrOne\n\n\n## Minting\n\n@docs Seed, initialSeed, seedGenerator\n@docs mintBlankNode\n\n\n## Specific literals\n\n@docs string, langString\n@docs boolean\n\n\n### Numerical\n\n@docs decimal\n@docs integer, int\n@docs double, float\n\n\n### Temporal\n\n@docs date, dateTime\n\n\n# Conversions\n\n\n## Specialize\n\nThis section contains helper functions to convert any [`Term`](#Term)'s into\na more specific variant.\n\n@docs toIri\n@docs toBlankNode\n@docs toLiteral\n@docs toVar\n@docs toBlankNodeOrIri, toBlankNodeOrIriOrLiteral\n\n\n## Elm values\n\nThis section contains helper functions to convert specific [`Term`](#Term)'s\ninto Elm values.\n\n@docs toUrl\n@docs PropertyPath, toPropertyPath\n@docs lexicalForm, datatype\n@docs toString, toLangString\n@docs toInt, toFloat, toDecimal\n@docs toDate, toDateTime\n@docs toBool\n\n\n## Transform IRI's\n\nA few helper functions to transform [`Iri`](#Iri)'s.\n\n@docs appendPath\n@docs dropFragment, setFragment\n@docs setQueryParam\n\n\n## Transform query variables\n\n@docs append\n\n\n# Property paths\n\n@docs startsWith\n@docs rightOf\n@docs lastPredicatePath\n\n\n# Serialization\n\n@docs serialize, serializeWith, Prologue\n@docs serializeTriple, serializeQuad\n\n\n# Helper\n\n@docs a\n\n\n## Namespaces\n\nA few helpers for commonly used IRI prefixes.\n\n@docs rdf, rdfs, xsd\n@docs owl, sh\n@docs dcterms, prov\n@docs schema\n\n\n# Types\n\n\n## Basic\n\n@docs Iri, IsIri, asIri\n@docs BlankNode, IsBlankNode, asBlankNode\n@docs Literal, IsLiteral, asLiteral\n@docs Var, IsVar, asVar\n@docs Path, IsPath, asPath\n\n\n## Combinations\n\n@docs BlankNodeOrIri, IsBlankNodeOrIri, asBlankNodeOrIri\n@docs BlankNodeOrIriOrLiteral, IsBlankNodeOrIriOrLiteral, asBlankNodeOrIriOrLiteral\n@docs BlankNodeOrIriOrLiteralOrVar, IsBlankNodeOrIriOrLiteralOrVar, asBlankNodeOrIriOrLiteralOrVar\n@docs BlankNodeOrIriOrVar, IsBlankNodeOrIriOrVar, asBlankNodeOrIriOrVar\n@docs IriOrVar, IsIriOrVar, asIriOrVar\n@docs IriOrLiteralOrVar, IsIriOrLiteralOrVar, asIriOrLiteralOrVar\n@docs VarOrPath, IsVarOrPath, asVarOrPath\n\n\n## Utility\n\n@docs Compatible\n\n","unions":[{"name":"Compatible","comment":" You can ignore this type, it is only used for implementing the different\n`Term` variants.\n","args":[],"cases":[]},{"name":"PropertyPath","comment":" A `PropertyPath` models the inner structure of a [`Path`](#Path).\n","args":[],"cases":[["Predicate",["Rdf.Iri"]],["Inverse",["Rdf.PropertyPath"]],["Sequence",["Rdf.PropertyPath","List.List Rdf.PropertyPath"]],["Alternative",["Rdf.PropertyPath","List.List Rdf.PropertyPath"]],["ZeroOrMore",["Rdf.PropertyPath"]],["OneOrMore",["Rdf.PropertyPath"]],["ZeroOrOne",["Rdf.PropertyPath"]]]}],"aliases":[{"name":"BlankNode","comment":" An RDF term which can only be a\n[blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node). This type\nwill only be used as the return type of functions and if the values need to be\nstored in the model. Take a look at [Term](Rdf#Term) for a general explanation\nof the idea behind this.\n","args":[],"type":"Rdf.Term { blankNodeOrIri : Rdf.Compatible, blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible }"},{"name":"BlankNodeOrIri","comment":" An RDF term which can only be a\n[blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node) or an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri). This type will only be\nused as the return type of functions and if the values need to be stored in the\nmodel. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":[],"type":"Rdf.Term { blankNodeOrIri : Rdf.Compatible, blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible }"},{"name":"BlankNodeOrIriOrLiteral","comment":" An RDF term which can only be a\n[blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), or\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal). This type will\nonly be used as the return type of functions and if the values need to be\nstored in the model. Take a look at [Term](Rdf#Term) for a general explanation\nof the idea behind this.\n","args":[],"type":"Rdf.Term { blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible }"},{"name":"BlankNodeOrIriOrLiteralOrVar","comment":" An RDF term which can only be a\n[blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri),\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal), or a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables). This\ntype will only be used as the return type of functions and if the values need\nto be stored in the model. Take a look at [Term](Rdf#Term) for a general\nexplanation of the idea behind this.\n","args":[],"type":"Rdf.Term { blankNodeOrIriOrLiteralOrVar : Rdf.Compatible }"},{"name":"BlankNodeOrIriOrVar","comment":" An RDF term which can only be a\n[blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), or a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables). This\ntype will only be used as the return type of functions and if the values need\nto be stored in the model. Take a look at [Term](Rdf#Term) for a general\nexplanation of the idea behind this.\n","args":[],"type":"Rdf.Term { blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible }"},{"name":"Iri","comment":" An RDF term which can only be an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri). This type will only be\nused as the return type of functions and if the values need to be stored in the\nmodel. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":[],"type":"Rdf.Term { iri : Rdf.Compatible, blankNodeOrIri : Rdf.Compatible, blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible, iriOrVar : Rdf.Compatible, varOrPath : Rdf.Compatible, path : Rdf.Compatible }"},{"name":"IriOrLiteralOrVar","comment":" An RDF term which can only be an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri),\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal), or a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables). This\ntype will only be used as the return type of functions and if the values need\nto be stored in the model. Take a look at [Term](Rdf#Term) for a general\nexplanation of the idea behind this.\n","args":[],"type":"Rdf.Term { iriOrLiteralOrVar : Rdf.Compatible }"},{"name":"IriOrVar","comment":" An RDF term which can only be an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), or a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables). This\ntype will only be used as the return type of functions and if the values need\nto be stored in the model. Take a look at [Term](Rdf#Term) for a general\nexplanation of the idea behind this.\n","args":[],"type":"Rdf.Term { blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible, iriOrVar : Rdf.Compatible, varOrPath : Rdf.Compatible }"},{"name":"IsBlankNode","comment":" This type will only be used as the argument of functions and ensures that\nonly [blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | blankNodeOrIri : Rdf.Compatible, blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible }"},{"name":"IsBlankNodeOrIri","comment":" This type will only be used as the argument of functions and ensures that\nonly [blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node)'s or\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)'s are passed. Take a look\nat [Term](Rdf#Term) for a general explanation of the idea behind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | blankNodeOrIri : Rdf.Compatible, blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible }"},{"name":"IsBlankNodeOrIriOrLiteral","comment":" This type will only be used as the argument of functions and ensures that\nonly [blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node)'s,\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)'s, or\n[literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal)'s are passed. Take\na look at [Term](Rdf#Term) for a general explanation of the idea behind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible }"},{"name":"IsBlankNodeOrIriOrLiteralOrVar","comment":" This type will only be used as the argument of functions and ensures that\nonly [blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node)'s,\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)'s,\n[literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal)'s, or [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | blankNodeOrIriOrLiteralOrVar : Rdf.Compatible }"},{"name":"IsBlankNodeOrIriOrVar","comment":" This type will only be used as the argument of functions and ensures that\nonly [blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node)'s,\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)'s, or [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible }"},{"name":"IsIri","comment":" This type will only be used as the argument of functions and ensures that\nonly [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)'s are passed. Take\na look at [Term](Rdf#Term) for a general explanation of the idea behind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | iri : Rdf.Compatible, blankNodeOrIri : Rdf.Compatible, blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible, iriOrVar : Rdf.Compatible, varOrPath : Rdf.Compatible, path : Rdf.Compatible }"},{"name":"IsIriOrLiteralOrVar","comment":" This type will only be used as the argument of functions and ensures that\nonly [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)'s,\n[literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal)'s, or [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | iriOrLiteralOrVar : Rdf.Compatible }"},{"name":"IsIriOrVar","comment":" This type will only be used as the argument of functions and ensures that\nonly [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)'s, or [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible, iriOrVar : Rdf.Compatible, varOrPath : Rdf.Compatible }"},{"name":"IsLiteral","comment":" This type will only be used as the argument of functions and ensures that\nonly [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal)'s are passed.\nTake a look at [Term](Rdf#Term) for a general explanation of the idea behind\nthis.\n","args":["compatible"],"type":"Rdf.Term { compatible | blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible }"},{"name":"IsPath","comment":" This type will only be used as the argument of functions and ensures that\nonly [property path](https://www.w3.org/TR/sparql11-query/#propertypaths)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | varOrPath : Rdf.Compatible, path : Rdf.Compatible }"},{"name":"IsVar","comment":" This type will only be used as the argument of functions and ensures that\nonly [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | isVar : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible, iriOrVar : Rdf.Compatible, varOrPath : Rdf.Compatible }"},{"name":"IsVarOrPath","comment":" This type will only be used as the argument of functions and ensures that\nonly [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables)'s or\n[property path](https://www.w3.org/TR/sparql11-query/#propertypaths)'s are\npassed. Take a look at [Term](Rdf#Term) for a general explanation of the idea\nbehind this.\n","args":["compatible"],"type":"Rdf.Term { compatible | varOrPath : Rdf.Compatible }"},{"name":"Literal","comment":" An RDF term which can only be a\n[literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal). This type will\nonly be used as the return type of functions and if the values need to be\nstored in the model. Take a look at [Term](Rdf#Term) for a general explanation\nof the idea behind this.\n","args":[],"type":"Rdf.Term { blankNodeOrIriOrLiteral : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible }"},{"name":"Path","comment":" An RDF term which can only be a\n[property path](https://www.w3.org/TR/sparql11-query/#propertypaths). This type\nwill only be used as the return type of functions and if the values need to be\nstored in the model. Take a look at [Term](Rdf#Term) for a general explanation\nof the idea behind this.\n","args":[],"type":"Rdf.Term { varOrPath : Rdf.Compatible, path : Rdf.Compatible }"},{"name":"Prologue","comment":" A `Prologue` captures the `base` and `prefixes` which are used to\nshorten the serialization of [`Term`](#Term)'s.\n","args":[],"type":"{ base : Maybe.Maybe String.String, prefixes : List.List ( String.String, String.String ) }"},{"name":"Quad","comment":" This type represents an RDF quad. It consists of\n\n  - a subject, which must be an\n    [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri) or a [blank\n    node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node),\n  - a predicate, which must be an\n    [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri),\n  - an object, which can be any RDF term, i.e. an\n    [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), a [blank\n    node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), or\n    a [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal).\n  - optionally a graph name which can be an\n    [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri) or a [blank\n    node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node),\n\nAn RDF triple describes a directed labelled node within a (named) RDF graph,\npointing from the subject to the object and the label being the predicate.\n\n","args":[],"type":"{ subject : Rdf.BlankNodeOrIri, predicate : Rdf.Iri, object : Rdf.BlankNodeOrIriOrLiteral, graph : Maybe.Maybe Rdf.BlankNodeOrIri }"},{"name":"Seed","comment":" A `Seed` is used to mint unique blank node identifiers. Functions like\n[`mintBlankNode`](#mintBlankNode),\n[`Rdf.Graph.fromTurtle`](Rdf-Graph#fromTurtle),\n[`Rdf.Dataset.fromTrig`](Rdf-Dataset#fromTrig), or\n[`Rdf.Graph.mintBlankNodes`](Rdf-Graph#mintBlankNodes) take a `Seed` and then\nreturn an updated one. You should always use the returned `Seed` in\nsubsequent calls to ensure that you don't get blank node identifier\ncollisions.\n","args":[],"type":"Internal.Seed.Seed"},{"name":"Term","comment":" This type represents an [RDF\nTerm](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple) (which can be an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri),\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal), or a [blank\nnode](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node)), a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables), or\na [property path](https://www.w3.org/TR/sparql11-query/#propertypaths). They\nare used in different contexts, for example when encoding or decoding RDF\ngraphs, or when building different parts of a SPARQL query, like WHERE,\nCONSTRUCT, or SELECT clauses, as well as expressions.\n\nThe `compatible` type variable is used to ensure that certain instances of\na `Term` can only be used in the right context. For example, subjects in an\nRDF graph can only be IRI's or blank nodes, or, verbs in a WHERE clause can\nonly be IRI's, query variables or property paths.\n\nFor each term variant and all their combinations, we define two type aliases,\none with a type variable and one without, e.g. `IsIri compatible` and `Iri`.\n\n  - The first one will only be used for **arguments** of functions,\n  - the second only for **returned values**.\n\nDoing this makes the following code work, as the `insert` function uses the\ngeneral `Is... compatible` types.\n\n    import Rdf.Graph as Graph exposing (Graph)\n\n    alice : Iri\n    alice =\n        iri \"http://example.org/alice\"\n\n    knows : Iri\n    knows =\n        iri \"http://example.org/#knows\"\n\n    someone : BlankNode\n    someone =\n        blankNode \"someone\"\n\n    graph : Graph\n    graph =\n        Graph.insert alice knows someone Graph.empty\n\nHere is an overview of all possible terms and in which context they are\nallowed:\n\n```markdown\n| Terms         | Graph | Where | Construct | Select | Expression | Path |\n|               | S P O | S V O | S V O     |        |            |      |\n|---------------|-------|-------|-----------|--------|------------|------|\n| BlankNode     | x   x | x   x | x   x     |        |            |      |\n| Iri           | x x x | x o x | x x x     |        |     x      |  o   |\n| Literal       |     x |     x |     x     |        |     x      |      |\n| Var           |       | x x x | x x x     |   x    |     x      |      |\n| Path          |       |   x   |           |        |            |  x   |\n```\n\nIt follows that a term can be compatible or not within the following\ncombinations:\n\n  - [`Iri`](#Iri)\n  - [`Var`](#Var)\n  - [`BlankNode`](#BlankNode) or [`Iri`](#Iri)\n  - [`BlankNode`](#BlankNode) or [`Iri`](#Iri) or [`Literal`](#Literal)\n  - [`BlankNode`](#BlankNode) or [`Iri`](#Iri) or [`Literal`](#Literal) or [`Var`](#Var)\n  - [`BlankNode`](#BlankNode) or [`Iri`](#Iri) or [`Var`](#Var)\n  - [`Iri`](#Iri) or [`Literal`](#Literal) or [`Var`](#Var)\n  - [`Iri`](#Iri) or [`Var`](#Var)\n  - [`Var`](#Var) or [`Path`](#Path) (which includes [`Iri`](#Iri))\n  - [`Path`](#Path) (which includes [`Iri`](#Iri))\n\nWe consider an IRI to be the same as a predicate path and therefore define\n`VarOrPath` instead of `IriOrVarOrPath`.\n\n","args":["compatible"],"type":"Internal.Term.Term compatible"},{"name":"Triple","comment":" This type represents an [RDF\ntriple](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple). It consists of\n\n  - a subject, which must be an\n    [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri) or a [blank\n    node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node),\n  - a predicate, which must be an\n    [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri),\n  - an object, which can be any RDF term, i.e. an\n    [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), a [blank\n    node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), or\n    a [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal).\n\nAn RDF triple describes a directed labelled node within an RDF graph, pointing\nfrom the subject to the object and the label being the predicate.\n\n","args":[],"type":"{ subject : Rdf.BlankNodeOrIri, predicate : Rdf.Iri, object : Rdf.BlankNodeOrIriOrLiteral }"},{"name":"Var","comment":" An RDF term which can only be a\n[query variable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables).\nThis type will only be used as the return type of functions and if the values\nneed to be stored in the model. Take a look at [Term](Rdf#Term) for a general\nexplanation of the idea behind this.\n","args":[],"type":"Rdf.Term { isVar : Rdf.Compatible, blankNodeOrIriOrLiteralOrVar : Rdf.Compatible, blankNodeOrIriOrVar : Rdf.Compatible, iriOrLiteralOrVar : Rdf.Compatible, iriOrVar : Rdf.Compatible, varOrPath : Rdf.Compatible }"},{"name":"VarOrPath","comment":" An RDF term which can only be a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables) or\na [property path](https://www.w3.org/TR/sparql11-query/#propertypaths). This\ntype will only be used as the return type of functions and if the values need\nto be stored in the model. Take a look at [Term](Rdf#Term) for a general\nexplanation of the idea behind this.\n","args":[],"type":"Rdf.Term { varOrPath : Rdf.Compatible }"}],"values":[{"name":"a","comment":" The IRI `http://www.w3.org/1999/02/22-rdf-syntax-ns#type` which is used to\nstate that a node is an instance of an RDFS or OWL class.\n","type":"Rdf.Iri"},{"name":"alternative","comment":" Create an alternative [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths).\n","type":"Rdf.IsPath compatible1 -> List.List (Rdf.IsPath compatible2) -> Rdf.Path"},{"name":"append","comment":" Append a `String` to a query variable.\n\n    append \"Label\" (varQ \"instance\")\n    --> varQ \"instanceLabel\"\n\n\n    append \"Label\" (varD \"instance\")\n    --> varD \"instanceLabel\"\n\n","type":"String.String -> Rdf.IsVar compatible -> Rdf.IsVar compatible"},{"name":"appendPath","comment":" Append a String to the path component of an [`Iri`](#Iri).\n\n    appendPath \"/alice\" (iri \"http://example.org\")\n    --> iri \"http://example.org/alice\"\n\n    appendPath \"/datasets\" (iri \"http://example.org?sort=id\")\n    --> iri \"http://example.org/datasets?sort=id\"\n\n    appendPath \"/people\" (iri \"http://example.org#alice\")\n    --> iri \"http://example.org/people#alice\"\n\n","type":"String.String -> Rdf.IsIri compatible -> Rdf.Iri"},{"name":"asBlankNode","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsBlankNode compatible -> Rdf.BlankNode"},{"name":"asBlankNodeOrIri","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsBlankNodeOrIri compatible -> Rdf.BlankNodeOrIri"},{"name":"asBlankNodeOrIriOrLiteral","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsBlankNodeOrIriOrLiteral compatible -> Rdf.BlankNodeOrIriOrLiteral"},{"name":"asBlankNodeOrIriOrLiteralOrVar","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsBlankNodeOrIriOrLiteralOrVar compatible -> Rdf.BlankNodeOrIriOrLiteralOrVar"},{"name":"asBlankNodeOrIriOrVar","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsBlankNodeOrIriOrVar compatible -> Rdf.BlankNodeOrIriOrVar"},{"name":"asIri","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsIri compatible -> Rdf.Iri"},{"name":"asIriOrLiteralOrVar","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsIriOrLiteralOrVar compatible -> Rdf.IriOrLiteralOrVar"},{"name":"asIriOrVar","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsIriOrVar compatible -> Rdf.IriOrVar"},{"name":"asLiteral","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsLiteral compatible -> Rdf.Literal"},{"name":"asPath","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsPath compatible -> Rdf.Path"},{"name":"asVar","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsVar compatible -> Rdf.Var"},{"name":"asVarOrPath","comment":" When writing your own helper functions, it might be necessary that you have\nto convert the argument type into the return value type. Take a look at\n[Term](Rdf#Term) for a general explanation of the idea behind this.\n","type":"Rdf.IsVarOrPath compatible -> Rdf.VarOrPath"},{"name":"blankNode","comment":" Create a [blank\nnode](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node) by providing\na blank node identifier, e.g.\n\n    unnamed : BlankNode\n    unnamed =\n        blankNode \"unnamed\"\n\n**Warning**: When you are using this function directly, you have to ensure\nyourself, that you don't run into naming conflicts.\n\n","type":"String.String -> Rdf.BlankNode"},{"name":"boolean","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:boolean](https://www.w3.org/TR/xmlschema11-2/#boolean).\n\n    boolean True\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#boolean\")\n    -->   \"true\"\n\n","type":"Basics.Bool -> Rdf.Literal"},{"name":"datatype","comment":" Get the [`Literal`](#Literal)'s datatype as [`Iri`](#Iri).\n\n    datatype (string \"Alice\")\n    --> xsd \"string\"\n\n    datatype (langString \"de\" \"Apfel\")\n    --> rdf \"langString\"\n\n    datatype (integer 42)\n    --> xsd \"integer\"\n\n","type":"Rdf.Literal -> Rdf.Iri"},{"name":"date","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:date](https://www.w3.org/TR/xmlschema11-2/#date).\n\n    import Time\n\n    date (Time.millisToPosix 0)\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#date\")\n    -->   \"1970-01-01\"\n\n","type":"Time.Posix -> Rdf.Literal"},{"name":"dateTime","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:dateTime](https://www.w3.org/TR/xmlschema11-2/#dateTime).\n\n    import Time\n\n    dateTime (Time.millisToPosix 0)\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#dateTime\")\n    -->   \"1970-01-01T00:00:00.000Z\"\n\n","type":"Time.Posix -> Rdf.Literal"},{"name":"dcterms","comment":" The prefix `http://purl.org/dc/terms/`.\n","type":"String.String -> Rdf.Iri"},{"name":"decimal","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:decimal](https://www.w3.org/TR/xmlschema11-2/#decimal). Here we are using\nthe\n[Decimal](https://package.elm-lang.org/packages/torreyatcitty/the-best-decimal/latest/Decimal#Decimal)\ntype from the\n[torreyatcitty/the-best-decimal](https://package.elm-lang.org/packages/torreyatcitty/the-best-decimal/latest/)\npackage.\n\n    import Decimal exposing (Decimal)\n\n    pi : Decimal\n    pi =\n        3.14\n            |> Decimal.fromFloat\n            |> Maybe.withDefault (Decimal.fromInt 0)\n\n    decimal pi\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#decimal\")\n    -->   \"3.14\"\n\n","type":"Decimal.Decimal -> Rdf.Literal"},{"name":"double","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:double](https://www.w3.org/TR/xmlschema11-2/#double).\n\n    double 3.14\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#double\")\n    -->   \"3.14\"\n\n","type":"Basics.Float -> Rdf.Literal"},{"name":"dropFragment","comment":" Drop the fragment from an [`Iri`](#Iri).\n\n    dropFragment (iri \"http://example.org#alice\")\n    --> iri \"http://example.org\"\n\n","type":"Rdf.IsIri compatible -> Rdf.Iri"},{"name":"float","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:float](https://www.w3.org/TR/xmlschema11-2/#float).\n\n    float 3.14\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#float\")\n    -->   \"3.14\"\n\n","type":"Basics.Float -> Rdf.Literal"},{"name":"initialSeed","comment":" A fixed [`Seed`](#Seed). This is useful for tests. For actual application\ncode, take a look at [`seedGenerator`](#seedGenerator).\n","type":"Rdf.Seed"},{"name":"int","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-int) with datatype\n[xsd:int](https://www.w3.org/TR/xmlschema11-2/#int).\n\n    int 42\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#int\")\n    -->   \"42\"\n\n","type":"Basics.Int -> Rdf.Literal"},{"name":"integer","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:integer](https://www.w3.org/TR/xmlschema11-2/#integer).\n\n    integer 42\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#integer\")\n    -->   \"42\"\n\n","type":"Basics.Int -> Rdf.Literal"},{"name":"inverse","comment":" Create an inverse [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths).\n","type":"Rdf.IsPath compatible1 -> Rdf.Path"},{"name":"iri","comment":" Create an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri) (Internal Resource\nIdentifier) by providing its string representation, e.g.\n\n    alice : Iri\n    alice =\n        iri \"http://example.org/alice\"\n\n","type":"String.String -> Rdf.Iri"},{"name":"langString","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n`http://www.w3.org/1999/02/22-rdf-syntax-ns#langString`. The first argument\nmust be a language tag as defined by\n[BCP47](https://www.rfc-editor.org/info/bcp47), the second argument is the\nactual string.\n\n    serialize (langString \"en\" \"RDF is great!\")\n    --> \"\\\"RDF is great!\\\"@en\"\n\n","type":"String.String -> String.String -> Rdf.Literal"},{"name":"lastPredicatePath","comment":" Return the [`Iri`](#Iri) from the last segment of the given [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths).\n\n    lastPredicatePath\n        (sequence (iri \"http://example.org#knows\")\n            [ rdfs \"label\" ]\n        )\n    --> Just (rdfs \"label\")\n\n","type":"Rdf.IsPath compatible -> Maybe.Maybe Rdf.Iri"},{"name":"lexicalForm","comment":" Turn a [`Literal`](#Literal) into it's [lexical\nform](https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal).\n\n    lexicalForm (double 3.14)\n    --> \"3.14\"\n\n    lexicalForm (string \"RDF is great!\")\n    --> \"RDF is great!\"\n\n    lexicalForm (boolean True)\n    --> \"true\"\n\n","type":"Rdf.Literal -> String.String"},{"name":"literal","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) by providing its\n[datatype IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri) and its\n[lexical form](https://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form), e.g.\n\n    pi : Literal a\n    pi =\n        literal xsdDecimal \"3.14\"\n\n    xsdDecimal : Iri\n    xsdDecimal =\n        iri \"http://www.w3.org/2001/XMLSchema#decimal\"\n\nThere are a few helper functions for creating literals of the most common\ndatatypes which are part of [built-in\ndatatypes](https://www.w3.org/TR/rdf11-concepts/#xsd-datatypes).\n\n","type":"Rdf.Iri -> String.String -> Rdf.Literal"},{"name":"mintBlankNode","comment":" Create a blank node with a freshly minted identifier using the provided\n[`Seed`](#Seed).\n","type":"Rdf.Seed -> ( Rdf.BlankNode, Rdf.Seed )"},{"name":"oneOrMore","comment":" Create a one or more [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths).\n","type":"Rdf.IsPath compatible1 -> Rdf.Path"},{"name":"owl","comment":" The prefix `http://www.w3.org/2002/07/owl#`.\n","type":"String.String -> Rdf.Iri"},{"name":"prov","comment":" The prefix `http://www.w3.org/ns/prov#`.\n","type":"String.String -> Rdf.Iri"},{"name":"rdf","comment":" The prefix `http://www.w3.org/1999/02/22-rdf-syntax-ns#`.\n","type":"String.String -> Rdf.Iri"},{"name":"rdfs","comment":" The prefix `http://www.w3.org/2000/01/rdf-schema#`.\n","type":"String.String -> Rdf.Iri"},{"name":"rightOf","comment":" Return the [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths) which remains after\nremoving the first path from the beginning of the second path. This will return\n`Nothing` if the second path does not start with the first, or if the resulting\npath is empty.\n\n    rightOf\n        (iri \"http://example.org#knows\")\n        (sequence (iri \"http://example.org#knows\")\n            [ rdfs \"label\" ]\n        )\n    --> Just (asPath (rdfs \"label\"))\n\n    rightOf\n        (iri \"http://example.org#knows\")\n        (iri \"http://example.org#knows\")\n    --> Nothing\n\n    rightOf\n        (iri \"http://example.org#knows\")\n        (iri \"http://example.org#owns\")\n    --> Nothing\n\n","type":"Rdf.IsPath compatible1 -> Rdf.IsPath compatible2 -> Maybe.Maybe Rdf.Path"},{"name":"schema","comment":" The prefix `http://schema.org/`.\n","type":"String.String -> Rdf.Iri"},{"name":"seedGenerator","comment":" A `Random.Generator` for generating a random [`Seed`](#Seed).\n","type":"Random.Generator Rdf.Seed"},{"name":"sequence","comment":" Create a sequence [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths).\n","type":"Rdf.IsPath compatible1 -> List.List (Rdf.IsPath compatible2) -> Rdf.Path"},{"name":"serialize","comment":" Serialize a [`Term`](#Term) into how it would be represented in the\n[N-Triples](https://www.w3.org/TR/n-triples/) format.\n","type":"Rdf.Term compatible -> String.String"},{"name":"serializeQuad","comment":" Serialize a [`Quad`](#Quad) into how it would be represented in the\n[N-Quads](https://www.w3.org/TR/n-quads/) format.\n","type":"Rdf.Quad -> String.String"},{"name":"serializeTriple","comment":" Serialize a [`Triple`](#Triple) into how it would be represented in the\n[N-Triples](https://www.w3.org/TR/turtle/) format.\n","type":"Rdf.Triple -> String.String"},{"name":"serializeWith","comment":" Serialize a [`Term`](#Term) within the context of\na [`Prologue`](#Prologue). It will also replace every predicate\n<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> with `a`.\n","type":"Rdf.Prologue -> Rdf.Term compatible -> String.String"},{"name":"setFragment","comment":" Set the fragment of an [`Iri`](#Iri)\n\n    setFragment \"alice\" (iri \"http://example.org\")\n    --> iri \"http://example.org#alice\"\n\n    setFragment \"bob\" (iri \"http://example.org#alice\")\n    --> iri \"http://example.org#bob\"\n\n","type":"String.String -> Rdf.IsIri compatible -> Rdf.Iri"},{"name":"setQueryParam","comment":" Set a query parameter in an [`Iri`](#Iri)\n\n    setQueryParam \"sort\" \"id\" (iri \"http://example.org\")\n    --> iri \"http://example.org?sort=id\"\n\n    setQueryParam \"sort\" \"name\" (iri \"http://example.org?sort=id\")\n    --> iri \"http://example.org?sort=name\"\n\n","type":"String.String -> String.String -> Rdf.IsIri compatible -> Rdf.Iri"},{"name":"sh","comment":" The prefix `http://www.w3.org/ns/shacl#`.\n","type":"String.String -> Rdf.Iri"},{"name":"startsWith","comment":" Check if the second [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths) starts with the\nfirst one.\n\n    startsWith\n        (iri \"http://example.org#knows\")\n        (sequence (iri \"http://example.org#knows\")\n            [ rdfs \"label\" ]\n        )\n    --> True\n\n    startsWith\n        (iri \"http://example.org#knows\")\n        (iri \"http://example.org#knows\")\n    --> True\n\n    startsWith\n        (iri \"http://example.org#knows\")\n        (iri \"http://example.org#owns\")\n    --> False\n\n","type":"Rdf.IsPath compatible1 -> Rdf.IsPath compatible2 -> Basics.Bool"},{"name":"string","comment":" Create\na [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) with datatype\n[xsd:string](https://www.w3.org/TR/xmlschema11-2/#string).\n\n    string \"Alice Wonderland\"\n    --> literal\n    -->   (iri \"http://www.w3.org/2001/XMLSchema#string\")\n    -->   \"Alice Wonderland\"\n\n","type":"String.String -> Rdf.Literal"},{"name":"toBlankNode","comment":" Turn any [`Term`](#Term) into a [`BlankNode`](#BlankNode) if possible.\n","type":"Rdf.Term compatible -> Maybe.Maybe Rdf.BlankNode"},{"name":"toBlankNodeOrIri","comment":" Turn any [`Term`](#Term) into a [`BlankNodeOrIri`](#BlankNodeOrIri) if\npossible.\n","type":"Rdf.Term compatible -> Maybe.Maybe Rdf.BlankNodeOrIri"},{"name":"toBlankNodeOrIriOrLiteral","comment":" Turn any [`Term`](#Term) into\na [`BlankNodeOrIriOrLiteral`](#BlankNodeOrIriOrLiteral) if possible.\n","type":"Rdf.Term compatible -> Maybe.Maybe Rdf.BlankNodeOrIriOrLiteral"},{"name":"toBool","comment":" Take any [`Term`](#Term) and extract its Bool value if it is a literal\nwith datatype `xsd:boolean`.\n\n    toBool (boolean True)\n    --> Just True\n\n","type":"Rdf.Term compatible -> Maybe.Maybe Basics.Bool"},{"name":"toDate","comment":" Take any [`Term`](#Term) and extract its Posix value if it is a literal\nwith datatype `xsd:date`.\n","type":"Rdf.Term compatible -> Maybe.Maybe Time.Posix"},{"name":"toDateTime","comment":" Take any [`Term`](#Term) and extract its Posix value if it is a literal\nwith datatype `xsd:dateTime`.\n","type":"Rdf.Term compatible -> Maybe.Maybe Time.Posix"},{"name":"toDecimal","comment":" Take any [`Term`](#Term) and extract its Decimal value if it is a literal\nwith datatype `xsd:decimal`.\n\n    import Decimal\n\n    toDecimal (decimal (Decimal.fromIntWithExponent 314 -2))\n    --> Just (Decimal.fromIntWithExponent 314 -2)\n\n    toDecimal (float 3.14)\n    --> Nothing\n\n    toDecimal (int 42)\n    --> Nothing\n\n","type":"Rdf.Term compatible -> Maybe.Maybe Decimal.Decimal"},{"name":"toFloat","comment":" Take any [`Term`](#Term) and extract its Float value if it is a literal\nwith datatype `xsd:double` or `xsd:float`.\n\n    Rdf.toFloat (double 3.14)\n    --> Just 3.14\n\n    Rdf.toFloat (float 3.14)\n    --> Just 3.14\n\n    Rdf.toFloat (int 42)\n    --> Nothing\n\n","type":"Rdf.Term compatible -> Maybe.Maybe Basics.Float"},{"name":"toInt","comment":" Take any [`Term`](#Term) and extract its Int value if it is a literal\nwith datatype `xsd:integer` or `xsd:int`.\n\n    toInt (integer 42)\n    --> Just 42\n\n    toInt (int 42)\n    --> Just 42\n\n    toInt (double 3.14)\n    --> Nothing\n\n","type":"Rdf.Term compatible -> Maybe.Maybe Basics.Int"},{"name":"toIri","comment":" Turn any [`Term`](#Term) into an [`Iri`](#Iri) if possible.\n","type":"Rdf.Term compatible -> Maybe.Maybe Rdf.Iri"},{"name":"toLangString","comment":" Take any [`Term`](#Term) and extract its language tag and String value if\nit is a literal with datatype `xsd:langString`.\n\n    toLangString (langString \"de\" \"Apfel\")\n    --> Just ( \"de\", \"Apfel\" )\n\n    toLangString (int 42)\n    --> Nothing\n\n","type":"Rdf.Term compatible -> Maybe.Maybe ( String.String, String.String )"},{"name":"toLiteral","comment":" Turn any [`Term`](#Term) into a [`Literal`](#Literal) if\npossible.\n","type":"Rdf.Term compatible -> Maybe.Maybe Rdf.Literal"},{"name":"toPropertyPath","comment":" Turn a [`Path`](#Path) into a [`PropertyPath`](#PropertyPath) to work with\nits individual path segments.\n\n    toPropertyPath (iri \"http://example.org\")\n    --> Predicate (iri \"http://example.org\")\n\n    toPropertyPath (inverse (iri \"http://example.org\"))\n    --> Inverse (Predicate (iri \"http://example.org\"))\n\n","type":"Rdf.IsPath compatible -> Rdf.PropertyPath"},{"name":"toString","comment":" Take any [`Term`](#Term) and extract its String value if it is a literal\nwith datatype `xsd:string`.\n\n    toString (string \"Alice\")\n    --> Just \"Alice\"\n\n    toString (int 42)\n    --> Nothing\n\n","type":"Rdf.Term compatible -> Maybe.Maybe String.String"},{"name":"toUrl","comment":" Extract the URL from an [`Iri`](#Iri).\n\n    toUrl (iri \"http://example.org\")\n    --> \"http://example.org\"\n\n","type":"Rdf.Iri -> String.String"},{"name":"toVar","comment":" Turn any [`Term`](#Term) into a [`Var`](#Var) if\npossible.\n","type":"Rdf.Term compatible -> Maybe.Maybe Rdf.Var"},{"name":"varD","comment":" Create a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables) of the\nform `$name`.\n","type":"String.String -> Rdf.Var"},{"name":"varQ","comment":" Create a [query\nvariable](https://www.w3.org/TR/sparql11-query/#sparqlQueryVariables) of the\nform `?name`.\n","type":"String.String -> Rdf.Var"},{"name":"xsd","comment":" The prefix `http://www.w3.org/2001/XMLSchema#`.\n","type":"String.String -> Rdf.Iri"},{"name":"zeroOrMore","comment":" Create a zero or more [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths).\n","type":"Rdf.IsPath compatible1 -> Rdf.Path"},{"name":"zeroOrOne","comment":" Create a zero or one [property\npath](https://www.w3.org/TR/sparql11-query/#propertypaths).\n","type":"Rdf.IsPath compatible1 -> Rdf.Path"}],"binops":[]},{"name":"Rdf.Dataset","comment":" This module defines the [`Dataset`](#Dataset) type which models an [RDF\ndataset](https://www.w3.org/TR/rdf11-concepts/#section-dataset), and helper\nfunctions for building, updating, parsing, and serializing these. Take a look\nat the [`Rdf.Decode`](Rdf-Decode) module if you want to extract Elm values from\na [`Dataset`](#Dataset).\n\n@docs Dataset\n\n\n# Build\n\n@docs empty, fromGraph\n@docs insertNamedGraph\n@docs fromQuads\n\n@docs fromNQuads, fromTrig, fromTrigWith\n@docs Error, errorToString\n\n\n# Query\n\n@docs defaultGraph, namedGraphs\n@docs decode\n\n\n# Export\n\n@docs toQuads\n@docs toNQuads, toTrig\n\n","unions":[{"name":"Error","comment":" You get one of these if parsing fails.\n","args":[],"cases":[["ErrorParser",["List.List Parser.DeadEnd"]],["MissingSubject",[]],["MissingPredicate",[]],["MissingBase",[]],["CouldNotResolvePrefixedName",["String.String","String.String"]]]}],"aliases":[{"name":"Dataset","comment":" This type represents an [RDF\ndataset](hhttps://www.w3.org/TR/rdf11-concepts/#section-rdf-graphttps://www.w3.org/TR/rdf11-concepts/#section-rdf-graph).\n","args":[],"type":"Internal.Dataset.Dataset"}],"values":[{"name":"decode","comment":" Run a [`Decoder`](Rdf-Decode#Decoder) on a `Dataset` starting at the\nprovided `Node`'s. Make sure to anchor your decoder using\n[`from`](Rdf-Decode#from), [`fromSubject`](Rdf-Decode#fromSubject), or\n[`at`](Rdf-Decode#at). By default, decoding will be done on the default graph.\nUse helpers like [`inGraphs`](Rdf-Decode#inGraphs) to change this behaviour\n","type":"Rdf.Decode.Decoder a -> Rdf.Dataset.Dataset -> Result.Result Rdf.Decode.Error a"},{"name":"defaultGraph","comment":" The dataset's [default\ngraph](https://www.w3.org/TR/rdf11-concepts/#section-dataset).\n","type":"Rdf.Dataset.Dataset -> Rdf.Graph.Graph"},{"name":"empty","comment":" Create an empty [RDF\ndataset](https://www.w3.org/TR/rdf11-concepts/#section-dataset).\n","type":"Rdf.Dataset.Dataset"},{"name":"errorToString","comment":" Turn an [`Error`](#Error) into a more human friendly error message.\n","type":"String.String -> Rdf.Dataset.Error -> String.String"},{"name":"fromGraph","comment":" Create a dataset with [default\ngraph](https://www.w3.org/TR/rdf11-concepts/#section-dataset) set to the\nprovided graph and no other named graph.\n","type":"Rdf.Graph.Graph -> Rdf.Dataset.Dataset"},{"name":"fromNQuads","comment":" Parse an [N-Quads](https://www.w3.org/TR/n-quads/) file and put all RDF\nquads into a [`Dataset`](#Dataset). This function will keep blank node\nidentifiers.\n","type":"String.String -> Result.Result Rdf.Dataset.Error Rdf.Dataset.Dataset"},{"name":"fromQuads","comment":" Convert a list of [`Quad`](Rdf#Quad)'s into a [`Dataset`](#Dataset).\n","type":"List.List Rdf.Quad -> Rdf.Dataset.Dataset"},{"name":"fromTrig","comment":" Parse a [TriG](https://www.w3.org/TR/trig/) file and put all RDF quads into\na [`Dataset`](#Dataset). This function will keep blank node identifiers and\nonly mint new ones if they are not given in the original. For minting it uses\nthe provided [`Seed`](Rdf#Seed). Make sure to reuse the returned\n[`Seed`](Rdf#Seed) in subsequent calls to avoid blank node identifier\ncollisions. You can use [`Rdf.initialSeed`](Rdf#initialSeed) and\n[`Rdf.seedGenerator`](Rdf#seedGenerator) to get a seed.\n","type":"Rdf.Seed -> String.String -> Result.Result Rdf.Dataset.Error ( Rdf.Dataset.Dataset, Rdf.Seed )"},{"name":"fromTrigWith","comment":" This is like [`fromTrig`](#fromTrig) but you can also specify the initial\nbase IRI.\n","type":"Rdf.Seed -> Rdf.Iri -> String.String -> Result.Result Rdf.Dataset.Error ( Rdf.Dataset.Dataset, Rdf.Seed )"},{"name":"insertNamedGraph","comment":" Insert a named graph into a dataset. Replaces an already existing graph\nwith that name.\n","type":"Rdf.IsBlankNodeOrIri compatible -> Rdf.Graph.Graph -> Rdf.Dataset.Dataset -> Rdf.Dataset.Dataset"},{"name":"namedGraphs","comment":" All dataset's\n[named graphs](https://www.w3.org/TR/rdf11-concepts/#section-dataset).\n","type":"Rdf.Dataset.Dataset -> List.List { name : Rdf.BlankNodeOrIri, graph : Rdf.Graph.Graph }"},{"name":"toNQuads","comment":" Serialize a [`Dataset`](#Dataset) into the\n[N-Quads](https://www.w3.org/TR/n-quads/) format.\n","type":"Rdf.Dataset.Dataset -> String.String"},{"name":"toQuads","comment":" Get a list of all [`Quad`](Rdf#Quad)'s in the [`Dataset`](#Dataset).\n","type":"Rdf.Dataset.Dataset -> List.List Rdf.Quad"},{"name":"toTrig","comment":" Serialize a [`Dataset`](#Dataset) into the\n[TriG](https://www.w3.org/TR/trig/) format.\n","type":"Rdf.Dataset.Dataset -> String.String"}],"binops":[]},{"name":"Rdf.Decode","comment":" Extract Elm values from [`Graph`](Rdf-Graph#Graph)'s and\n[`Dataset`](Rdf-Dataset#Dataset)'s. This works similar to\n[Json.Decode](https://package.elm-lang.org/packages/elm/json/latest/Json-Decode)\nwith a few differences:\n\n  - You have to specify the node at which decoding starts. The reason is, that\n    there is no obvious choice for this within a graph, like it is for a JSON\n    object where decoding always starts at the root.\n\n  - RDF allows multiple objects for one predicate, unlike JSON where a field is\n    assumed to appear once. Therefore one has to use [`many`](#many) to switch\n    from decoding **exactly one** value to allowing **arbitrarily many** values\n    at a certain predicate.\n\n  - When extracting values from an RDF Dataset, you have to select the correct\n    (named/default) graph(s).\n\n\n# Basic Decoders\n\n@docs Decoder\n\n@docs iri\n@docs blankNode\n@docs literal\n\n@docs blankNodeOrIri, blankNodeOrIriOrLiteral\n\n\n## Specific literals\n\n@docs string, langString\n@docs bool\n@docs decimal, int, float, number\n@docs date, dateTime\n\n\n## Focus nodes\n\n@docs from, fromSubject\n@docs at\n\n\n## Datasets\n\n@docs GraphIdentifier, inGraphs, inAllGraphs\n\n\n## Multiplicities\n\n@docs many, indexedMany\n\n\n## Inconsistent structure\n\n@docs oneOf\n\n\n## Containers\n\n@docs list\n\n\n## Properties\n\n@docs property\n@docs anyPredicate\n@docs noProperty\n@docs predicates\n\n\n# Running Decoders\n\nUse [`Rdf.Graph.decode`](Rdf-Graph#decode) or\n[`Rdf.Dataset.decode`](Rdf-Dataset#decode) to run a decoder on\na [`Graph`](Rdf-Graph#Graph) or [`Dataset`](Rdf-Dataset#Dataset).\n\n@docs Error, Problem, errorToString\n@docs inContext\n\n\n# Transforming and chaining\n\n@docs succeed, fail\n@docs map, map2\n@docs andMap\n@docs andThen\n@docs combine\n@docs lazy\n\n\n## Pipelines\n\n@docs required\n@docs optional\n@docs hardcoded\n@docs custom\n\n","unions":[{"name":"GraphIdentifier","comment":" This type is used to distinguish the different graphs an [RDF\ndataset](https://www.w3.org/TR/rdf11-concepts/#section-dataset) is composed of.\n","args":[],"cases":[["DefaultGraph",[]],["NamedGraph",["Rdf.BlankNodeOrIri"]]]},{"name":"Problem","comment":" The problem which made decoding fail.\n","args":[],"cases":[["NoFocusNode",[]],["ExpectedNode",["Rdf.BlankNodeOrIri"]],["ExpectedIri",["Rdf.BlankNodeOrIriOrLiteral"]],["ExpectedBlankNode",["Rdf.BlankNodeOrIriOrLiteral"]],["ExpectedLiteral",["Rdf.BlankNodeOrIriOrLiteral"]],["ExpectedLiteralOf",["List.List Rdf.Iri","Rdf.Literal"]],["ExpectedBlankNodeOrIri",["Rdf.BlankNodeOrIriOrLiteral"]],["ExpectedOneNode",["List.List Rdf.BlankNodeOrIriOrLiteral"]],["ExpectedPath",["Rdf.BlankNodeOrIri","Rdf.Path"]],["ProblemAt",["List.List Rdf.BlankNodeOrIri","Rdf.Path","Rdf.Decode.Problem"]],["ExpectedNoPath",["Rdf.BlankNodeOrIri","Rdf.Path","List.List Rdf.BlankNodeOrIriOrLiteral"]],["ExpectedPredicates",["Rdf.BlankNodeOrIri"]],["ExpectedOneOf",["List.List Rdf.Decode.Problem"]],["Custom",["String.String"]],["CustomAt",["String.String","List.List Rdf.BlankNodeOrIriOrLiteral"]]]}],"aliases":[{"name":"Decoder","comment":" A way to specify what kind of type you want to decode into.\n","args":["a"],"type":"Internal.Decoder.Decoder Rdf.Decode.GraphIdentifier Rdf.Decode.Error a"},{"name":"Error","comment":" When the decoding fails, we get on of these. Use\n[`errorToString`](#errorToString) to turn this into a human-friendly form.\n","args":[],"type":"{ error : Rdf.Decode.Problem, contextStack : List.List String.String }"}],"values":[{"name":"andMap","comment":" A helper for combining `Decoder`'s in a pipeline.\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder (a -> b) -> Rdf.Decode.Decoder b"},{"name":"andThen","comment":" Run a `Decoder` and then run another one, where you can use the already\ndecoded value.\n","type":"(a -> Rdf.Decode.Decoder b) -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder b"},{"name":"anyPredicate","comment":" Run a decoder on the nodes which can be reached by any predicate from the\ncurrent focus node. Make sure to use [`many`](#many) if more then one node can\nbe reached in this way.\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"at","comment":" Start decoding at each of the provided (focus) node. If more then one of\nthese nodes exist in your graph, you have to combine this with\n[`many`](#many) to get a result.\n","type":"List.List Rdf.BlankNodeOrIriOrLiteral -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"blankNode","comment":" Decode a [blank\nnode](https://www.w3.org/TR/rdf11-concepts/#section-blank-nodes).\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"blankNodeOrIri","comment":" Decode a term which is either a [blank\nnode](https://www.w3.org/TR/rdf11-concepts/#section-blank-nodes) or an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#section-IRIs).\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <alice> <#knows> <bob> .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property (Rdf.iri \"http://example.org/#knows\") blankNodeOrIri)\n        )\n        graph\n    --> Ok (Rdf.asBlankNodeOrIri (Rdf.iri \"http://example.org/bob\"))\n\n","type":"Rdf.Decode.Decoder Rdf.BlankNodeOrIri"},{"name":"blankNodeOrIriOrLiteral","comment":" Decode a term which is either a [blank\nnode](https://www.w3.org/TR/rdf11-concepts/#section-blank-nodes), an\n[IRI](https://www.w3.org/TR/rdf11-concepts/#section-IRIs), or\na [literal](https://www.w3.org/TR/rdf11-concepts/#section-literal).\n","type":"Rdf.Decode.Decoder Rdf.BlankNodeOrIriOrLiteral"},{"name":"bool","comment":" Decode a Literal of type `xsd:boolean` into a `Bool`.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <alice> <#isAdmin> true .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property (Rdf.iri \"http://example.org/#isAdmin\") bool)\n        )\n        graph\n    --> Ok True\n\n","type":"Rdf.Decode.Decoder Basics.Bool"},{"name":"combine","comment":" Turn a list of `Decoder`'s into a `Decoder` of a list. This decoder will\nfail whenever on of its elements fails.\n","type":"List.List (Rdf.Decode.Decoder a) -> Rdf.Decode.Decoder (List.List a)"},{"name":"custom","comment":" Run the given decoder and feed its result into the pipeline at this point.\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder (a -> b) -> Rdf.Decode.Decoder b"},{"name":"date","comment":" Decode a Literal of type `xsd:date` into a `Time.Posix`.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n    import Time\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n        <alice> <#birthDate> \"1970-01-01\"^^xsd:date .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property (Rdf.iri \"http://example.org/#birthDate\") date)\n        )\n        graph\n    --> Ok (Time.millisToPosix 0)\n\n","type":"Rdf.Decode.Decoder Time.Posix"},{"name":"dateTime","comment":" Decode a Literal of type `xsd:date` into a `Time.Posix`.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n    import Time\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n        <alice> <#birthTime> \"1970-01-01T00:00:00\"^^xsd:dateTime .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property (Rdf.iri \"http://example.org/#birthTime\") dateTime)\n        )\n        graph\n    --> Ok (Time.millisToPosix 0)\n\n","type":"Rdf.Decode.Decoder Time.Posix"},{"name":"decimal","comment":" Decode a literal of type `xsd:decimal` into a `Decimal`.\n","type":"Rdf.Decode.Decoder Decimal.Decimal"},{"name":"errorToString","comment":" Turn a decoding error into a human friendly string.\n","type":"Rdf.Decode.Error -> String.String"},{"name":"fail","comment":" A decoder which always fails with the given message.\n","type":"String.String -> Rdf.Decode.Decoder a"},{"name":"float","comment":" Decode a Literal of type `xsd:double` or `xsd:float` into a `Float`.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <question> <#hasAnswer> 314E-2 .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/question\")\n            (property (Rdf.iri \"http://example.org/#hasAnswer\") float)\n        )\n        graph\n    --> Ok 3.14\n\n","type":"Rdf.Decode.Decoder Basics.Float"},{"name":"from","comment":" Start decoding from the provided (focus) node. You can also nest this\n`Decoder` in other `Decoder`'s if you have to change the focus node.\n","type":"Rdf.IsBlankNodeOrIri compatible -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"fromSubject","comment":" Start decoding from **all** subjects. If the graph contains more then one\ntriple, you have to combine this with [`many`](#many) to get a result.\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"hardcoded","comment":" Rather than decoding anything, use a fixed value for the next step in the\npipeline. `harcoded` does not look at the RDF graph at all.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <alice> <#name> \"Alice Wonderland\" .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    type alias Person =\n        { name : String\n        , admin : Bool\n        }\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (succeed Person\n                |> required (Rdf.iri \"http://example.org/#name\") string\n                |> hardcoded True\n            )\n        )\n        graph\n    --> Ok\n    -->     { name = \"Alice Wonderland\"\n    -->     , admin = True\n    -->     }\n\n","type":"a -> Rdf.Decode.Decoder (a -> b) -> Rdf.Decode.Decoder b"},{"name":"inAllGraphs","comment":" When decoding a `Dataset`, run the decoder inside the union of all graphs\n(default and named).\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"inContext","comment":" You can use this to mark that you are in a certain context. A stack of\nthese contexts will be provided with the [`Problem`](#Problem) when\ndecoding fails, which you then can use to improve the reported error\nmessage.\n","type":"String.String -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"inGraphs","comment":" When decoding a `Dataset`, run the decoder only inside the graphs specified\nby the list of [`GraphIdentifier`](#GraphIdentifier)'s.\n","type":"List.List Rdf.Decode.GraphIdentifier -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"indexedMany","comment":" This is like [`many`](#many) but you also get the index of the currently\ndecoded value. Note that the order in which nodes are decoded is\nnon-deterministic.\n","type":"(Basics.Int -> Rdf.Decode.Decoder a) -> Rdf.Decode.Decoder (List.List a)"},{"name":"int","comment":" Decode a Literal of type `xsd:integer` or `xsd:int` into a `Int`.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <question> <#hasAnswer> 42 .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/question\")\n            (property (Rdf.iri \"http://example.org/#hasAnswer\") int)\n        )\n        graph\n    --> Ok 42\n\n","type":"Rdf.Decode.Decoder Basics.Int"},{"name":"iri","comment":" Decode an [IRI](https://www.w3.org/TR/rdf11-concepts/#section-IRIs).\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <alice> a <#Person> .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property a iri)\n        )\n        graph\n    --> Ok (Rdf.iri \"http://example.org/#Person\")\n\n","type":"Rdf.Decode.Decoder Rdf.Iri"},{"name":"langString","comment":" Decode a literal of type `rdf:langString` into a `( String, String )` where\nthe first element is the language tag and the second the String value.\n","type":"Rdf.Decode.Decoder ( String.String, String.String )"},{"name":"lazy","comment":" Use this if you need to decode recursive data structures.\n","type":"(() -> Rdf.Decode.Decoder a) -> Rdf.Decode.Decoder a"},{"name":"list","comment":" Decode an [RDF\ncollection](https://www.w3.org/TR/rdf-schema/#ch_collectionvocab) into\na `List`.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <alice> <#knows> (\n            <bob>\n            <cindi>\n        ) .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property (Rdf.iri \"http://example.org/#knows\") (list iri))\n        )\n        graph\n    --> Ok [ Rdf.iri \"http://example.org/bob\", Rdf.iri \"http://example.org/cindi\" ]\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property (Rdf.iri \"http://example.org/#knows\") (many (list iri)))\n        )\n        graph\n    --> Ok [ [ Rdf.iri \"http://example.org/bob\", Rdf.iri \"http://example.org/cindi\" ] ]\n\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder (List.List a)"},{"name":"literal","comment":" Decode a literal of any datatype.\n","type":"Rdf.Decode.Decoder Rdf.Literal"},{"name":"many","comment":" Decode a list of focus nodes by the given decoder.\n\nNote that the position of `many` within a decode expression matters. Say,\na focus node has multiple classes. The following decoder works as expected:\n\n    property a (many class)\n\nHowever, the following (type-valid) decoder does **not** work:\n\n    many (property a class)\n\nThe reason is that `property a class` fails (since there are many classes), and\nso `many (property a class)` fails as a whole!\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <alice> a <#Person> , <#Author> .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property a (many iri))\n        )\n        graph\n    --> Ok\n    -->   [ Rdf.iri \"http://example.org/#Person\"\n    -->   , Rdf.iri \"http://example.org/#Author\"\n    -->   ]\n\n","type":"Rdf.Decode.Decoder a -> Rdf.Decode.Decoder (List.List a)"},{"name":"map","comment":" Transform the decoded value by applying the provided function.\n","type":"(a -> b) -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder b"},{"name":"map2","comment":" Like [`map`](#map) but it takes two `Decoder`'s.\n","type":"(a -> b -> c) -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder b -> Rdf.Decode.Decoder c"},{"name":"noProperty","comment":" This decoder succeeds if no nodes can be reached by following the provided\nproperty path.\n","type":"Rdf.IsPath compatible -> Rdf.Decode.Decoder ()"},{"name":"number","comment":" Decode a Literal of type `xsd:integer`, `xsd:int`, `xsd:double`, or\n`xsd:float` into a `Float`.\n","type":"Rdf.Decode.Decoder Basics.Float"},{"name":"oneOf","comment":" Try a bunch of different `Decoder`'s. It will succeed with the first one\nwhich succeeded. When all fail, you get the error for all cases.\n","type":"List.List (Rdf.Decode.Decoder a) -> Rdf.Decode.Decoder a"},{"name":"optional","comment":" Decode an optional property.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n    import Time\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n        <alice> <#name> \"Alice Wonderland\" .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    type alias Person =\n        { name : String\n        }\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (succeed Person\n                |> optional\n                    (Rdf.sequence\n                        (Rdf.iri \"http://example.org/#knows\")\n                        [ Rdf.iri \"http://example.org/#name\" ]\n                    )\n                    string\n                    \"Unknown\"\n            )\n        )\n        graph\n    --> Ok\n    -->     { name = \"Unknown\"\n    -->     }\n\n","type":"Rdf.IsPath compatible -> Rdf.Decode.Decoder a -> a -> Rdf.Decode.Decoder (a -> b) -> Rdf.Decode.Decoder b"},{"name":"predicates","comment":" Decode the list of all predicates for which the current focus node is the\nsubject.\n","type":"Rdf.Decode.Decoder (List.List Rdf.Iri)"},{"name":"property","comment":" Run a decoder at the node which is obtained by following the provided\nproperty path. Make sure to use [`many`](#many) if more then one node can be\nfound, otherwise decoding will fail.\n","type":"Rdf.IsPath compatible -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder a"},{"name":"required","comment":" Decode a required property.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n    import Time\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n        <alice> <#knows> [ <#name> \"Bob Builder\" ] .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    type alias Person =\n        { name : String\n        }\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (succeed Person\n                |> required\n                    (Rdf.sequence\n                        (Rdf.iri \"http://example.org/#knows\")\n                        [ Rdf.iri \"http://example.org/#name\" ]\n                    )\n                    string\n            )\n        )\n        graph\n    --> Ok\n    -->     { name = \"Bob Builder\"\n    -->     }\n\n","type":"Rdf.IsPath compatible -> Rdf.Decode.Decoder a -> Rdf.Decode.Decoder (a -> b) -> Rdf.Decode.Decoder b"},{"name":"string","comment":" Decode a Literal of type `xsd:string` into a `String`.\n\n    import Rdf exposing (a)\n    import Rdf.Graph as Graph exposing (Graph)\n\n    graph : Graph\n    graph =\n        \"\"\"\n        @base <http://example.org/> .\n        <alice> <#name> \"Alice Wonderland\" .\n        \"\"\"\n            |> Graph.fromTurtle Rdf.initialSeed\n            |> Result.map Tuple.first\n            |> Result.withDefault Graph.empty\n\n    Graph.decode\n        (from\n            (Rdf.iri \"http://example.org/alice\")\n            (property (Rdf.iri \"http://example.org/#name\") string)\n        )\n        graph\n    --> Ok \"Alice Wonderland\"\n\n","type":"Rdf.Decode.Decoder String.String"},{"name":"succeed","comment":" A decoder which always succeeds with the given value.\n","type":"a -> Rdf.Decode.Decoder a"}],"binops":[]},{"name":"Rdf.Encode","comment":" Turn elm values into [`Graph`](Rdf-Graph#Graph)'s. This is what\n[Json.Encode](https://package.elm-lang.org/packages/elm/json/latest/Json-Encode)\nis for JSON values. Since generating RDF graphs potentially requires minting\n(local) names for blank nodes, you first have to create an\n[`Encoder`](#Encoder) and then turn this into a [`Graph`](Rdf-Graph#Graph) by\nfeeding it into [`encode`](#encode) with a [`Seed`](Rdf#Seed).\n\n\n# Encoding\n\n@docs Encoder\n@docs encode\n\n\n# Primitives\n\n@docs node, blankNode\n@docs fromNode, fromBlankNode\n@docs property\n@docs term\n\n\n# Types\n\n@docs GraphEncoder, IsGraphEncoder\n@docs PropertyEncoder, IsPropertyEncoder\n@docs TermEncoder, IsTermEncoder\n@docs GraphOrTermEncoder, IsGraphOrTermEncoder\n\n\n## Utility\n\n@docs Compatible\n\n","unions":[{"name":"Compatible","comment":" You can ignore this type, it is only used for implementing the different\n`Encoder` variants.\n","args":[],"cases":[]},{"name":"Encoder","comment":" A value which knows how to encode an Elm value into an RDF graph.\n\nThe `compatible` type variable is used to ensure that certain instances of an\n`Encoder` can only be used in the right context.\n\n","args":["compatible"],"cases":[]}],"aliases":[{"name":"GraphEncoder","comment":" An `Encoder` which can be fed into `encode` to produce an RDF graph.\n","args":[],"type":"Rdf.Encode.Encoder { graph : Rdf.Encode.Compatible, graphOrTerm : Rdf.Encode.Compatible }"},{"name":"GraphOrTermEncoder","comment":" This type will only be used as the argument of functions.\n","args":[],"type":"Rdf.Encode.Encoder { graphOrTerm : Rdf.Encode.Compatible }"},{"name":"IsGraphEncoder","comment":" This type will only be used as the argument of functions.\n","args":["compatible"],"type":"Rdf.Encode.Encoder { compatible | graph : Rdf.Encode.Compatible, graphOrTerm : Rdf.Encode.Compatible }"},{"name":"IsGraphOrTermEncoder","comment":" An `Encoder` which encodes an RDF graph or an RDf term.\n","args":["compatible"],"type":"Rdf.Encode.Encoder { compatible | graphOrTerm : Rdf.Encode.Compatible }"},{"name":"IsPropertyEncoder","comment":" This type will only be used as the argument of functions.\n","args":["compatible"],"type":"Rdf.Encode.Encoder { compatible | property : Rdf.Encode.Compatible }"},{"name":"IsTermEncoder","comment":" This type will only be used as the argument of functions.\n","args":["compatible"],"type":"Rdf.Encode.Encoder { compatible | term : Rdf.Encode.Compatible, graphOrTerm : Rdf.Encode.Compatible }"},{"name":"PropertyEncoder","comment":" An `Encoder` which encodes an RDF property.\n","args":[],"type":"Rdf.Encode.Encoder { property : Rdf.Encode.Compatible }"},{"name":"TermEncoder","comment":" An `Encoder` which encodes an RDF term.\n","args":[],"type":"Rdf.Encode.Encoder { term : Rdf.Encode.Compatible, graphOrTerm : Rdf.Encode.Compatible }"}],"values":[{"name":"blankNode","comment":" Encode a new blank node alongside some properties where the node is the\nsubject. This will mint a new blank node identifier under the hood.\n\n    import Rdf\n    import Rdf.Graph as Graph\n\n    blankNode\n        [ property (Rdf.iri \"http://example.org/hasName\")\n            (term (Rdf.string \"Alice\"))\n        ]\n        |> encode Rdf.initialSeed\n        |> Tuple.first\n        |> Graph.toTurtle\n        |> String.lines\n    --> [ \"_:2273e9c9-fa2d-4c28-ae87-947ad36cbecd\"\n    --> , \"  <http://example.org/hasName> \\\"Alice\\\" .\"\n    --> ]\n\n\n    import Rdf\n    import Rdf.Graph as Graph\n\n    blankNode []\n        |> encode Rdf.initialSeed\n        |> Tuple.first\n        |> Graph.toTurtle\n    --> \"\"\n\n","type":"List.List Rdf.Encode.PropertyEncoder -> Rdf.Encode.GraphEncoder"},{"name":"encode","comment":" Run an [`Encoder`](#Encoder). You have to provide a [`Seed`](Rdf#Seed)\nwhich is used for minting unique blank node identifiers. The function `encode`\nreturns the RDF graph as well as an updated [`Seed`](Rdf#Seed) which you should\nuse for further encoding or parsing of RDF graphs to ensure you don't get blank\nnode identifier clashes.\n","type":"Rdf.Seed -> Rdf.Encode.IsGraphEncoder compatible -> ( Rdf.Graph.Graph, Rdf.Seed )"},{"name":"fromBlankNode","comment":" This works like [`blankNode`](#blankNode) but returns a `PropertyEncoder`.\nYou can use this if you are deep in a tree of encoders and have to encode\na different/detached part of the graph.\n","type":"List.List Rdf.Encode.PropertyEncoder -> Rdf.Encode.PropertyEncoder"},{"name":"fromNode","comment":" This works like [`node`](#node) but returns a `PropertyEncoder`. You can\nuse this if you are deep in a tree of encoders and have to encode\na different/detached part of the graph.\n","type":"Rdf.IsBlankNodeOrIri compatible -> List.List Rdf.Encode.PropertyEncoder -> Rdf.Encode.PropertyEncoder"},{"name":"node","comment":" Encode a node, for which we already have a name, alongside some properties\nwhere the node is the subject.\n\n    import Rdf\n    import Rdf.Graph as Graph\n\n    node (Rdf.blankNode \"alice\")\n        [ property (Rdf.iri \"http://example.org/hasName\")\n            (term (Rdf.string \"Alice\"))\n        ]\n        |> encode Rdf.initialSeed\n        |> Tuple.first\n        |> Graph.toTurtle\n        |> String.lines\n    --> [ \"_:alice\"\n    --> , \"  <http://example.org/hasName> \\\"Alice\\\" .\"\n    --> ]\n\n    import Rdf\n    import Rdf.Graph as Graph\n\n    node (Rdf.blankNode \"alice\") []\n        |> encode Rdf.initialSeed\n        |> Tuple.first\n        |> Graph.toTurtle\n    --> \"\"\n\n","type":"Rdf.IsBlankNodeOrIri compatible -> List.List Rdf.Encode.PropertyEncoder -> Rdf.Encode.GraphEncoder"},{"name":"property","comment":" Encode a property by providing an IRI of property path and an object. The\ncurrent focus node will be the subject.\n","type":"Rdf.IsPath compatible -> Rdf.Encode.IsGraphOrTermEncoder object -> Rdf.Encode.PropertyEncoder"},{"name":"term","comment":" Encode a single RDF term.\n\n    import Rdf exposing (iri, a, initialSeed)\n    import Rdf.Graph exposing (toTurtle)\n\n    blankNode\n        [ property a (term (iri \"http://example.org#Person\")) ]\n        |> encode initialSeed\n        |> Tuple.first\n        |> toTurtle\n        |> String.lines\n    --> [ \"_:2273e9c9-fa2d-4c28-ae87-947ad36cbecd\"\n    --> , \"  a <http://example.org#Person> .\"\n    --> ]\n\n","type":"Rdf.IsBlankNodeOrIriOrLiteral compatible -> Rdf.Encode.TermEncoder"}],"binops":[]},{"name":"Rdf.Graph","comment":" This module defines the [`Graph`](#Graph) type which models an [RDF\ngraph](https://www.w3.org/TR/rdf11-concepts/#section-rdf-graph), and helper\nfunctions for building, updating, parsing, and serializing these. Take a look\nat the [`Rdf.Decode`](Rdf-Decode) module if you want to extract Elm values from\na [`Graph`](#Graph). On the other hand, the [`Rdf.Encode`](Rdf-Encode) module\ndeals with conveniently building these [`Graph`](#Graph)'s.\n\n@docs Graph\n\n\n# Build\n\n@docs empty, singleton\n@docs fromTriples\n\n\n## Turtle and N-Triples format\n\n@docs fromNTriples, fromTurtle, fromTurtleWith\n@docs Error, errorToString\n\n\n## RDFJS\n\n@docs decoder, encode\n\n\n# Query\n\n@docs isEmpty\n@docs decode\n\n\n# Transform\n\n@docs insert, insertProperty\n@docs mintBlankNodes\n@docs replace\n\n\n## Base and prefixes\n\n@docs getBase, setBase, clearBase\n@docs getPrefixes, addPrefix, addPrefixes, clearPrefixes\n\n\n# Combine\n\n@docs union\n\n\n# Export\n\n@docs toTriples\n@docs toNTriples, toTurtle\n\n","unions":[{"name":"Error","comment":" You get one of these if parsing fails.\n","args":[],"cases":[["ErrorParser",["List.List Parser.DeadEnd"]],["MissingSubject",[]],["MissingPredicate",[]],["MissingBase",[]],["CouldNotResolvePrefixedName",["String.String","String.String"]]]}],"aliases":[{"name":"Graph","comment":" This type represents an [RDF\nGraph](https://www.w3.org/TR/rdf11-concepts/#section-rdf-graph).\n","args":[],"type":"Internal.Graph.Graph"}],"values":[{"name":"addPrefix","comment":" Add one prefix declaration to the [`Graph`](#Graph). An existing\ndeclaration with the same name will be overwritten.\n","type":"String.String -> Rdf.Iri -> Rdf.Graph.Graph -> Rdf.Graph.Graph"},{"name":"addPrefixes","comment":" Add some prefix declarations to the [`Graph`](#Graph). Existing prefixes\nwith the same name will be overwritten.\n","type":"Dict.Dict String.String Rdf.Iri -> Rdf.Graph.Graph -> Rdf.Graph.Graph"},{"name":"clearBase","comment":" Remove the base declaration.\n","type":"Rdf.Graph.Graph -> Rdf.Graph.Graph"},{"name":"clearPrefixes","comment":" Remove all prefix declarations.\n","type":"Rdf.Graph.Graph -> Rdf.Graph.Graph"},{"name":"decode","comment":" Run a [`Decoder`](Rdf-Decode#Decoder) on an actual `Graph`. Make sure\nto anchor your decoder using [`from`](Rdf-Decode#from),\n[`fromSubject`](Rdf-Decode#fromSubject), or [`at`](Rdf-Decode#at).\n","type":"Rdf.Decode.Decoder a -> Rdf.Graph.Graph -> Result.Result Rdf.Decode.Error a"},{"name":"decoder","comment":" A JSON decoder for decoding a [`Graph`](#Graph) from a JSON value according\nto the [RDFJS Specification](https://rdf.js.org/).\n","type":"Json.Decode.Decoder Rdf.Graph.Graph"},{"name":"empty","comment":" Create an empty [RDF\ngraph](https://www.w3.org/TR/rdf11-concepts/#section-rdf-graph).\n","type":"Rdf.Graph.Graph"},{"name":"encode","comment":" Encode a [`Graph`](#Graph) into a JSON value according to the [RDFJS\nSpecification](https://rdf.js.org/).\n","type":"Rdf.Graph.Graph -> Json.Encode.Value"},{"name":"errorToString","comment":" Turn an [`Error`](#Error) into a more human friendly error message.\n","type":"String.String -> Rdf.Graph.Error -> String.String"},{"name":"fromNTriples","comment":" Parse an [N-Triples](https://www.w3.org/TR/n-triples/) file. This function\nwill keep blank node identifiers.\n\n**Note:** Since every N-Triples file is also a valid Turtle file, you can also\nuse `fromTurtle` instead of this function. But if you know that you are dealing\nwith N-Triples files it is still better to use `fromNTriples` since\n\n  - you make sure that your input really is a valid N-Triples file,\n  - you don't have to deal with [`Seed`](Rdf#Seed)'s, and\n  - it is a bit faster.\n\n","type":"String.String -> Result.Result Rdf.Graph.Error Rdf.Graph.Graph"},{"name":"fromTriples","comment":" Convert a list of [`Triple`](Rdf#Triple)'s into a [`Graph`](#Graph).\n","type":"List.List Rdf.Triple -> Rdf.Graph.Graph"},{"name":"fromTurtle","comment":" Parse a [Turtle](https://www.w3.org/TR/turtle/) or\n[N-Triples](https://www.w3.org/TR/n-triples/) file and put all RDF triples into\na [`Graph`](#Graph). This function will keep blank node identifiers and only\nmint new ones if they are not given in the original. For minting it uses the\nprovided [`Seed`](Rdf#Seed). Make sure to reuse the returned [`Seed`](Rdf#Seed)\nin subsequent calls to avoid blank node identifier collisions. You can use\n[`Rdf.initialSeed`](Rdf#initialSeed) and\n[`Rdf.seedGenerator`](Rdf#seedGenerator) to get a seed.\n","type":"Rdf.Seed -> String.String -> Result.Result Rdf.Graph.Error ( Rdf.Graph.Graph, Rdf.Seed )"},{"name":"fromTurtleWith","comment":" This is like [`fromTurtle`](#fromTurtle) but you can also specify the\ninitial base IRI.\n","type":"Rdf.Seed -> Rdf.Iri -> String.String -> Result.Result Rdf.Graph.Error ( Rdf.Graph.Graph, Rdf.Seed )"},{"name":"getBase","comment":" Return the current base declaration.\n","type":"Rdf.Graph.Graph -> Maybe.Maybe Rdf.Iri"},{"name":"getPrefixes","comment":" Return all defined prefix declarations.\n","type":"Rdf.Graph.Graph -> Dict.Dict String.String Rdf.Iri"},{"name":"insert","comment":" Insert an RDF triple into the [`Graph`](#Graph).\n","type":"Rdf.IsBlankNodeOrIri compatible1 -> Rdf.IsIri compatible2 -> Rdf.IsBlankNodeOrIriOrLiteral compatible3 -> Rdf.Graph.Graph -> Rdf.Graph.Graph"},{"name":"insertProperty","comment":" Insert a property into the graph. If you provide a property path which does\nnot just consist of a single IRI (or its inverse), intermediate blank nodes\nwill be minted using the provided [`Seed`](Rdf#Seed).\n","type":"Rdf.IsBlankNodeOrIri compatible1 -> Rdf.IsPath compatible2 -> Rdf.IsBlankNodeOrIriOrLiteral compatible3 -> Rdf.Graph.Graph -> Rdf.Seed -> ( Rdf.Graph.Graph, Rdf.Seed )"},{"name":"isEmpty","comment":" Determine if a [`Graph`](#Graph) is empty.\n\n    isEmpty empty\n    --> True\n\n","type":"Rdf.Graph.Graph -> Basics.Bool"},{"name":"mintBlankNodes","comment":" Mint new identifiers for all blank nodes in the graph using the provided\n[`Seed`](Rdf#Seed). This can be usefull before merging multiple\n[`Graph`](#Graph)'s with [`union`](#union).\n","type":"Rdf.Seed -> Rdf.Graph.Graph -> ( Rdf.Graph.Graph, Rdf.Seed )"},{"name":"replace","comment":" Create a new graph by replacing all occurances of the first term with the\nsecond term.\n","type":"Rdf.IsBlankNodeOrIriOrLiteral compatible -> Rdf.IsBlankNodeOrIriOrLiteral compatible -> Rdf.Graph.Graph -> Rdf.Graph.Graph"},{"name":"setBase","comment":" Set the base declaration to the provided URL.\n","type":"Rdf.Iri -> Rdf.Graph.Graph -> Rdf.Graph.Graph"},{"name":"singleton","comment":" Create an RDF graph which only contains one triple.\n","type":"Rdf.IsBlankNodeOrIri compatible1 -> Rdf.IsIri compatible2 -> Rdf.IsBlankNodeOrIriOrLiteral compatible3 -> Rdf.Graph.Graph"},{"name":"toNTriples","comment":" Serialize a [`Graph`](#Graph) into the\n[N-Triples](https://www.w3.org/TR/n-triples/) format.\n","type":"Rdf.Graph.Graph -> String.String"},{"name":"toTriples","comment":" Get a list of all [`Triple`](Rdf#Triple)'s in the [`Graph`](#Graph).\n","type":"Rdf.Graph.Graph -> List.List Rdf.Triple"},{"name":"toTurtle","comment":" Serialize a [`Graph`](#Graph) into the\n[Turtle](https://www.w3.org/TR/turtle/) format. Take a look at the [Base and\nprefixes section](#base-and-prefixes) for functions to adjust the\nserialization.\n","type":"Rdf.Graph.Graph -> String.String"},{"name":"union","comment":" Merge two [`Graph`](#Graph)'s into one.\n\n**Important:** This will not mint new blank node identifiers, so you might get\nunwanted identifier collissions. Take a look at\n[`mintBlankNodes`](#mintBlankNodes) for a safer approach.\n\n","type":"Rdf.Graph.Graph -> Rdf.Graph.Graph -> Rdf.Graph.Graph"}],"binops":[]},{"name":"Rdf.Sparql","comment":" This module contains functions and types to create [SPARQL 1.1\nqueries](https://www.w3.org/TR/sparql11-query/).\n\n@docs Query\n@docs toString, toStringWith\n\n\n# `SELECT` queries\n\n@docs select\n\n\n# `CONSTRUCT` queries\n\n@docs construct\n\n\n# `FROM` clauses\n\n@docs from\n\n\n# `WHERE` clauses\n\n@docs GroupGraphPattern, where_\n@docs empty, values\n@docs triples\n@docs graphPattern\n@docs optional, or, and\n@docs filter, bind\n\n\n# `LIMIT`\n\n@docs limit\n\n\n## Expressions\n\n@docs Expression\n@docs simple, isIri, equals, concat\n\n\n# Triple patterns/templates\n\n@docs Triple, triple, triplesAlong\n\n\n# Results\n\n@docs Results, resultsDecoder\n\n","unions":[{"name":"Expression","comment":" The basic building block of an expression. Take a look at the functions\nbelow to learn how to create and combine these.\n","args":[],"cases":[]},{"name":"GroupGraphPattern","comment":" The basic building block of a `WHERE` clause. Take a look at the functions\nbelow to learn how to create and combine these.\n","args":[],"cases":[]},{"name":"Query","comment":" The `Query` type represents a SPARQL query.\n","args":[],"cases":[]}],"aliases":[{"name":"Results","comment":" An instance of `Results` represents the results of a `SELECT` query.\n","args":[],"type":"List.List (Dict.Dict String.String Rdf.BlankNodeOrIriOrLiteral)"},{"name":"Triple","comment":" This type represents triple patterns (which appear in `WHERE` clauses) as\nwell as triple templates (which appear in `CONSTRUCT` clauses). Note that since\npredicates in triple templates cannot contain property paths, triples\ncontaining these will be skipped when converting `Query`'s into SPARQL queries.\n","args":[],"type":"{ subject : Rdf.BlankNodeOrIriOrVar, predicate : Rdf.VarOrPath, object : Rdf.BlankNodeOrIriOrLiteralOrVar }"}],"values":[{"name":"and","comment":" Create a graph pattern which matches the first **and** the second pattern.\n\n    import Rdf exposing (iri, varQ, a, rdfs)\n\n    construct []\n        |> where_\n            (and\n                (triples [ triple (varQ \"person\") a (iri \"http://example.org#Person\") ])\n                (triples [ triple (varQ \"person\") a (iri \"http://example.org#Maintainer\") ])\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  ?person a <Person> .\"\n    --> , \"  ?person a <Maintainer> .\"\n    --> , \"}\"\n    --> ]\n\n","type":"Rdf.Sparql.GroupGraphPattern -> Rdf.Sparql.GroupGraphPattern -> Rdf.Sparql.GroupGraphPattern"},{"name":"bind","comment":" Bind the result of an expression to a query variable.\n\n    import Rdf exposing (iri, string, varQ, a, rdfs)\n\n    construct []\n        |> where_\n            (and\n                (triples\n                    [ triple (varQ \"person\") a (iri \"http://example.org#Person\")\n                    , triple (varQ \"person\") (iri \"http://example.org#firstName\") (varQ \"firstName\")\n                    , triple (varQ \"person\") (iri \"http://example.org#lastName\") (varQ \"lastName\")\n                    ]\n                )\n                (bind\n                    (concat\n                        [ simple (varQ \"firstName\")\n                        , simple (string \" \")\n                        , simple (varQ \"lastName\")\n                        ]\n                    )\n                    (varQ \"name\")\n                )\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  ?person a <Person> .\"\n    --> , \"  ?person <firstName> ?firstName .\"\n    --> , \"  ?person <lastName> ?lastName .\"\n    --> , \"  BIND(\"\n    --> , \"    CONCAT(\"\n    --> , \"      ?firstName,\"\n    --> , \"      \\\" \\\",\"\n    --> , \"      ?lastName\"\n    --> , \"    )\"\n    --> , \"    AS\"\n    --> , \"    ?name\"\n    --> , \"  )\"\n    --> , \"}\"\n    --> ]\n\n","type":"Rdf.Sparql.Expression -> Rdf.IsVar compatible -> Rdf.Sparql.GroupGraphPattern"},{"name":"concat","comment":" Concatenate a list of `Expressions` which evaluate to string literals. This\ntranslates to [`CONCAT`](https://www.w3.org/TR/sparql11-query/#func-concat).\n","type":"List.List Rdf.Sparql.Expression -> Rdf.Sparql.Expression"},{"name":"construct","comment":" Build a [`CONSTRUCT`](https://www.w3.org/TR/sparql11-query/#construct)\nquery.\n","type":"List.List Rdf.Sparql.Triple -> Rdf.Sparql.Query"},{"name":"empty","comment":" Create the empty group graph pattern `{ }`.\n\n    construct []\n        |> where_ empty\n        |> toString\n    --> \"CONSTRUCT {} WHERE {}\"\n\n","type":"Rdf.Sparql.GroupGraphPattern"},{"name":"equals","comment":" Compare two expressions. This translates to `<first> = <second>`.\n","type":"Rdf.Sparql.Expression -> Rdf.Sparql.Expression -> Rdf.Sparql.Expression"},{"name":"filter","comment":" Add a filter expression.\n\n    import Rdf exposing (iri, string, varQ, a, rdfs)\n\n    construct []\n        |> where_\n            (and\n                (triples\n                    [ triple (varQ \"person\") a (iri \"http://example.org#Person\")\n                    , triple (varQ \"person\") (rdfs \"label\") (varQ \"label\")\n                    ]\n                )\n                (filter\n                    (equals\n                        (simple (varQ \"person\"))\n                        (simple (string \"Alice\"))\n                    )\n                )\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  ?person a <Person> .\"\n    --> , \"  ?person rdfs:label ?label .\"\n    --> , \"  FILTER(?person = \\\"Alice\\\")\"\n    --> , \"}\"\n    --> ]\n\n","type":"Rdf.Sparql.Expression -> Rdf.Sparql.GroupGraphPattern"},{"name":"from","comment":" Restrict a query to a specific graph by adding\na [`FROM`](https://www.w3.org/TR/sparql11-query/#specifyingDataset).\n","type":"Rdf.Iri -> Rdf.Sparql.Query -> Rdf.Sparql.Query"},{"name":"graphPattern","comment":" Make a graph pattern scoped to a named graph.\n\n    import Rdf exposing (iri, varQ, a, rdfs)\n\n    construct []\n        |> where_\n            (graphPattern (iri \"http://example.org/workspace/\")\n                (triples [ triple (varQ \"person\") a (iri \"http://example.org#Author\") ])\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  GRAPH <http://example.org/workspace/> {\"\n    --> , \"    ?person a <Author> .\"\n    --> , \"  }\"\n    --> , \"}\"\n    --> ]\n\n","type":"Rdf.IsIriOrVar compatible -> Rdf.Sparql.GroupGraphPattern -> Rdf.Sparql.GroupGraphPattern"},{"name":"isIri","comment":" Check if the `Expression` is an IRI. This translates to\n[`isIRI`](https://www.w3.org/TR/sparql11-query/#func-isIRI).\n","type":"Rdf.Sparql.Expression -> Rdf.Sparql.Expression"},{"name":"limit","comment":" Add a limit expression.\n\n    construct []\n        |> where_ empty\n        |> limit 42\n        |> toString\n        |> String.lines\n    --> [ \"CONSTRUCT {} WHERE {}\"\n    --> , \"LIMIT 42\"\n    --> ]\n\n","type":"Basics.Int -> Rdf.Sparql.Query -> Rdf.Sparql.Query"},{"name":"optional","comment":" Make a graph pattern optional.\n\n    import Rdf exposing (iri, varQ, a, rdfs)\n\n    construct []\n        |> where_\n            (and\n                (triples\n                    [ triple (varQ \"person\") a (iri \"http://example.org#Person\") ])\n                (optional\n                    (triples\n                        [ triple (varQ \"person\") (rdfs \"label\") (varQ \"label\") ])\n                )\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  ?person a <Person> .\"\n    --> , \"  OPTIONAL {\"\n    --> , \"    ?person rdfs:label ?label .\"\n    --> , \"  }\"\n    --> , \"}\"\n    --> ]\n\n","type":"Rdf.Sparql.GroupGraphPattern -> Rdf.Sparql.GroupGraphPattern"},{"name":"or","comment":" Create a graph pattern which matches the first **or** the second pattern.\n\n    import Rdf exposing (iri, varQ, a, rdfs)\n\n    construct []\n        |> where_\n            (or\n                (triples [ triple (varQ \"person\") a (iri \"http://example.org#Author\") ])\n                (triples [ triple (varQ \"person\") a (iri \"http://example.org#Reader\") ])\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  {\"\n    --> , \"    ?person a <Author> .\"\n    --> , \"  }\"\n    --> , \"  UNION\"\n    --> , \"  {\"\n    --> , \"    ?person a <Reader> .\"\n    --> , \"  }\"\n    --> , \"}\"\n    --> ]\n\n","type":"Rdf.Sparql.GroupGraphPattern -> Rdf.Sparql.GroupGraphPattern -> Rdf.Sparql.GroupGraphPattern"},{"name":"resultsDecoder","comment":" A JSON decoder to decode the\n[`\"results\"`](https://www.w3.org/TR/sparql12-results-json/#select-results)\nsection of a variable binding result.\n","type":"Json.Decode.Decoder Rdf.Sparql.Results"},{"name":"select","comment":" Build a [`SELECT`](https://www.w3.org/TR/sparql11-query/#select)\nquery.\n","type":"List.List Rdf.Var -> Rdf.Sparql.Query"},{"name":"simple","comment":" Turn an RDF term into an `Expression`.\n","type":"Rdf.IsIriOrLiteralOrVar compatible -> Rdf.Sparql.Expression"},{"name":"toString","comment":" Turn a `Query` into a SPARQL query.\n","type":"Rdf.Sparql.Query -> String.String"},{"name":"toStringWith","comment":" Turn a `Query` into a SPARQL query including and using the `BASE` and\n`PREFIX` declarations.\n","type":"Rdf.Prologue -> Rdf.Sparql.Query -> String.String"},{"name":"triple","comment":" Create a triple pattern/template by providing a subject, verb, and object.\n","type":"Rdf.IsBlankNodeOrIriOrVar compatible1 -> Rdf.IsVarOrPath compatible2 -> Rdf.IsBlankNodeOrIriOrLiteralOrVar compatible3 -> Rdf.Sparql.Triple"},{"name":"triples","comment":" Create a basic graph pattern which matches a set of triple patterns.\n\n    import Rdf exposing (iri, varQ, a, rdfs)\n\n    construct []\n        |> where_\n            (triples\n                [ triple (varQ \"person\") a (iri \"http://example.org#Person\")\n                , triple (varQ \"person\") (rdfs \"label\") (varQ \"label\")\n                ]\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  ?person a <Person> .\"\n    --> , \"  ?person rdfs:label ?label .\"\n    --> , \"}\"\n    --> ]\n\n","type":"List.List Rdf.Sparql.Triple -> Rdf.Sparql.GroupGraphPattern"},{"name":"triplesAlong","comment":" Expand a triple pattern/template with a property path predicate into a list\nof triple patterns with IRI or variable predicates. The first argument is the\nprefix used for intermediate query variables.\n\n    import Rdf exposing (iri, inverse, sequence, varQ, asPath, a, rdfs)\n\n    construct []\n        |> where_\n            (triplesAlong \"person\"\n                (varQ \"child\")\n                (sequence\n                    (inverse (iri \"http://example.org#hasChild\"))\n                    [ inverse (iri \"http://example.org#hasChild\")\n                    , asPath a\n                    ]\n                )\n                (iri \"http://example.org#Person\")\n                |> triples\n            )\n        |> toStringWith\n            { base = Just \"http://example.org#\"\n            , prefixes = [ ( \"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\" ) ]\n            }\n        |> String.lines\n    --> [ \"BASE <http://example.org#>\"\n    --> , \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\"\n    --> , \"CONSTRUCT {} WHERE {\"\n    --> , \"  ?person_0 <hasChild> ?child .\"\n    --> , \"  ?person_1 <hasChild> ?person_0 .\"\n    --> , \"  ?person_1 a <Person> .\"\n    --> , \"}\"\n    --> ]\n\n","type":"String.String -> Rdf.IsBlankNodeOrIriOrVar compatible1 -> Rdf.IsPath compatible2 -> Rdf.IsBlankNodeOrIriOrLiteralOrVar compatible3 -> List.List Rdf.Sparql.Triple"},{"name":"values","comment":" Provide inline data.\n\n    import Rdf\n\n    construct []\n        |> where_\n            (values (Rdf.varQ \"person\")\n                [ Rdf.iri \"http://example.org/alice\" ]\n            )\n        |> toString\n        |> String.lines\n    --> [ \"CONSTRUCT {} WHERE {\"\n    --> , \"  VALUES ?person {\"\n    --> , \"    <http://example.org/alice>\"\n    --> , \"  }\"\n    --> , \"}\"\n    --> ]\n\n","type":"Rdf.IsVar compatible1 -> List.List (Rdf.IsBlankNodeOrIriOrLiteral compatible2) -> Rdf.Sparql.GroupGraphPattern"},{"name":"where_","comment":" Set the `WHERE` clause of a `Query` to the given group graph pattern. If\nyou don't provide this, the empty group graph pattern will be used.\n","type":"Rdf.Sparql.GroupGraphPattern -> Rdf.Sparql.Query -> Rdf.Sparql.Query"}],"binops":[]}]