hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/print/posix/regex.json
{
"name": "hydra.core.print.posix.regex",
"metadata": {
"description": "Per-dialect printer rendering the hydra.core.regex AST into POSIX ERE syntax (Haskell Text.Regex.TDFA, Scheme Guile (ice-9 regex)). Differs from the canonical hydra.core.print.regex in three places, each probe-verified against BOTH TDFA and Guile (docs/specification/regex.md and issue #567/#603/#729-land): (1) Hydra's . (any character INCLUDING newline) renders as (.|<newline>), a grouped alternation, because POSIX ERE's native . excludes newline, does not support the \\s / \\S shorthands, and (on Guile specifically) rejects a literal NUL byte inside a bracket expression, ruling out an explicit [<U+0000>-<U+10FFFF>] range class; (2) anchors ^ and $ (whole-STRING boundaries in Hydra) render as the GNU/glibc whole-buffer anchors \\` and \\', because TDFA's native ^ and $ are line-oriented; (3) character-class metacharacters ] ^ - are disambiguated POSITIONALLY (] first, - last, ^ never first) rather than by backslash-escaping, because POSIX ERE bracket expressions have no escape mechanism at all (a backslash inside [...] is an ordinary character on TDFA). All other productions are native POSIX ERE.",
"comments": [],
"seeAlso": [],
"provisions": []},
"dependencies": [
{"module": "hydra.core.lib.equality"},
{"module": "hydra.core.lib.lists"},
{"module": "hydra.core.lib.literals"},
{"module": "hydra.core.lib.logic"},
{"module": "hydra.core.lib.pairs"},
{"module": "hydra.core.lib.strings"},
{"module": "hydra.core.regex"}],
"definitions": [
{
"term": {
"name": "hydra.core.print.posix.regex.alternation",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"list": {"list": {"variable": "hydra.core.regex.Quantified"}}}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "alt",
"domain": {"list": {"list": {"variable": "hydra.core.regex.Quantified"}}},
"body": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.lib.strings.join"}, "argument": {"literal": {"string": "|"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.map"}, "type": {"list": {"variable": "hydra.core.regex.Quantified"}}}},
"type": {"literal": "string"}}},
"argument": {"variable": "hydra.core.print.posix.regex.regexSequence"}}},
"argument": {"variable": "alt"}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Render an alternation, joining its branches with the | operator."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.anyClass",
"signature": {"typeParameters": [], "parameters": [], "result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{"literal": {"string": "(.|"}},
{
"application": {
"function": {"variable": "hydra.core.print.posix.regex.printCodePoint"},
"argument": {"literal": {"integer": {"int32": 10}}}}},
{"literal": {"string": ")"}}]}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "The POSIX ERE rendering of Hydra's . (any character incl. newline): '.' alternated with an explicit newline, grouped — portable across POSIX ERE engines including Guile, which rejects a literal NUL byte in a bracket expression."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.atom",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"variable": "hydra.core.regex.Atom"}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "a",
"domain": {"variable": "hydra.core.regex.Atom"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.regex.Atom",
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {"application": {"function": {"variable": "hydra.core.print.posix.regex.escapeLiteral"}, "argument": {"variable": "c"}}}}}},
{
"name": "any",
"handler": {"lambda": {"parameter": "_", "domain": "unit", "body": {"variable": "hydra.core.print.posix.regex.anyClass"}}}},
{
"name": "anchorStart",
"handler": {"lambda": {"parameter": "_", "domain": "unit", "body": {"literal": {"string": "\\`"}}}}},
{
"name": "anchorEnd",
"handler": {"lambda": {"parameter": "_", "domain": "unit", "body": {"literal": {"string": "\\'"}}}}},
{
"name": "group",
"handler": {
"lambda": {
"parameter": "g",
"domain": {"list": {"list": {"variable": "hydra.core.regex.Quantified"}}},
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{"literal": {"string": "("}},
{"application": {"function": {"variable": "hydra.core.print.posix.regex.alternation"}, "argument": {"variable": "g"}}},
{"literal": {"string": ")"}}]}}}}}},
{
"name": "class",
"handler": {
"lambda": {
"parameter": "cc",
"domain": {"variable": "hydra.core.regex.CharacterClass"},
"body": {
"application": {"function": {"variable": "hydra.core.print.posix.regex.characterClass"}, "argument": {"variable": "cc"}}}}}}]}},
"argument": {"variable": "a"}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Render a single atom; . renders as (.|<newline>), portable across POSIX ERE engines."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.characterClass",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"variable": "hydra.core.regex.CharacterClass"}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "cc",
"domain": {"variable": "hydra.core.regex.CharacterClass"},
"body": {
"let": {
"bindings": [
{
"name": "items",
"term": {
"application": {
"function": {"project": {"typeName": "hydra.core.regex.CharacterClass", "fieldName": "items"}},
"argument": {"variable": "cc"}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "bracketAndRest",
"term": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.partition"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.print.posix.regex.classItemIsLiteral"},
"argument": {"literal": {"integer": {"int32": 93}}}}}}},
"argument": {"variable": "items"}}},
"typeScheme": {
"variables": [],
"body": {
"pair": {
"first": {"list": {"variable": "hydra.core.regex.ClassItem"}},
"second": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"constraints": []}},
{
"name": "bracketItems",
"term": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.pairs.first"}, "type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"argument": {"variable": "bracketAndRest"}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "afterBracket",
"term": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.pairs.second"}, "type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"argument": {"variable": "bracketAndRest"}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "dashAndRest",
"term": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.partition"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.print.posix.regex.classItemIsLiteral"},
"argument": {"literal": {"integer": {"int32": 45}}}}}}},
"argument": {"variable": "afterBracket"}}},
"typeScheme": {
"variables": [],
"body": {
"pair": {
"first": {"list": {"variable": "hydra.core.regex.ClassItem"}},
"second": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"constraints": []}},
{
"name": "dashItems",
"term": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.pairs.first"}, "type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"argument": {"variable": "dashAndRest"}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "rest",
"term": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.pairs.second"}, "type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"argument": {"variable": "dashAndRest"}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "caretAndNonCaret",
"term": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.partition"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.print.posix.regex.classItemIsLiteral"},
"argument": {"literal": {"integer": {"int32": 94}}}}}}},
"argument": {"variable": "rest"}}},
"typeScheme": {
"variables": [],
"body": {
"pair": {
"first": {"list": {"variable": "hydra.core.regex.ClassItem"}},
"second": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"constraints": []}},
{
"name": "caretItems",
"term": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.pairs.first"}, "type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"argument": {"variable": "caretAndNonCaret"}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "nonCaretItems",
"term": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.pairs.second"}, "type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"argument": {"variable": "caretAndNonCaret"}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "safeRest",
"term": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.logic.ifElse"}, "type": {"list": {"variable": "hydra.core.regex.ClassItem"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.or"},
"argument": {
"application": {
"function": {"variable": "hydra.core.lib.logic.not"},
"argument": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.isEmpty"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"argument": {"variable": "bracketItems"}}}}}}},
"argument": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.isEmpty"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"argument": {"variable": "nonCaretItems"}}}}}}},
"argument": {"variable": "rest"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.concat2"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"argument": {"variable": "nonCaretItems"}}},
"argument": {"variable": "caretItems"}}}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}},
{
"name": "ordered",
"term": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.concat"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"argument": {"list": [{"variable": "bracketItems"}, {"variable": "safeRest"}, {"variable": "dashItems"}]}}},
"typeScheme": {"variables": [], "body": {"list": {"variable": "hydra.core.regex.ClassItem"}}, "constraints": []}}],
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{"literal": {"string": "["}},
{
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.logic.ifElse"}, "type": {"literal": "string"}}},
"argument": {
"application": {
"function": {"project": {"typeName": "hydra.core.regex.CharacterClass", "fieldName": "negated"}},
"argument": {"variable": "cc"}}}}},
"argument": {"literal": {"string": "^"}}}},
"argument": {"literal": {"string": ""}}}},
{
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.map"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
"type": {"literal": "string"}}},
"argument": {"variable": "hydra.core.print.posix.regex.classItem"}}},
"argument": {"variable": "ordered"}}}}},
{"literal": {"string": "]"}}]}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "Render a character class, including the leading ^ for a negated class. Reorders items positionally for POSIX ERE (which has no bracket-expression escaping): a literal ] is moved to the front (immediately after the optional negating ^), a literal - is moved to the back, and (only when there is no literal ] item to occupy the first slot) a literal ^ is moved after the first non-^ item -- POSIX treats a leading ^ as the negation marker regardless of Hydra's negated flag. The one residual gap: a class whose only member is a literal ^ has no safe position on POSIX ERE; this is an extreme corner case (single-item classes are otherwise unremarkable) and is left unhandled here."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.classItem",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"variable": "hydra.core.regex.ClassItem"}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "item",
"domain": {"variable": "hydra.core.regex.ClassItem"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.regex.ClassItem",
"cases": [
{
"name": "character",
"handler": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {"function": {"variable": "hydra.core.print.posix.regex.printCodePoint"}, "argument": {"variable": "c"}}}}}},
{
"name": "range",
"handler": {
"lambda": {
"parameter": "r",
"domain": {"variable": "hydra.core.regex.CharacterRange"},
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{
"application": {
"function": {"variable": "hydra.core.print.posix.regex.printCodePoint"},
"argument": {
"application": {
"function": {"project": {"typeName": "hydra.core.regex.CharacterRange", "fieldName": "from"}},
"argument": {"variable": "r"}}}}},
{"literal": {"string": "-"}},
{
"application": {
"function": {"variable": "hydra.core.print.posix.regex.printCodePoint"},
"argument": {
"application": {
"function": {"project": {"typeName": "hydra.core.regex.CharacterRange", "fieldName": "to"}},
"argument": {"variable": "r"}}}}}]}}}}}}]}},
"argument": {"variable": "item"}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "Render one character-class member (a single character or an inclusive range). POSIX ERE bracket expressions do NOT support backslash escaping (confirmed by TDFA probe: \\- and \\] inside [...] are two literal characters, not an escape); the metacharacters ] ^ - are instead disambiguated positionally by characterClass (] first, - last, ^ never first), so a plain character or range here never needs an escape."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.classItemIsLiteral",
"signature": {
"typeParameters": [],
"parameters": [
{"name": "arg0", "type": {"literal": {"integer": "int32"}}, "isLazy": false},
{"name": "arg1", "type": {"variable": "hydra.core.regex.ClassItem"}, "isLazy": false}],
"result": {"type": {"literal": "boolean"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"lambda": {
"parameter": "item",
"domain": {"variable": "hydra.core.regex.ClassItem"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.regex.ClassItem",
"default": {"literal": {"boolean": false}},
"cases": [
{
"name": "character",
"handler": {
"lambda": {
"parameter": "ic",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "ic"}}},
"argument": {"variable": "c"}}}}}}]}},
"argument": {"variable": "item"}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "True if a ClassItem is the single literal character code point c (not a range)."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.escapeLiteral",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"literal": {"integer": "int32"}}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"let": {
"bindings": [
{
"name": "isMeta",
"term": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.lists.foldl"}, "type": {"literal": "boolean"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {
"parameter": "acc",
"domain": {"literal": "boolean"},
"body": {
"lambda": {
"parameter": "m",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.lib.logic.or"}, "argument": {"variable": "acc"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"variable": "m"}}}}}}}}}}},
"argument": {"literal": {"boolean": false}}}},
"argument": {
"list": [
{"literal": {"integer": {"int32": 46}}},
{"literal": {"integer": {"int32": 94}}},
{"literal": {"integer": {"int32": 36}}},
{"literal": {"integer": {"int32": 42}}},
{"literal": {"integer": {"int32": 43}}},
{"literal": {"integer": {"int32": 63}}},
{"literal": {"integer": {"int32": 40}}},
{"literal": {"integer": {"int32": 41}}},
{"literal": {"integer": {"int32": 91}}},
{"literal": {"integer": {"int32": 93}}},
{"literal": {"integer": {"int32": 123}}},
{"literal": {"integer": {"int32": 125}}},
{"literal": {"integer": {"int32": 124}}},
{"literal": {"integer": {"int32": 92}}}]}}},
"typeScheme": {"variables": [], "body": {"literal": "boolean"}, "constraints": []}}],
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.logic.ifElse"}, "type": {"literal": "string"}}},
"argument": {"variable": "isMeta"}}},
"argument": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.lib.strings.concat2"}, "argument": {"literal": {"string": "\\"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.print.posix.regex.printCodePoint"}, "argument": {"variable": "c"}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.print.posix.regex.printCodePoint"}, "argument": {"variable": "c"}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {"string": "Render a literal code point in top-level context, backslash-escaping POSIX ERE metacharacters."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.printCodePoint",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"literal": {"integer": "int32"}}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {"function": {"variable": "hydra.core.lib.strings.fromList"}, "argument": {"list": [{"variable": "c"}]}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Render a single Unicode code point as a one-character string."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.printRegex",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"list": {"list": {"variable": "hydra.core.regex.Quantified"}}}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "r",
"domain": {"list": {"list": {"variable": "hydra.core.regex.Quantified"}}},
"body": {"application": {"function": {"variable": "hydra.core.print.posix.regex.alternation"}, "argument": {"variable": "r"}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "Render a hydra.core.regex AST into POSIX ERE syntax. Identical to the canonical printer except that . (any incl. newline) becomes the grouped alternation (.|<newline>)."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.quantified",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"variable": "hydra.core.regex.Quantified"}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "qa",
"domain": {"variable": "hydra.core.regex.Quantified"},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat2"},
"argument": {
"application": {
"function": {"variable": "hydra.core.print.posix.regex.atom"},
"argument": {
"application": {
"function": {"project": {"typeName": "hydra.core.regex.Quantified", "fieldName": "atom"}},
"argument": {"variable": "qa"}}}}}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.print.posix.regex.quantifier"},
"argument": {
"application": {
"function": {"project": {"typeName": "hydra.core.regex.Quantified", "fieldName": "quantifier"}},
"argument": {"variable": "qa"}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Render an atom followed by its quantifier suffix."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.quantifier",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"variable": "hydra.core.regex.Quantifier"}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "q",
"domain": {"variable": "hydra.core.regex.Quantifier"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.regex.Quantifier",
"cases": [
{"name": "one", "handler": {"lambda": {"parameter": "_", "domain": "unit", "body": {"literal": {"string": ""}}}}},
{"name": "zeroOrOne", "handler": {"lambda": {"parameter": "_", "domain": "unit", "body": {"literal": {"string": "?"}}}}},
{
"name": "zeroOrMore",
"handler": {"lambda": {"parameter": "_", "domain": "unit", "body": {"literal": {"string": "*"}}}}},
{"name": "oneOrMore", "handler": {"lambda": {"parameter": "_", "domain": "unit", "body": {"literal": {"string": "+"}}}}},
{
"name": "exactly",
"handler": {
"lambda": {
"parameter": "n",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{"literal": {"string": "{"}},
{"application": {"function": {"variable": "hydra.core.lib.literals.printInt32"}, "argument": {"variable": "n"}}},
{"literal": {"string": "}"}}]}}}}}},
{
"name": "atLeast",
"handler": {
"lambda": {
"parameter": "n",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{"literal": {"string": "{"}},
{"application": {"function": {"variable": "hydra.core.lib.literals.printInt32"}, "argument": {"variable": "n"}}},
{"literal": {"string": ",}"}}]}}}}}},
{
"name": "range",
"handler": {
"lambda": {
"parameter": "r",
"domain": {"variable": "hydra.core.regex.Range"},
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{"literal": {"string": "{"}},
{
"application": {
"function": {"variable": "hydra.core.lib.literals.printInt32"},
"argument": {
"application": {"function": {"project": {"typeName": "hydra.core.regex.Range", "fieldName": "min"}}, "argument": {"variable": "r"}}}}},
{"literal": {"string": ","}},
{
"application": {
"function": {"variable": "hydra.core.lib.literals.printInt32"},
"argument": {
"application": {"function": {"project": {"typeName": "hydra.core.regex.Range", "fieldName": "max"}}, "argument": {"variable": "r"}}}}},
{"literal": {"string": "}"}}]}}}}}}]}},
"argument": {"variable": "q"}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Render a quantifier suffix; the 'one' quantifier renders as the empty string."}}}]}}}}},
{
"term": {
"name": "hydra.core.print.posix.regex.regexSequence",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"list": {"variable": "hydra.core.regex.Quantified"}}, "isLazy": false}],
"result": {"type": {"literal": "string"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "s",
"domain": {"list": {"variable": "hydra.core.regex.Quantified"}},
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.lists.map"}, "type": {"variable": "hydra.core.regex.Quantified"}}},
"type": {"literal": "string"}}},
"argument": {"variable": "hydra.core.print.posix.regex.quantified"}}},
"argument": {"variable": "s"}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Render a sequence of quantified atoms by concatenation."}}}]}}}}}]}