diff --git a/index.html b/index.html new file mode 100644 index 000000000..98c62de42 --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ + + + + index + + + + + +
+
+

OCaml package documentation

+
    +
  1. stanc
  2. +
+
+
+ + \ No newline at end of file diff --git a/odoc.support/fonts/KaTeX_AMS-Regular.woff2 b/odoc.support/fonts/KaTeX_AMS-Regular.woff2 new file mode 100644 index 000000000..0acaaff03 Binary files /dev/null and b/odoc.support/fonts/KaTeX_AMS-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 b/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 new file mode 100644 index 000000000..f390922ec Binary files /dev/null and b/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 b/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 new file mode 100644 index 000000000..75344a1f9 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 b/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 new file mode 100644 index 000000000..395f28bea Binary files /dev/null and b/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 b/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 new file mode 100644 index 000000000..735f6948d Binary files /dev/null and b/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-Bold.woff2 b/odoc.support/fonts/KaTeX_Main-Bold.woff2 new file mode 100644 index 000000000..27be45161 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 b/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 new file mode 100644 index 000000000..5931794de Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-Italic.woff2 b/odoc.support/fonts/KaTeX_Main-Italic.woff2 new file mode 100644 index 000000000..b50920e13 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-Italic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-Regular.woff2 b/odoc.support/fonts/KaTeX_Main-Regular.woff2 new file mode 100644 index 000000000..eb24a7ba2 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 b/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 new file mode 100644 index 000000000..59e91172b Binary files /dev/null and b/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Math-Italic.woff2 b/odoc.support/fonts/KaTeX_Math-Italic.woff2 new file mode 100644 index 000000000..a0df10a52 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Math-Italic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 b/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 new file mode 100644 index 000000000..cfaa3bda5 Binary files /dev/null and b/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 b/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 new file mode 100644 index 000000000..349c06dc6 Binary files /dev/null and b/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 b/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 new file mode 100644 index 000000000..a90eea85f Binary files /dev/null and b/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Script-Regular.woff2 b/odoc.support/fonts/KaTeX_Script-Regular.woff2 new file mode 100644 index 000000000..b3048fc11 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Script-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size1-Regular.woff2 b/odoc.support/fonts/KaTeX_Size1-Regular.woff2 new file mode 100644 index 000000000..c5a8462fb Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size1-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size2-Regular.woff2 b/odoc.support/fonts/KaTeX_Size2-Regular.woff2 new file mode 100644 index 000000000..e1bccfe24 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size2-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size3-Regular.woff2 b/odoc.support/fonts/KaTeX_Size3-Regular.woff2 new file mode 100644 index 000000000..249a28662 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size3-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size4-Regular.woff2 b/odoc.support/fonts/KaTeX_Size4-Regular.woff2 new file mode 100644 index 000000000..680c13085 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size4-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 b/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 new file mode 100644 index 000000000..771f1af70 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 differ diff --git a/odoc.support/fonts/fira-mono-v14-latin-500.woff2 b/odoc.support/fonts/fira-mono-v14-latin-500.woff2 new file mode 100644 index 000000000..9d07a635a Binary files /dev/null and b/odoc.support/fonts/fira-mono-v14-latin-500.woff2 differ diff --git a/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 b/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 new file mode 100644 index 000000000..edc71a868 Binary files /dev/null and b/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-500.woff2 b/odoc.support/fonts/fira-sans-v17-latin-500.woff2 new file mode 100644 index 000000000..24bb8f45f Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-500.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 b/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 new file mode 100644 index 000000000..1a8b72dcd Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-700.woff2 b/odoc.support/fonts/fira-sans-v17-latin-700.woff2 new file mode 100644 index 000000000..40b8a1cfd Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-700.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 b/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 new file mode 100644 index 000000000..bdf8f5f98 Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 b/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 new file mode 100644 index 000000000..f4c80d3ec Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 b/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 new file mode 100644 index 000000000..4a6f782c8 Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 differ diff --git a/odoc.support/fonts/noticia-text-v15-latin-700.woff2 b/odoc.support/fonts/noticia-text-v15-latin-700.woff2 new file mode 100644 index 000000000..536fbe1d0 Binary files /dev/null and b/odoc.support/fonts/noticia-text-v15-latin-700.woff2 differ diff --git a/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 b/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 new file mode 100644 index 000000000..9b83b0712 Binary files /dev/null and b/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 differ diff --git a/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 b/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 new file mode 100644 index 000000000..efff29f9d Binary files /dev/null and b/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 differ diff --git a/odoc.support/highlight.pack.js b/odoc.support/highlight.pack.js new file mode 100644 index 000000000..7d1bcd04e --- /dev/null +++ b/odoc.support/highlight.pack.js @@ -0,0 +1,634 @@ +/*! + Highlight.js v11.7.0 (git: 82688fad18) + (c) 2006-2022 undefined and other contributors + License: BSD-3-Clause + */ +var hljs=function(){"use strict";var e={exports:{}};function t(e){ +return e instanceof Map?e.clear=e.delete=e.set=()=>{ +throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{ +throw Error("set is read-only") +}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((n=>{var i=e[n] +;"object"!=typeof i||Object.isFrozen(i)||t(i)})),e} +e.exports=t,e.exports.default=t;class n{constructor(e){ +void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} +ignoreMatch(){this.isMatchIgnored=!0}}function i(e){ +return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") +}function r(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] +;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n} +const s=e=>!!e.scope||e.sublanguage&&e.language;class o{constructor(e,t){ +this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ +this.buffer+=i(e)}openNode(e){if(!s(e))return;let t="" +;t=e.sublanguage?"language-"+e.language:((e,{prefix:t})=>{if(e.includes(".")){ +const n=e.split(".") +;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ") +}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)} +closeNode(e){s(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ +this.buffer+=``}}const a=(e={})=>{const t={children:[]} +;return Object.assign(t,e),t};class c{constructor(){ +this.rootNode=a(),this.stack=[this.rootNode]}get top(){ +return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ +this.top.children.push(e)}openNode(e){const t=a({scope:e}) +;this.add(t),this.stack.push(t)}closeNode(){ +if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ +for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} +walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ +return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), +t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ +"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ +c._collapse(e)})))}}class l extends c{constructor(e){super(),this.options=e} +addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} +addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root +;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){ +return new o(this,this.options).value()}finalize(){return!0}}function g(e){ +return e?"string"==typeof e?e:e.source:null}function d(e){return p("(?=",e,")")} +function u(e){return p("(?:",e,")*")}function h(e){return p("(?:",e,")?")} +function p(...e){return e.map((e=>g(e))).join("")}function f(...e){const t=(e=>{ +const t=e[e.length-1] +;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} +})(e);return"("+(t.capture?"":"?:")+e.map((e=>g(e))).join("|")+")"} +function b(e){return RegExp(e.toString()+"|").exec("").length-1} +const m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ +;function E(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n +;let i=g(e),r="";for(;i.length>0;){const e=m.exec(i);if(!e){r+=i;break} +r+=i.substring(0,e.index), +i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+t):(r+=e[0], +"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)} +const x="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",O="\\b(0b[01]+)",v={ +begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'", +illegal:"\\n",contains:[v]},k={scope:"string",begin:'"',end:'"',illegal:"\\n", +contains:[v]},M=(e,t,n={})=>{const i=r({scope:"comment",begin:e,end:t, +contains:[]},n);i.contains.push({scope:"doctag", +begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", +end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}) +;const s=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/) +;return i.contains.push({begin:p(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i +},S=M("//","$"),R=M("/\\*","\\*/"),j=M("#","$");var A=Object.freeze({ +__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:x,UNDERSCORE_IDENT_RE:w, +NUMBER_RE:y,C_NUMBER_RE:_,BINARY_NUMBER_RE:O, +RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", +SHEBANG:(e={})=>{const t=/^#![ ]*\// +;return e.binary&&(e.begin=p(t,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:t, +end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)}, +BACKSLASH_ESCAPE:v,APOS_STRING_MODE:N,QUOTE_STRING_MODE:k,PHRASAL_WORDS_MODE:{ +begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ +},COMMENT:M,C_LINE_COMMENT_MODE:S,C_BLOCK_COMMENT_MODE:R,HASH_COMMENT_MODE:j, +NUMBER_MODE:{scope:"number",begin:y,relevance:0},C_NUMBER_MODE:{scope:"number", +begin:_,relevance:0},BINARY_NUMBER_MODE:{scope:"number",begin:O,relevance:0}, +REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//, +end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0, +contains:[v]}]}]},TITLE_MODE:{scope:"title",begin:x,relevance:0}, +UNDERSCORE_TITLE_MODE:{scope:"title",begin:w,relevance:0},METHOD_GUARD:{ +begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ +"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ +t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function I(e,t){ +"."===e.input[e.index-1]&&t.ignoreMatch()}function T(e,t){ +void 0!==e.className&&(e.scope=e.className,delete e.className)}function L(e,t){ +t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", +e.__beforeBegin=I,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, +void 0===e.relevance&&(e.relevance=0))}function B(e,t){ +Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function D(e,t){ +if(e.match){ +if(e.begin||e.end)throw Error("begin & end are not supported with match") +;e.begin=e.match,delete e.match}}function H(e,t){ +void 0===e.relevance&&(e.relevance=1)}const P=(e,t)=>{if(!e.beforeMatch)return +;if(e.starts)throw Error("beforeMatch cannot be used with starts") +;const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t] +})),e.keywords=n.keywords,e.begin=p(n.beforeMatch,d(n.begin)),e.starts={ +relevance:0,contains:[Object.assign(n,{endsParent:!0})] +},e.relevance=0,delete n.beforeMatch +},C=["of","and","for","in","not","or","if","then","parent","list","value"] +;function $(e,t,n="keyword"){const i=Object.create(null) +;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{ +Object.assign(i,$(e[n],t,n))})),i;function r(e,n){ +t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|") +;i[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){ +return t?Number(t):(e=>C.includes(e.toLowerCase()))(e)?0:1}const z={},K=e=>{ +console.error(e)},W=(e,...t)=>{console.log("WARN: "+e,...t)},X=(e,t)=>{ +z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),z[`${e}/${t}`]=!0) +},G=Error();function Z(e,t,{key:n}){let i=0;const r=e[n],s={},o={} +;for(let e=1;e<=t.length;e++)o[e+i]=r[e],s[e+i]=!0,i+=b(t[e-1]) +;e[n]=o,e[n]._emit=s,e[n]._multi=!0}function F(e){(e=>{ +e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, +delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ +_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope +}),(e=>{if(Array.isArray(e.begin)){ +if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), +G +;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"), +G;Z(e,e.begin,{key:"beginScope"}),e.begin=E(e.begin,{joinWith:""})}})(e),(e=>{ +if(Array.isArray(e.end)){ +if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"), +G +;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"), +G;Z(e,e.end,{key:"endScope"}),e.end=E(e.end,{joinWith:""})}})(e)}function V(e){ +function t(t,n){ +return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":"")) +}class n{constructor(){ +this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} +addRule(e,t){ +t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), +this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null) +;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(E(e,{joinWith:"|" +}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex +;const t=this.matcherRe.exec(e);if(!t)return null +;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n] +;return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){ +this.rules=[],this.multiRegexes=[], +this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ +if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n +;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), +t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ +return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ +this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ +const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex +;let n=t.exec(e) +;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ +const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} +return n&&(this.regexIndex+=n.position+1, +this.regexIndex===this.count&&this.considerAll()),n}} +if(e.compilerExtensions||(e.compilerExtensions=[]), +e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") +;return e.classNameAliases=r(e.classNameAliases||{}),function n(s,o){const a=s +;if(s.isCompiled)return a +;[T,D,F,P].forEach((e=>e(s,o))),e.compilerExtensions.forEach((e=>e(s,o))), +s.__beforeBegin=null,[L,B,H].forEach((e=>e(s,o))),s.isCompiled=!0;let c=null +;return"object"==typeof s.keywords&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords), +c=s.keywords.$pattern, +delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=$(s.keywords,e.case_insensitive)), +a.keywordPatternRe=t(c,!0), +o&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),s.end||s.endsWithParent||(s.end=/\B|\b/), +s.end&&(a.endRe=t(a.end)), +a.terminatorEnd=g(a.end)||"",s.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)), +s.illegal&&(a.illegalRe=t(s.illegal)), +s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>r(e,{ +variants:null},t)))),e.cachedVariants?e.cachedVariants:q(e)?r(e,{ +starts:e.starts?r(e.starts):null +}):Object.isFrozen(e)?r(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{n(e,a) +})),s.starts&&n(s.starts,o),a.matcher=(e=>{const t=new i +;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" +}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" +}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function q(e){ +return!!e&&(e.endsWithParent||q(e.starts))}class J extends Error{ +constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}} +const Y=i,Q=r,ee=Symbol("nomatch");var te=(t=>{ +const i=Object.create(null),r=Object.create(null),s=[];let o=!0 +;const a="Could not find the language '{}', did you forget to load/include a language module?",c={ +disableAutodetect:!0,name:"Plain text",contains:[]};let g={ +ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i, +languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", +cssSelector:"pre code",languages:null,__emitter:l};function b(e){ +return g.noHighlightRe.test(e)}function m(e,t,n){let i="",r="" +;"object"==typeof t?(i=e, +n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."), +X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), +r=e,i=t),void 0===n&&(n=!0);const s={code:i,language:r};k("before:highlight",s) +;const o=s.result?s.result:E(s.language,s.code,n) +;return o.code=s.code,k("after:highlight",o),o}function E(e,t,r,s){ +const c=Object.create(null);function l(){if(!N.keywords)return void M.addText(S) +;let e=0;N.keywordPatternRe.lastIndex=0;let t=N.keywordPatternRe.exec(S),n="" +;for(;t;){n+=S.substring(e,t.index) +;const r=y.case_insensitive?t[0].toLowerCase():t[0],s=(i=r,N.keywords[i]);if(s){ +const[e,i]=s +;if(M.addText(n),n="",c[r]=(c[r]||0)+1,c[r]<=7&&(R+=i),e.startsWith("_"))n+=t[0];else{ +const n=y.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0] +;e=N.keywordPatternRe.lastIndex,t=N.keywordPatternRe.exec(S)}var i +;n+=S.substring(e),M.addText(n)}function d(){null!=N.subLanguage?(()=>{ +if(""===S)return;let e=null;if("string"==typeof N.subLanguage){ +if(!i[N.subLanguage])return void M.addText(S) +;e=E(N.subLanguage,S,!0,k[N.subLanguage]),k[N.subLanguage]=e._top +}else e=x(S,N.subLanguage.length?N.subLanguage:null) +;N.relevance>0&&(R+=e.relevance),M.addSublanguage(e._emitter,e.language) +})():l(),S=""}function u(e,t){let n=1;const i=t.length-1;for(;n<=i;){ +if(!e._emit[n]){n++;continue}const i=y.classNameAliases[e[n]]||e[n],r=t[n] +;i?M.addKeyword(r,i):(S=r,l(),S=""),n++}}function h(e,t){ +return e.scope&&"string"==typeof e.scope&&M.openNode(y.classNameAliases[e.scope]||e.scope), +e.beginScope&&(e.beginScope._wrap?(M.addKeyword(S,y.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap), +S=""):e.beginScope._multi&&(u(e.beginScope,t),S="")),N=Object.create(e,{parent:{ +value:N}}),N}function p(e,t,i){let r=((e,t)=>{const n=e&&e.exec(t) +;return n&&0===n.index})(e.endRe,i);if(r){if(e["on:end"]){const i=new n(e) +;e["on:end"](t,i),i.isMatchIgnored&&(r=!1)}if(r){ +for(;e.endsParent&&e.parent;)e=e.parent;return e}} +if(e.endsWithParent)return p(e.parent,t,i)}function f(e){ +return 0===N.matcher.regexIndex?(S+=e[0],1):(I=!0,0)}function b(e){ +const n=e[0],i=t.substring(e.index),r=p(N,e,i);if(!r)return ee;const s=N +;N.endScope&&N.endScope._wrap?(d(), +M.addKeyword(n,N.endScope._wrap)):N.endScope&&N.endScope._multi?(d(), +u(N.endScope,e)):s.skip?S+=n:(s.returnEnd||s.excludeEnd||(S+=n), +d(),s.excludeEnd&&(S=n));do{ +N.scope&&M.closeNode(),N.skip||N.subLanguage||(R+=N.relevance),N=N.parent +}while(N!==r.parent);return r.starts&&h(r.starts,e),s.returnEnd?0:n.length} +let m={};function w(i,s){const a=s&&s[0];if(S+=i,null==a)return d(),0 +;if("begin"===m.type&&"end"===s.type&&m.index===s.index&&""===a){ +if(S+=t.slice(s.index,s.index+1),!o){const t=Error(`0 width match regex (${e})`) +;throw t.languageName=e,t.badRule=m.rule,t}return 1} +if(m=s,"begin"===s.type)return(e=>{ +const t=e[0],i=e.rule,r=new n(i),s=[i.__beforeBegin,i["on:begin"]] +;for(const n of s)if(n&&(n(e,r),r.isMatchIgnored))return f(t) +;return i.skip?S+=t:(i.excludeBegin&&(S+=t), +d(),i.returnBegin||i.excludeBegin||(S=t)),h(i,e),i.returnBegin?0:t.length})(s) +;if("illegal"===s.type&&!r){ +const e=Error('Illegal lexeme "'+a+'" for mode "'+(N.scope||"")+'"') +;throw e.mode=N,e}if("end"===s.type){const e=b(s);if(e!==ee)return e} +if("illegal"===s.type&&""===a)return 1 +;if(A>1e5&&A>3*s.index)throw Error("potential infinite loop, way more iterations than matches") +;return S+=a,a.length}const y=O(e) +;if(!y)throw K(a.replace("{}",e)),Error('Unknown language: "'+e+'"') +;const _=V(y);let v="",N=s||_;const k={},M=new g.__emitter(g);(()=>{const e=[] +;for(let t=N;t!==y;t=t.parent)t.scope&&e.unshift(t.scope) +;e.forEach((e=>M.openNode(e)))})();let S="",R=0,j=0,A=0,I=!1;try{ +for(N.matcher.considerAll();;){ +A++,I?I=!1:N.matcher.considerAll(),N.matcher.lastIndex=j +;const e=N.matcher.exec(t);if(!e)break;const n=w(t.substring(j,e.index),e) +;j=e.index+n} +return w(t.substring(j)),M.closeAllNodes(),M.finalize(),v=M.toHTML(),{ +language:e,value:v,relevance:R,illegal:!1,_emitter:M,_top:N}}catch(n){ +if(n.message&&n.message.includes("Illegal"))return{language:e,value:Y(t), +illegal:!0,relevance:0,_illegalBy:{message:n.message,index:j, +context:t.slice(j-100,j+100),mode:n.mode,resultSoFar:v},_emitter:M};if(o)return{ +language:e,value:Y(t),illegal:!1,relevance:0,errorRaised:n,_emitter:M,_top:N} +;throw n}}function x(e,t){t=t||g.languages||Object.keys(i);const n=(e=>{ +const t={value:Y(e),illegal:!1,relevance:0,_top:c,_emitter:new g.__emitter(g)} +;return t._emitter.addText(e),t})(e),r=t.filter(O).filter(N).map((t=>E(t,e,!1))) +;r.unshift(n);const s=r.sort(((e,t)=>{ +if(e.relevance!==t.relevance)return t.relevance-e.relevance +;if(e.language&&t.language){if(O(e.language).supersetOf===t.language)return 1 +;if(O(t.language).supersetOf===e.language)return-1}return 0})),[o,a]=s,l=o +;return l.secondBest=a,l}function w(e){let t=null;const n=(e=>{ +let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"" +;const n=g.languageDetectRe.exec(t);if(n){const t=O(n[1]) +;return t||(W(a.replace("{}",n[1])), +W("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"} +return t.split(/\s+/).find((e=>b(e)||O(e)))})(e);if(b(n))return +;if(k("before:highlightElement",{el:e,language:n +}),e.children.length>0&&(g.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), +console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), +console.warn("The element with unescaped HTML:"), +console.warn(e)),g.throwUnescapedHTML))throw new J("One of your code blocks includes unescaped HTML.",e.innerHTML) +;t=e;const i=t.textContent,s=n?m(i,{language:n,ignoreIllegals:!0}):x(i) +;e.innerHTML=s.value,((e,t,n)=>{const i=t&&r[t]||n +;e.classList.add("hljs"),e.classList.add("language-"+i) +})(e,n,s.language),e.result={language:s.language,re:s.relevance, +relevance:s.relevance},s.secondBest&&(e.secondBest={ +language:s.secondBest.language,relevance:s.secondBest.relevance +}),k("after:highlightElement",{el:e,result:s,text:i})}let y=!1;function _(){ +"loading"!==document.readyState?document.querySelectorAll(g.cssSelector).forEach(w):y=!0 +}function O(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]} +function v(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ +r[e.toLowerCase()]=t}))}function N(e){const t=O(e) +;return t&&!t.disableAutodetect}function k(e,t){const n=e;s.forEach((e=>{ +e[n]&&e[n](t)}))} +"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ +y&&_()}),!1),Object.assign(t,{highlight:m,highlightAuto:x,highlightAll:_, +highlightElement:w, +highlightBlock:e=>(X("10.7.0","highlightBlock will be removed entirely in v12.0"), +X("10.7.0","Please use highlightElement now."),w(e)),configure:e=>{g=Q(g,e)}, +initHighlighting:()=>{ +_(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")}, +initHighlightingOnLoad:()=>{ +_(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.") +},registerLanguage:(e,n)=>{let r=null;try{r=n(t)}catch(t){ +if(K("Language definition for '{}' could not be registered.".replace("{}",e)), +!o)throw t;K(t),r=c} +r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&v(r.aliases,{ +languageName:e})},unregisterLanguage:e=>{delete i[e] +;for(const t of Object.keys(r))r[t]===e&&delete r[t]}, +listLanguages:()=>Object.keys(i),getLanguage:O,registerAliases:v, +autoDetection:N,inherit:Q,addPlugin:e=>{(e=>{ +e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{ +e["before:highlightBlock"](Object.assign({block:t.el},t)) +}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{ +e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)} +}),t.debugMode=()=>{o=!1},t.safeMode=()=>{o=!0 +},t.versionString="11.7.0",t.regex={concat:p,lookahead:d,either:f,optional:h, +anyNumberOfTimes:u};for(const t in A)"object"==typeof A[t]&&e.exports(A[t]) +;return Object.assign(t,A),t})({});return te}() +;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `reasonml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n="~?[a-z$_][0-9a-zA-Z$_]*",a="`?[A-Z$_][0-9a-zA-Z$_]*",s="("+["||","++","**","+.","*","/","*.","/.","..."].map((e=>e.split("").map((e=>"\\"+e)).join(""))).join("|")+"|\\|>|&&|==|===)",i="\\s+"+s+"\\s+",r={ +keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ", +literal:"true false" +},l="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",t={ +className:"number",relevance:0,variants:[{begin:l},{begin:"\\(-"+l+"\\)"}]},c={ +className:"operator",relevance:0,begin:s},o=[{className:"identifier", +relevance:0,begin:n},c,t],g=[e.QUOTE_STRING_MODE,c,{className:"module", +begin:"\\b"+a,returnBegin:!0,relevance:0,end:".",contains:[{ +className:"identifier",begin:a,relevance:0}]}],b=[{className:"module", +begin:"\\b"+a,returnBegin:!0,end:".",relevance:0,contains:[{ +className:"identifier",begin:a,relevance:0}]}],m={className:"function", +relevance:0,keywords:r,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+n+")\\s*=>", +end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params", +variants:[{begin:n},{ +begin:"~?[a-z$_][0-9a-zA-Z$_]*(\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*('?[a-z$_][0-9a-z$_]*\\s*(,'?[a-z$_][0-9a-z$_]*\\s*)*)?\\))?){0,2}" +},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>", +returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{ +begin:n,end:"(,|\\n|\\))",relevance:0,contains:[c,{className:"typing",begin:":", +end:"(,|\\n)",returnBegin:!0,relevance:0,contains:b}]}]}]},{ +begin:"\\(\\.\\s"+n+"\\)\\s*=>"}]};g.push(m);const d={className:"constructor", +begin:a+"\\(",end:"\\)",illegal:"\\n",keywords:r, +contains:[e.QUOTE_STRING_MODE,c,{className:"params",begin:"\\b"+n}]},u={ +className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:r,end:"=>", +relevance:0,contains:[d,c,{relevance:0,className:"constructor",begin:a}]},v={ +className:"module-access",keywords:r,returnBegin:!0,variants:[{ +begin:"\\b("+a+"\\.)+"+n},{begin:"\\b("+a+"\\.)+\\(",end:"\\)",returnBegin:!0, +contains:[m,{begin:"\\(",end:"\\)",relevance:0,skip:!0}].concat(g)},{ +begin:"\\b("+a+"\\.)+\\{",end:/\}/}],contains:g};return b.push(v),{ +name:"ReasonML",aliases:["re"],keywords:r,illegal:"(:-|:=|\\$\\{|\\+=)", +contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{ +className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0 +},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{ +className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:o},{ +className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:o},d,{ +className:"operator",begin:i,illegal:"--\x3e",relevance:0 +},t,e.C_LINE_COMMENT_MODE,u,m,{className:"module-def", +begin:"\\bmodule\\s+"+n+"\\s+"+a+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0, +keywords:r,relevance:0,contains:[{className:"module",relevance:0,begin:a},{ +begin:/\{/,end:/\}/,relevance:0,skip:!0}].concat(g)},v]}}})() +;hljs.registerLanguage("reasonml",e)})();/*! `javascript` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s) +;return o=>{const l=o.regex,b=e,d={begin:/<[A-Za-z0-9\\._:-]+/, +end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ +const a=e[0].length+e.index,t=e.input[a] +;if("<"===t||","===t)return void n.ignoreMatch();let s +;">"===t&&(((e,{after:n})=>{const a="",M={ +match:[/const|var|let/,/\s+/,b,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(C)], +keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]} +;return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{ +PARAMS_CONTAINS:p,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/, +contains:[o.SHEBANG({label:"shebang",binary:"node",relevance:5}),{ +label:"use_strict",className:"meta",relevance:10, +begin:/^\s*['"]use (strict|asm)['"]/ +},o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,y,N,_,h,{match:/\$\d+/},E,R,{ +className:"attr",begin:b+l.lookahead(":"),relevance:0},M,{ +begin:"("+o.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", +keywords:"return throw case",relevance:0,contains:[h,o.REGEXP_MODE,{ +className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ +className:"params",variants:[{begin:o.UNDERSCORE_IDENT_RE,relevance:0},{ +className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, +excludeEnd:!0,keywords:g,contains:p}]}]},{begin:/,/,relevance:0},{match:/\s+/, +relevance:0},{variants:[{begin:"<>",end:""},{ +match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin, +"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{ +begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},O,{ +beginKeywords:"while if switch catch for"},{ +begin:"\\b(?!function)"+o.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,label:"func.def",contains:[S,o.inherit(o.TITLE_MODE,{begin:b, +className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+b, +relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, +contains:[S]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, +className:"variable.constant"},w,T,{match:/\$[(.]/}]}}})() +;hljs.registerLanguage("javascript",e)})();/*! `sql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const r=e.regex,t=e.COMMENT("--","$"),n=["true","false","unknown"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],i=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],o=i,c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!i.includes(e))),l={ +begin:r.concat(/\b/,r.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}} +;return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ +$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:r,when:t}={})=>{const n=t +;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) +})(c,{when:e=>e.length<3}),literal:n,type:a, +built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] +},contains:[{begin:r.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/, +keyword:c.concat(s),literal:n,type:a}},{className:"type", +begin:r.either("double precision","large object","with timezone","without timezone") +},l,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ +begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ +begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"operator", +begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})() +;hljs.registerLanguage("sql",e)})();/*! `bash` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const s=e.regex,t={},n={begin:/\$\{/, +end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{ +className:"variable",variants:[{ +begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={ +className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={ +begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/, +end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(c);const o={begin:/\$?\(\(/, +end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t] +},r=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 +}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, +contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ +name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/, +keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"], +literal:["true","false"], +built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"] +},contains:[r,e.SHEBANG(),l,o,e.HASH_COMMENT_MODE,i,{match:/(\/[a-z._-]+)+/},c,{ +className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},t]}}})() +;hljs.registerLanguage("bash",e)})();/*! `shell` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var s=(()=>{"use strict";return s=>({name:"Shell Session", +aliases:["console","shellsession"],contains:[{className:"meta.prompt", +begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/, +subLanguage:"bash"}}]})})();hljs.registerLanguage("shell",s)})();/*! `plaintext` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var t=(()=>{"use strict";return t=>({name:"Plain text", +aliases:["text","txt"],disableAutodetect:!0})})() +;hljs.registerLanguage("plaintext",t)})();/*! `graphql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=e.regex;return{name:"GraphQL", +aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{ +keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"], +literal:["true","false","null"]}, +contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ +scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation", +begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/, +end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{ +scope:"symbol",begin:a.concat(/[_A-Za-z][_0-9A-Za-z]*/,a.lookahead(/\s*:/)), +relevance:0}],illegal:[/[;<']/,/BEGIN/]}}})();hljs.registerLanguage("graphql",e) +})();/*! `ocaml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>({name:"OCaml",aliases:["ml"], +keywords:{$pattern:"[a-z_]\\w*!?", +keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref", +literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal", +begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{ +contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{ +className:"type",begin:"`[A-Z][\\w']*"},{className:"type", +begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0 +},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0 +}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", +begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", +relevance:0},{begin:/->/}]})})();hljs.registerLanguage("ocaml",e)})();/*! `json` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=["true","false","null"],n={ +scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",keywords:{ +literal:a},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/, +relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0 +},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE], +illegal:"\\S"}}})();hljs.registerLanguage("json",e)})();/*! `python` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={ +$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i, +built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], +literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], +type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] +},t={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/, +end:/\}/,keywords:s,illegal:/#/},l={begin:/\{\{/,relevance:0},b={ +className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, +end:/"""/,contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([uU]|[rR])'/,end:/'/, +relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ +begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, +end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, +contains:[e.BACKSLASH_ESCAPE,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,l,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},o="[0-9](_?[0-9])*",c=`(\\b(${o}))?\\.(${o})|\\b(${o})\\.`,d="\\b|"+i.join("|"),g={ +className:"number",relevance:0,variants:[{ +begin:`(\\b(${o})|(${c}))[eE][+-]?(${o})[jJ]?(?=${d})`},{begin:`(${c})[jJ]?`},{ +begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{ +begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})` +},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${o})[jJ](?=${d})` +}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:s, +contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ +className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, +end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s, +contains:["self",t,g,b,e.HASH_COMMENT_MODE]}]};return r.contains=[b,g,t],{ +name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s, +illegal:/(<\/|->|\?)|=>/,contains:[t,g,{begin:/\bself\b/},{beginKeywords:"if", +relevance:0},b,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{ +1:"keyword",3:"title.function"},contains:[m]},{variants:[{ +match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}], +scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ +className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,b]}]}}})() +;hljs.registerLanguage("python",e)})();/*! `xml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const a=e.regex,n=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s={ +className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},t={begin:/\s/, +contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] +},i=e.inherit(t,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{ +className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),r={ +endsWithParent:!0,illegal:/`]+/}]}]}]};return{ +name:"HTML, XML", +aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], +case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[t,l,c,i,{begin:/\[/,end:/\]/,contains:[{ +className:"meta",begin://,contains:[t,i,l,c]}]}] +},e.COMMENT(//,{relevance:10}),{begin://, +relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/, +relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"style"},contains:[r],starts:{ +end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"script"},contains:[r],starts:{ +end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ +className:"tag",begin:/<>|<\/>/},{className:"tag", +begin:a.concat(//,/>/,/\s/)))), +end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:r}]},{ +className:"tag",begin:a.concat(/<\//,a.lookahead(a.concat(n,/>/))),contains:[{ +className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}} +})();hljs.registerLanguage("xml",e)})();/*! `markdown` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const n={begin:/<\/?[A-Za-z_]/, +end:">",subLanguage:"xml",relevance:0},a={variants:[{begin:/\[.+?\]\[.*?\]/, +relevance:0},{ +begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, +relevance:2},{ +begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), +relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ +begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/ +},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, +returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", +excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", +end:"\\]",excludeBegin:!0,excludeEnd:!0}]},i={className:"strong",contains:[], +variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}] +},s={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{ +begin:/_(?![_\s])/,end:/_/,relevance:0}]},c=e.inherit(i,{contains:[] +}),t=e.inherit(s,{contains:[]});i.contains.push(t),s.contains.push(c) +;let g=[n,a];return[i,s,c,t].forEach((e=>{e.contains=e.contains.concat(g) +})),g=g.concat(i,s),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ +className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{ +begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", +contains:g}]}]},n,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", +end:"\\s+",excludeEnd:!0},i,s,{className:"quote",begin:"^>\\s+",contains:g, +end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ +begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ +begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", +contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ +begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ +className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ +className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})() +;hljs.registerLanguage("markdown",e)})();/*! `c` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const n=e.regex,t=e.COMMENT("//","$",{ +contains:[{begin:/\\\n/}] +}),s="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+n.optional(s)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",r={ +className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{ +match:/\batomic_[a-z]{3,6}\b/}]},i={className:"string",variants:[{ +begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},o={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},e.inherit(i,{className:"string"}),{ +className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},c={ +className:"title",begin:n.optional(s)+e.IDENT_RE,relevance:0 +},d=n.optional(s)+e.IDENT_RE+"\\s*\\(",u={ +keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"], +type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"], +literal:"true false NULL", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" +},g=[o,r,t,e.C_BLOCK_COMMENT_MODE,l,i],m={variants:[{begin:/=/,end:/;/},{ +begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], +keywords:u,contains:g.concat([{begin:/\(/,end:/\)/,keywords:u, +contains:g.concat(["self"]),relevance:0}]),relevance:0},p={ +begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, +keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)", +keywords:u,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(c,{ +className:"title.function"})],relevance:0},{relevance:0,match:/,/},{ +className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:[t,e.C_BLOCK_COMMENT_MODE,i,l,r,{begin:/\(/,end:/\)/,keywords:u, +relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,l,r]}] +},r,t,e.C_BLOCK_COMMENT_MODE,o]};return{name:"C",aliases:["h"],keywords:u, +disableAutodetect:!0,illegal:"=]/,contains:[{ +beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:o, +strings:i,keywords:u}}}})();hljs.registerLanguage("c",e)})(); diff --git a/odoc.support/katex.min.css b/odoc.support/katex.min.css new file mode 100644 index 000000000..5f1f85765 --- /dev/null +++ b/odoc.support/katex.min.css @@ -0,0 +1 @@ +@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2")}.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.15.2"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/odoc.support/katex.min.js b/odoc.support/katex.min.js new file mode 100644 index 000000000..e4d78f243 --- /dev/null +++ b/odoc.support/katex.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Zn}});var r=function e(t,r){this.position=void 0;var n,a="KaTeX parse error: "+t,i=r&&r.loc;if(i&&i.start<=i.end){var o=i.lexer.input;n=i.start;var s=i.end;n===o.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=o.slice(n,s).replace(/[^]/g,"$&\u0332");a+=(n>15?"\u2026"+o.slice(n-15,n):o.slice(0,n))+l+(s+15":">","<":"<",'"':""","'":"'"},o=/[&><"']/g;var s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(o,(function(e){return i[e]}))},hyphenate:function(e){return e.replace(a,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand ",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function m(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var c=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},h)if(h.hasOwnProperty(t)){var r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:m(r)}}var t=e.prototype;return t.reportNonstrict=function(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=l.protocolFromUrl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),u=function(){function e(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}var t=e.prototype;return t.sup=function(){return p[d[this.id]]},t.sub=function(){return p[f[this.id]]},t.fracNum=function(){return p[g[this.id]]},t.fracDen=function(){return p[v[this.id]]},t.cramp=function(){return p[b[this.id]]},t.text=function(){return p[y[this.id]]},t.isTight=function(){return this.size>=2},e}(),p=[new u(0,0,!1),new u(1,0,!0),new u(2,1,!1),new u(3,1,!0),new u(4,2,!1),new u(5,2,!0),new u(6,3,!1),new u(7,3,!0)],d=[4,5,4,5,6,7,6,7],f=[5,5,5,5,7,7,7,7],g=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],b=[1,1,3,3,5,5,7,7],y=[0,1,2,3,2,3,2,3],x={DISPLAY:p[0],TEXT:p[2],SCRIPT:p[4],SCRIPTSCRIPT:p[6]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var k=[];function S(e){for(var t=0;t=k[t]&&e<=k[t+1])return!0;return!1}w.forEach((function(e){return e.blocks.forEach((function(e){return k.push.apply(k,e)}))}));var M=80,z={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},A=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t=5?0:e>=3?1:2]){var r=N[t]={cssEmPerMu:B.quad[t]/18};for(var n in B)B.hasOwnProperty(n)&&(r[n]=B[n][t])}return N[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();H.BASESIZE=6;var E=H,L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},P=function(e){return"string"!=typeof e&&(e=e.unit),e in L||e in D||"ex"===e},F=function(e,t){var r;if(e.unit in L)r=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},V=function(e){return+e.toFixed(4)+"em"},G=function(e){return e.filter((function(e){return e})).join(" ")},U=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},Y=function(e){var t=document.createElement(e);for(var r in t.className=G(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var a=0;a"},W=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,e,r,n),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"span")},t.toMarkup=function(){return X.call(this,"span")},e}(),_=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"a")},t.toMarkup=function(){return X.call(this,"a")},e}(),j=function(){function e(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e=""+this.alt+"=a[0]&&e<=a[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=$[this.text])}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=V(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=G(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');var a=l.escape(this.text);return e?(t+=">",t+=a,t+=""):a},e}(),K=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r":""},e}(),Q=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="","\\gt",!0),ie(oe,le,be,"\u2208","\\in",!0),ie(oe,le,be,"\ue020","\\@not"),ie(oe,le,be,"\u2282","\\subset",!0),ie(oe,le,be,"\u2283","\\supset",!0),ie(oe,le,be,"\u2286","\\subseteq",!0),ie(oe,le,be,"\u2287","\\supseteq",!0),ie(oe,he,be,"\u2288","\\nsubseteq",!0),ie(oe,he,be,"\u2289","\\nsupseteq",!0),ie(oe,le,be,"\u22a8","\\models"),ie(oe,le,be,"\u2190","\\leftarrow",!0),ie(oe,le,be,"\u2264","\\le"),ie(oe,le,be,"\u2264","\\leq",!0),ie(oe,le,be,"<","\\lt",!0),ie(oe,le,be,"\u2192","\\rightarrow",!0),ie(oe,le,be,"\u2192","\\to"),ie(oe,he,be,"\u2271","\\ngeq",!0),ie(oe,he,be,"\u2270","\\nleq",!0),ie(oe,le,ye,"\xa0","\\ "),ie(oe,le,ye,"\xa0","\\space"),ie(oe,le,ye,"\xa0","\\nobreakspace"),ie(se,le,ye,"\xa0","\\ "),ie(se,le,ye,"\xa0"," "),ie(se,le,ye,"\xa0","\\space"),ie(se,le,ye,"\xa0","\\nobreakspace"),ie(oe,le,ye,null,"\\nobreak"),ie(oe,le,ye,null,"\\allowbreak"),ie(oe,le,ve,",",","),ie(oe,le,ve,";",";"),ie(oe,he,ce,"\u22bc","\\barwedge",!0),ie(oe,he,ce,"\u22bb","\\veebar",!0),ie(oe,le,ce,"\u2299","\\odot",!0),ie(oe,le,ce,"\u2295","\\oplus",!0),ie(oe,le,ce,"\u2297","\\otimes",!0),ie(oe,le,xe,"\u2202","\\partial",!0),ie(oe,le,ce,"\u2298","\\oslash",!0),ie(oe,he,ce,"\u229a","\\circledcirc",!0),ie(oe,he,ce,"\u22a1","\\boxdot",!0),ie(oe,le,ce,"\u25b3","\\bigtriangleup"),ie(oe,le,ce,"\u25bd","\\bigtriangledown"),ie(oe,le,ce,"\u2020","\\dagger"),ie(oe,le,ce,"\u22c4","\\diamond"),ie(oe,le,ce,"\u22c6","\\star"),ie(oe,le,ce,"\u25c3","\\triangleleft"),ie(oe,le,ce,"\u25b9","\\triangleright"),ie(oe,le,ge,"{","\\{"),ie(se,le,xe,"{","\\{"),ie(se,le,xe,"{","\\textbraceleft"),ie(oe,le,ue,"}","\\}"),ie(se,le,xe,"}","\\}"),ie(se,le,xe,"}","\\textbraceright"),ie(oe,le,ge,"{","\\lbrace"),ie(oe,le,ue,"}","\\rbrace"),ie(oe,le,ge,"[","\\lbrack",!0),ie(se,le,xe,"[","\\lbrack",!0),ie(oe,le,ue,"]","\\rbrack",!0),ie(se,le,xe,"]","\\rbrack",!0),ie(oe,le,ge,"(","\\lparen",!0),ie(oe,le,ue,")","\\rparen",!0),ie(se,le,xe,"<","\\textless",!0),ie(se,le,xe,">","\\textgreater",!0),ie(oe,le,ge,"\u230a","\\lfloor",!0),ie(oe,le,ue,"\u230b","\\rfloor",!0),ie(oe,le,ge,"\u2308","\\lceil",!0),ie(oe,le,ue,"\u2309","\\rceil",!0),ie(oe,le,xe,"\\","\\backslash"),ie(oe,le,xe,"\u2223","|"),ie(oe,le,xe,"\u2223","\\vert"),ie(se,le,xe,"|","\\textbar",!0),ie(oe,le,xe,"\u2225","\\|"),ie(oe,le,xe,"\u2225","\\Vert"),ie(se,le,xe,"\u2225","\\textbardbl"),ie(se,le,xe,"~","\\textasciitilde"),ie(se,le,xe,"\\","\\textbackslash"),ie(se,le,xe,"^","\\textasciicircum"),ie(oe,le,be,"\u2191","\\uparrow",!0),ie(oe,le,be,"\u21d1","\\Uparrow",!0),ie(oe,le,be,"\u2193","\\downarrow",!0),ie(oe,le,be,"\u21d3","\\Downarrow",!0),ie(oe,le,be,"\u2195","\\updownarrow",!0),ie(oe,le,be,"\u21d5","\\Updownarrow",!0),ie(oe,le,fe,"\u2210","\\coprod"),ie(oe,le,fe,"\u22c1","\\bigvee"),ie(oe,le,fe,"\u22c0","\\bigwedge"),ie(oe,le,fe,"\u2a04","\\biguplus"),ie(oe,le,fe,"\u22c2","\\bigcap"),ie(oe,le,fe,"\u22c3","\\bigcup"),ie(oe,le,fe,"\u222b","\\int"),ie(oe,le,fe,"\u222b","\\intop"),ie(oe,le,fe,"\u222c","\\iint"),ie(oe,le,fe,"\u222d","\\iiint"),ie(oe,le,fe,"\u220f","\\prod"),ie(oe,le,fe,"\u2211","\\sum"),ie(oe,le,fe,"\u2a02","\\bigotimes"),ie(oe,le,fe,"\u2a01","\\bigoplus"),ie(oe,le,fe,"\u2a00","\\bigodot"),ie(oe,le,fe,"\u222e","\\oint"),ie(oe,le,fe,"\u222f","\\oiint"),ie(oe,le,fe,"\u2230","\\oiiint"),ie(oe,le,fe,"\u2a06","\\bigsqcup"),ie(oe,le,fe,"\u222b","\\smallint"),ie(se,le,pe,"\u2026","\\textellipsis"),ie(oe,le,pe,"\u2026","\\mathellipsis"),ie(se,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u22ef","\\@cdots",!0),ie(oe,le,pe,"\u22f1","\\ddots",!0),ie(oe,le,xe,"\u22ee","\\varvdots"),ie(oe,le,me,"\u02ca","\\acute"),ie(oe,le,me,"\u02cb","\\grave"),ie(oe,le,me,"\xa8","\\ddot"),ie(oe,le,me,"~","\\tilde"),ie(oe,le,me,"\u02c9","\\bar"),ie(oe,le,me,"\u02d8","\\breve"),ie(oe,le,me,"\u02c7","\\check"),ie(oe,le,me,"^","\\hat"),ie(oe,le,me,"\u20d7","\\vec"),ie(oe,le,me,"\u02d9","\\dot"),ie(oe,le,me,"\u02da","\\mathring"),ie(oe,le,de,"\ue131","\\@imath"),ie(oe,le,de,"\ue237","\\@jmath"),ie(oe,le,xe,"\u0131","\u0131"),ie(oe,le,xe,"\u0237","\u0237"),ie(se,le,xe,"\u0131","\\i",!0),ie(se,le,xe,"\u0237","\\j",!0),ie(se,le,xe,"\xdf","\\ss",!0),ie(se,le,xe,"\xe6","\\ae",!0),ie(se,le,xe,"\u0153","\\oe",!0),ie(se,le,xe,"\xf8","\\o",!0),ie(se,le,xe,"\xc6","\\AE",!0),ie(se,le,xe,"\u0152","\\OE",!0),ie(se,le,xe,"\xd8","\\O",!0),ie(se,le,me,"\u02ca","\\'"),ie(se,le,me,"\u02cb","\\`"),ie(se,le,me,"\u02c6","\\^"),ie(se,le,me,"\u02dc","\\~"),ie(se,le,me,"\u02c9","\\="),ie(se,le,me,"\u02d8","\\u"),ie(se,le,me,"\u02d9","\\."),ie(se,le,me,"\xb8","\\c"),ie(se,le,me,"\u02da","\\r"),ie(se,le,me,"\u02c7","\\v"),ie(se,le,me,"\xa8",'\\"'),ie(se,le,me,"\u02dd","\\H"),ie(se,le,me,"\u25ef","\\textcircled");var we={"--":!0,"---":!0,"``":!0,"''":!0};ie(se,le,xe,"\u2013","--",!0),ie(se,le,xe,"\u2013","\\textendash"),ie(se,le,xe,"\u2014","---",!0),ie(se,le,xe,"\u2014","\\textemdash"),ie(se,le,xe,"\u2018","`",!0),ie(se,le,xe,"\u2018","\\textquoteleft"),ie(se,le,xe,"\u2019","'",!0),ie(se,le,xe,"\u2019","\\textquoteright"),ie(se,le,xe,"\u201c","``",!0),ie(se,le,xe,"\u201c","\\textquotedblleft"),ie(se,le,xe,"\u201d","''",!0),ie(se,le,xe,"\u201d","\\textquotedblright"),ie(oe,le,xe,"\xb0","\\degree",!0),ie(se,le,xe,"\xb0","\\degree"),ie(se,le,xe,"\xb0","\\textdegree",!0),ie(oe,le,xe,"\xa3","\\pounds"),ie(oe,le,xe,"\xa3","\\mathsterling",!0),ie(se,le,xe,"\xa3","\\pounds"),ie(se,le,xe,"\xa3","\\textsterling",!0),ie(oe,he,xe,"\u2720","\\maltese"),ie(se,he,xe,"\u2720","\\maltese");for(var ke='0123456789/@."',Se=0;Set&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>n&&(n=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},Xe=function(e,t,r,n){var a=new W(e,t,r,n);return Ye(a),a},We=function(e,t,r,n){return new W(e,t,r,n)},_e=function(e){var t=new A(e);return Ye(t),t},je=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},$e={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ze={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ke={fontMap:$e,makeSymbol:Ge,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ve(e,"Main-Bold",t).metrics?Ge(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ae[t][e].font?Ge(e,"Main-Regular",t,r,n):Ge(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Xe,makeSvgSpan:We,makeLineSpan:function(e,t,r){var n=Xe([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=V(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new _(e,t,r,n);return Ye(a),a},makeFragment:_e,wrapFragment:function(e,t){return e instanceof A?Xe([],[e],t):e},makeVList:function(e,t){for(var r=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,a=n,i=1;i0&&(o.push(kt(s,t)),s=[]),o.push(a[l]));s.length>0&&o.push(kt(s,t)),r?((i=kt(ft(r,t,!0))).classes=["tag"],o.push(i)):n&&o.push(n);var m=mt(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=V(m.height+m.depth),m.depth&&(c.style.verticalAlign=V(-m.depth))}return m}function Mt(e){return new A(e)}var zt=function(){function e(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G(this.classes));for(var r=0;r0&&(e+=' class ="'+l.escape(G(this.classes))+'"'),e+=">";for(var r=0;r"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),At=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return l.escape(this.toText())},t.toText=function(){return this.text},e}(),Tt={MathNode:zt,TextNode:At,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",V(this.width)),e},t.toMarkup=function(){return this.character?""+this.character+"":''},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Mt},Bt=function(e,t,r){return!ae[t][e]||!ae[t][e].replace||55349===e.charCodeAt(0)||we.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.substr(4,2)||r.font&&"tt"===r.font.substr(4,2))||(e=ae[t][e].replace),new Tt.TextNode(e)},Ct=function(e){return 1===e.length?e[0]:new Tt.MathNode("mrow",e)},qt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var a=e.text;return l.contains(["\\imath","\\jmath"],a)?null:(ae[n][a]&&ae[n][a].replace&&(a=ae[n][a].replace),q(a,Ke.fontMap[r].fontName,n)?Ke.fontMap[r].variant:null)},Nt=function(e,t,r){if(1===e.length){var n=Rt(e[0],t);return r&&n instanceof zt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a,i=[],o=0;o0&&(p.text=p.text.slice(0,1)+"\u0338"+p.text.slice(1),i.pop())}}}i.push(s),a=s}return i},It=function(e,t,r){return Ct(Nt(e,t,r))},Rt=function(e,t){if(!e)return new Tt.MathNode("mrow");if(it[e.type])return it[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function Ot(e,t,r,n,a){var i,o=Nt(e,r);i=1===o.length&&o[0]instanceof zt&&l.contains(["mrow","mtable"],o[0].type)?o[0]:new Tt.MathNode("mrow",o);var s=new Tt.MathNode("annotation",[new Tt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var h=new Tt.MathNode("semantics",[i,s]),m=new Tt.MathNode("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&m.setAttribute("display","block");var c=a?"katex":"katex-mathml";return Ke.makeSpan([c],[m])}var Ht=function(e){return new E({style:e.displayMode?x.DISPLAY:x.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Et=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ke.makeSpan(r,[e])}return e},Lt=function(e,t,r){var n,a=Ht(r);if("mathml"===r.output)return Ot(e,t,a,r.displayMode,!0);if("html"===r.output){var i=St(e,a);n=Ke.makeSpan(["katex"],[i])}else{var o=Ot(e,t,a,r.displayMode,!1),s=St(e,a);n=Ke.makeSpan(["katex"],[o,s])}return Et(n,r)},Dt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Pt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Ft=function(e,t,r,n,a){var i,o=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(i=Ke.makeSpan(["stretchy",t],[],a),"fbox"===t){var s=a.color&&a.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new K(l,{width:"100%",height:V(o)});i=Ke.makeSvgSpan([],[h],a)}return i.height=o,i.style.height=V(o),i},Vt=function(e){var t=new Tt.MathNode("mo",[new Tt.TextNode(Dt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Gt=function(e,t){var r=function(){var r=4e5,n=e.label.substr(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){var a,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===n||"widecheck"===n?(a=420,r=2364,o=.42,i=n+"4"):(a=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][h],a=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=n+h):(r=[0,600,1033,2339,2340][h],a=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new J(i),c=new K([m],{width:"100%",height:V(o),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:Ke.makeSvgSpan([],[c],t),minWidth:0,height:o}}var u,p,d,f=[],g=Pt[n],v=g[0],b=g[1],y=g[2],x=y/1e3,w=v.length;if(1===w)u=["hide-tail"],p=[g[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k0&&(n.style.minWidth=V(a)),n};function Ut(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Yt(e){var t=Xt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Xt(e){return e&&("atom"===e.type||re.hasOwnProperty(e.type))?e:null}var Wt=function(e,t){var r,n,a;e&&"supsub"===e.type?(r=(n=Ut(e.base,"accent")).base,e.base=r,a=function(e){if(e instanceof W)return e;throw new Error("Expected span but got "+String(e)+".")}(wt(e,t)),e.base=n):r=(n=Ut(e,"accent")).base;var i=wt(r,t.havingCrampedStyle()),o=0;if(n.isShifty&&l.isCharacterBox(r)){var s=l.getBaseElem(r);o=ee(wt(s,t.havingCrampedStyle())).skew}var h,m="\\c"===n.label,c=m?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(n.isStretchy)h=Gt(n,t),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+V(2*o)+")",marginLeft:V(2*o)}:void 0}]},t);else{var u,p;"\\vec"===n.label?(u=Ke.staticSvg("vec",t),p=Ke.svgData.vec[1]):((u=ee(u=Ke.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,p=u.width,m&&(c+=u.depth)),h=Ke.makeSpan(["accent-body"],[u]);var d="\\textcircled"===n.label;d&&(h.classes.push("accent-full"),c=i.height);var f=o;d||(f-=p/2),h.style.left=V(f),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-c},{type:"elem",elem:h}]},t)}var g=Ke.makeSpan(["mord","accent"],[h],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},_t=function(e,t){var r=e.isStretchy?Vt(e.label):new Tt.MathNode("mo",[Bt(e.label,e.mode)]),n=new Tt.MathNode("mover",[Rt(e.base,t),r]);return n.setAttribute("accent","true"),n},jt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var r=lt(t[0]),n=!jt.test(e.funcName),a=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:Wt,mathmlBuilder:_t}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var r=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Wt,mathmlBuilder:_t}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:function(e,t){var r=wt(e.base,t),n=Gt(e,t),a="\\utilde"===e.label?.12:0,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:function(e,t){var r=Vt(e.label),n=new Tt.MathNode("munder",[Rt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var $t=function(e){var t=new Tt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=e.funcName;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder:function(e,t){var r,n=t.style,a=t.havingStyle(n.sup()),i=Ke.wrapFragment(wt(e.body,a,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(a=t.havingStyle(n.sub()),(r=Ke.wrapFragment(wt(e.below,a,t),t)).classes.push(o+"-arrow-pad"));var s,l=Gt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]},t)}else s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ke.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var r,n=Vt(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=$t(Rt(e.body,t));if(e.below){var i=$t(Rt(e.below,t));r=new Tt.MathNode("munderover",[n,i,a])}else r=new Tt.MathNode("mover",[n,a])}else if(e.below){var o=$t(Rt(e.below,t));r=new Tt.MathNode("munder",[n,o])}else r=$t(),r=new Tt.MathNode("mover",[n,r]);return r}});var Zt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Kt=function(e){return"textord"===e.type&&"@"===e.text};function Jt(e,t,r){var n=Zt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder:function(e,t){var r=t.havingStyle(t.style.sup()),n=Ke.wrapFragment(wt(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=V(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mrow",[Rt(e.label,t)]);return(r=new Tt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Tt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var r=Ke.wrapFragment(wt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:function(e,t){return new Tt.MathNode("mrow",[Rt(e.fragment,t)])}}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var r=e.parser,a=Ut(t[0],"ordgroup").body,i="",o=0;o=1114111)throw new n("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var Qt=function(e,t){var r=ft(e.body,t.withColor(e.color),!1);return Ke.makeFragment(r)},er=function(e,t){var r=Nt(e.body,t.withColor(e.color)),n=new Tt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var r=e.parser,n=Ut(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:ht(a)}},htmlBuilder:Qt,mathmlBuilder:er}),ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var r=e.parser,n=e.breakOnTokenText,a=Ut(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:Qt,mathmlBuilder:er}),ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=r[0],i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&Ut(a,"size").value}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=V(F(e.size,t)))),r},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",V(F(e.size,t)))),r}});var tr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},rr=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},nr=function(e,t,r,n){var a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,r=e.funcName;t.consumeSpaces();var a=t.fetch();if(tr[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=tr[a.text]),Ut(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",a)}}),ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,a=t.gullet.popToken(),i=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new n("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new n('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new n('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new n("Expected a macro definition");l[s].push(a.text)}var h=t.gullet.consumeArg().tokens;return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===tr[r]),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=rr(t.gullet.popToken());t.gullet.consumeSpaces();var a=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return nr(t,n,a,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=rr(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return nr(t,n,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var ar=function(e,t,r){var n=q(ae.math[e]&&ae.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},ir=function(e,t,r,n){var a=r.havingBaseStyle(t),i=Ke.makeSpan(n.concat(a.sizingClasses(r)),[e],r),o=a.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=a.sizeMultiplier,i},or=function(e,t,r){var n=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=V(a),e.height-=a,e.depth+=a},sr=function(e,t,r,n,a,i){var o=function(e,t,r,n){return Ke.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,a,n),s=ir(Ke.makeSpan(["delimsizing","size"+t],[o],n),x.TEXT,n,i);return r&&or(s,n,x.TEXT),s},lr=function(e,t,r){var n;return n="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ke.makeSpan(["delimsizinginner",n],[Ke.makeSpan([],[Ke.makeSymbol(e,t,r)])])}},hr=function(e,t,r){var n=T["Size4-Regular"][e.charCodeAt(0)]?T["Size4-Regular"][e.charCodeAt(0)][4]:T["Size1-Regular"][e.charCodeAt(0)][4],a=new J("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new K([a],{width:V(n),height:V(t),style:"width:"+V(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ke.makeSvgSpan([],[i],r);return o.height=t,o.style.height=V(t),o.style.width=V(n),{type:"elem",elem:o}},mr={type:"kern",size:-.008},cr=["|","\\lvert","\\rvert","\\vert"],ur=["\\|","\\lVert","\\rVert","\\Vert"],pr=function(e,t,r,n,a,i){var o,s,h,m;o=h=m=e,s=null;var c="Size1-Regular";"\\uparrow"===e?h=m="\u23d0":"\\Uparrow"===e?h=m="\u2016":"\\downarrow"===e?o=h="\u23d0":"\\Downarrow"===e?o=h="\u2016":"\\updownarrow"===e?(o="\\uparrow",h="\u23d0",m="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",h="\u2016",m="\\Downarrow"):l.contains(cr,e)?h="\u2223":l.contains(ur,e)?h="\u2225":"["===e||"\\lbrack"===e?(o="\u23a1",h="\u23a2",m="\u23a3",c="Size4-Regular"):"]"===e||"\\rbrack"===e?(o="\u23a4",h="\u23a5",m="\u23a6",c="Size4-Regular"):"\\lfloor"===e||"\u230a"===e?(h=o="\u23a2",m="\u23a3",c="Size4-Regular"):"\\lceil"===e||"\u2308"===e?(o="\u23a1",h=m="\u23a2",c="Size4-Regular"):"\\rfloor"===e||"\u230b"===e?(h=o="\u23a5",m="\u23a6",c="Size4-Regular"):"\\rceil"===e||"\u2309"===e?(o="\u23a4",h=m="\u23a5",c="Size4-Regular"):"("===e||"\\lparen"===e?(o="\u239b",h="\u239c",m="\u239d",c="Size4-Regular"):")"===e||"\\rparen"===e?(o="\u239e",h="\u239f",m="\u23a0",c="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",m="\u23a9",h="\u23aa",c="Size4-Regular");var u=ar(o,c,a),p=u.height+u.depth,d=ar(h,c,a),f=d.height+d.depth,g=ar(m,c,a),v=g.height+g.depth,b=0,y=1;if(null!==s){var w=ar(s,c,a);b=w.height+w.depth,y=2}var k=p+v+b,S=k+Math.max(0,Math.ceil((t-k)/(y*f)))*y*f,M=n.fontMetrics().axisHeight;r&&(M*=n.sizeMultiplier);var z=S/2-M,A=[];if(A.push(lr(m,c,a)),A.push(mr),null===s){var T=S-p-v+.016;A.push(hr(h,T,n))}else{var B=(S-p-v-b)/2+.016;A.push(hr(h,B,n)),A.push(mr),A.push(lr(s,c,a)),A.push(mr),A.push(hr(h,B,n))}A.push(mr),A.push(lr(o,c,a));var C=n.havingBaseStyle(x.TEXT),q=Ke.makeVList({positionType:"bottom",positionData:z,children:A},C);return ir(Ke.makeSpan(["delimsizing","mult"],[q],C),x.TEXT,n,i)},dr=.08,fr=function(e,t,r,n,a){var i=function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,M);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,M,r)}return n}(e,n,r),o=new J(e,i),s=new K([o],{width:"400em",height:V(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ke.makeSvgSpan(["hide-tail"],[s],a)},gr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],vr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],br=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],yr=[0,1.2,1.8,2.4,3],xr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],kr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Sr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Mr=function(e,t,r,n){for(var a=Math.min(2,3-n.style.size);at)return r[a]}return r[r.length-1]},zr=function(e,t,r,n,a,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=l.contains(br,e)?xr:l.contains(gr,e)?kr:wr;var s=Mr(e,t,o,n);return"small"===s.type?function(e,t,r,n,a,i){var o=Ke.makeSymbol(e,"Main-Regular",a,n),s=ir(o,t,n,i);return r&&or(s,n,t),s}(e,s.style,r,n,a,i):"large"===s.type?sr(e,s.size,r,n,a,i):pr(e,t,r,n,a,i)},Ar={sqrtImage:function(e,t){var r,n,a=t.havingBaseSizing(),i=Mr("\\surd",e*a.sizeMultiplier,kr,a),o=a.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=fr("sqrtMain",l=(1+s+dr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",n=.833/o):"large"===i.type?(m=1080*yr[i.size],h=(yr[i.size]+s)/o,l=(yr[i.size]+s+dr)/o,(r=fr("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",n=1/o):(l=e+s+dr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=fr("sqrtTall",l,m,s,t)).style.minWidth="0.742em",n=1.056),r.height=h,r.style.height=V(l),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,a,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),l.contains(gr,e)||l.contains(br,e))return sr(e,t,!1,r,a,i);if(l.contains(vr,e))return pr(e,yr[t],!1,r,a,i);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:yr,customSizedDelim:zr,leftRightDelim:function(e,t,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return zr(e,h,!0,n,a,i)}},Tr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Br=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Cr(e,t){var r=Xt(e);if(r&&l.contains(Br,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function qr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var r=Cr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Tr[e.funcName].size,mclass:Tr[e.funcName].mclass,delim:r.text}},htmlBuilder:function(e,t){return"."===e.delim?Ke.makeSpan([e.mclass]):Ar.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(Bt(e.delim,e.mode));var r=new Tt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=V(Ar.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Cr(t[0],e).text,color:r}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=Cr(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=Ut(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:function(e,t){qr(e);for(var r,n,a=ft(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l-1?"mpadded":"menclose",[Rt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Ut(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:Nr,mathmlBuilder:Ir}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Ut(t[0],"color-token").color,o=Ut(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Nr,mathmlBuilder:Ir}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:Nr,mathmlBuilder:Ir}),ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var Rr={};function Or(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l1||!c)&&g.pop(),b.length0&&(y+=.25),m.push({pos:y,isDashed:e[t]})}for(w(o[0]),r=0;r0&&(M<(B+=b)&&(M=B),B=0),e.addJot&&(M+=f),z.height=S,z.depth=M,y+=S,z.pos=y,y+=M+B,h[r]=z,w(o[r+1])}var C,q,N=y/2+t.fontMetrics().axisHeight,I=e.cols||[],R=[],O=[];if(e.tags&&e.tags.some((function(e){return e})))for(r=0;r=s)){var W=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(W=l.deflt(P.pregap,p))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(W),R.push(C));var _=[];for(r=0;r0){for(var K=Ke.makeLineSpan("hline",t,c),J=Ke.makeLineSpan("hdashline",t,c),Q=[{type:"elem",elem:h,shift:0}];m.length>0;){var ee=m.pop(),te=ee.pos-N;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}h=Ke.makeVList({positionType:"individualShift",children:Q},t)}if(0===O.length)return Ke.makeSpan(["mord"],[h],t);var re=Ke.makeVList({positionType:"individualShift",children:O},t);return re=Ke.makeSpan(["tag"],[re],t),Ke.makeFragment([h,re])},Xr={c:"center ",l:"left ",r:"right "},Wr=function(e,t){for(var r=[],n=new Tt.MathNode("mtd",[],["mtr-glue"]),a=new Tt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i0){var p=e.cols,d="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(c+="top ",g=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=g;b0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M-1?"alignat":"align",o="split"===e.envName,s=Gr(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:Vr(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c0&&u&&(f=1),a[p]={type:"align",align:d,pregap:f,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};Or({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var r=(Xt(t[0])?[t[0]]:Ut(t[0],"ordgroup").body).map((function(e){var t=Yt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Gr(e.parser,a,Ur(e.envName))},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),a.cols=[{type:"align",align:r}]}}var o=Gr(e.parser,a,Ur(e.envName)),s=Math.max.apply(Math,[0].concat(o.body.map((function(e){return e.length}))));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Gr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var r=(Xt(t[0])?[t[0]]:Ut(t[0],"ordgroup").body).map((function(e){var t=Yt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Gr(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new n("{subarray} can contain only one column");return a},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Gr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Ur(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:_r,htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l.contains(["gather","gather*"],e.envName)&&Fr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Vr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Gr(e.parser,t,"display")},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:_r,htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Fr(e);var t={autoTag:Vr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Gr(e.parser,t,"display")},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Fr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,i,o=[],s=[o],l=0;l-1);else{if(!("<>AV".indexOf(u)>-1))throw new n('Expected one of "<>AV=|." after @',h[c]);for(var d=0;d<2;d++){for(var f=!0,g=c+1;g=x.SCRIPT.id?r.text():x.DISPLAY:"text"===e&&r.size===x.DISPLAY.size?r=x.TEXT:"script"===e?r=x.SCRIPT:"scriptscript"===e&&(r=x.SCRIPTSCRIPT),r},nn=function(e,t){var r,n=rn(e.size,t.style),a=n.fracNum(),i=n.fracDen();r=t.havingStyle(a);var o=wt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-o.depth-(w+.5*m)0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?sn(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?sn(l.text):null,m=Ut(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Ut(p.body[0],"textord");u=on[Number(d.text)]}}else p=Ut(p,"textord"),u=on[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:nn,mathmlBuilder:an}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ut(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ut(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:nn,mathmlBuilder:an});var ln=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Ut(e.base,"horizBrace")):n=Ut(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Gt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:ln,mathmlBuilder:function(e,t){var r=Vt(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Ut(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Ut(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i0&&(n=F(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=F(e.width,t));var i={height:V(r+n)};a>0&&(i.width=V(a)),n>0&&(i.verticalAlign=V(-n));var o=new j(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=F(e.height,t),a=0;if(e.totalheight.number>0&&(a=F(e.totalheight,t)-n,r.setAttribute("valign",V(-a))),r.setAttribute("height",V(n+a)),e.width.number>0){var i=F(e.width,t);r.setAttribute("width",V(i))}return r.setAttribute("src",e.src),r}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=Ut(t[0],"size");if(r.settings.strict){var i="m"===n[1],o="mu"===a.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:function(e,t){return Ke.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var r=F(e.dimension,t);return new Tt.SpaceNode(r)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:function(e,t){var r;"clap"===e.alignment?(r=Ke.makeSpan([],[wt(e.body,t)]),r=Ke.makeSpan(["inner"],[r],t)):r=Ke.makeSpan(["inner"],[wt(e.body,t)]);var n=Ke.makeSpan(["fix"],[]),a=Ke.makeSpan([e.alignment],[r,n],t),i=Ke.makeSpan(["strut"]);return i.style.height=V(a.height+a.depth),a.depth&&(i.style.verticalAlign=V(-a.depth)),a.children.unshift(i),a=Ke.makeSpan(["thinbox"],[a],t),Ke.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var r=e.funcName,n=e.parser,a=n.mode;n.switchMode("math");var i="\\("===r?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var mn=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:function(e,t){var r=mn(e,t),n=ft(r,t,!1);return Ke.makeFragment(n)},mathmlBuilder:function(e,t){var r=mn(e,t);return It(r,t)}});var cn=function(e,t,r,n,a,i,o){e=Ke.makeSpan([],[e]);var s,h,m,c=r&&l.isCharacterBox(r);if(t){var u=wt(t,n.havingStyle(a.sup()),n);h={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=wt(r,n.havingStyle(a.sub()),n);s={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(h&&s){var d=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(s){var f=e.height-o;m=Ke.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;var g=e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var v=[m];if(s&&0!==i&&!c){var b=Ke.makeSpan(["mspace"],[],n);b.style.marginRight=V(i),v.unshift(b)}return Ke.makeSpan(["mop","op-limits"],v,n)},un=["\\smallint"],pn=function(e,t){var r,n,a,i=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=Ut(e.base,"op"),i=!0):a=Ut(e,"op");var o,s=t.style,h=!1;if(s.size===x.DISPLAY.size&&a.symbol&&!l.contains(un,a.name)&&(h=!0),a.symbol){var m=h?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(c=a.name.substr(1),a.name="oiint"===c?"\\iint":"\\iiint"),o=Ke.makeSymbol(a.name,m,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),c.length>0){var u=o.italic,p=Ke.staticSvg(c+"Size"+(h?"2":"1"),t);o=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:p,shift:h?.08:0}]},t),a.name="\\"+c,o.classes.unshift("mop"),o.italic=u}}else if(a.body){var d=ft(a.body,t,!0);1===d.length&&d[0]instanceof Z?(o=d[0]).classes[0]="mop":o=Ke.makeSpan(["mop"],d,t)}else{for(var f=[],g=1;g0){for(var s=a.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ft(s,t.withFont("mathrm"),!0),h=0;h=0?s.setAttribute("height",V(a)):(s.setAttribute("height",V(a)),s.setAttribute("depth",V(-a))),s.setAttribute("voffset",V(a)),s}});var yn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:yn,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:yn.indexOf(n)+1,body:i}},htmlBuilder:function(e,t){var r=t.havingSize(e.size);return bn(e.body,r,t)},mathmlBuilder:function(e,t){var r=t.havingSize(e.size),n=Nt(e.body,r),a=new Tt.MathNode("mstyle",n);return a.setAttribute("mathsize",V(r.sizeMultiplier)),a}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=!1,i=!1,o=r[0]&&Ut(r[0],"ordgroup");if(o)for(var s="",l=0;lr.height+r.depth+i&&(i=(i+c-r.height-r.depth)/2);var u=l.height-r.height-i-h;r.style.paddingLeft=V(m);var p=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:h}]},t);if(e.index){var d=t.havingStyle(x.SCRIPTSCRIPT),f=wt(e.index,d,t),g=.6*(p.height-p.depth),v=Ke.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),b=Ke.makeSpan(["root"],[v]);return Ke.makeSpan(["mord","sqrt"],[b,p],t)}return Ke.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var r=e.body,n=e.index;return n?new Tt.MathNode("mroot",[Rt(r,t),Rt(n,t)]):new Tt.MathNode("msqrt",[Rt(r,t)])}});var xn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder:function(e,t){var r=xn[e.style],n=t.havingStyle(r).withFont("");return bn(e.body,n,t)},mathmlBuilder:function(e,t){var r=xn[e.style],n=t.havingStyle(r),a=Nt(e.body,n),i=new Tt.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var wn=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===x.DISPLAY.size||r.alwaysHandleSupSub)?pn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||r.limits)?vn:null:"accent"===r.type?l.isCharacterBox(r.base)?Wt:null:"horizBrace"===r.type&&!e.sub===r.isOver?ln:null:null};st({type:"supsub",htmlBuilder:function(e,t){var r=wn(e,t);if(r)return r(e,t);var n,a,i,o=e.base,s=e.sup,h=e.sub,m=wt(o,t),c=t.fontMetrics(),u=0,p=0,d=o&&l.isCharacterBox(o);if(s){var f=t.havingStyle(t.style.sup());n=wt(s,f,t),d||(u=m.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(h){var g=t.havingStyle(t.style.sub());a=wt(h,g,t),d||(p=m.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}i=t.style===x.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var v,b=t.sizeMultiplier,y=V(.5/c.ptPerEm/b),w=null;if(a){var k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(m instanceof Z||k)&&(w=V(-m.italic))}if(n&&a){u=Math.max(u,i,n.depth+.25*c.xHeight),p=Math.max(p,c.sub2);var S=4*c.defaultRuleThickness;if(u-n.depth-(a.height-p)0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,c.sub1,a.height-.8*c.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(m,"right")||"mord";return Ke.makeSpan([T],[m,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=qt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var kn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=qt(e,t)||"italic";return n!==kn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=qt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==kn[r.type]&&r.setAttribute("mathvariant",a),r}});var Sn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Mn.hasOwnProperty(e.text)){var r=Mn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(Sn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",Sn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Mn.hasOwnProperty(e.text)){if(Sn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var zn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[zn(),new Tt.MathNode("mtd",[It(e.body,t)]),zn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var An={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tn={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Cn=function(e,t){var r=e.font;return r?An[r]?t.withTextFontFamily(An[r]):Tn[r]?t.withTextFontWeight(Tn[r]):t.withTextFontShape(Bn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Cn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Cn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=qn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,r){if(void 0===r&&(r=!1),r){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),Hn=Hr;Er("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Er("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Er("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Er("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Er("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Er("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Er("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var En={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Er("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=En[r.text])||a>=t)throw new n("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=En[e.future().text])&&i":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Er("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Dn?t=Dn[r]:("\\not"===r.substr(0,4)||r in ae.math&&l.contains(["bin","rel"],ae.math[r].group))&&(t="\\dotsb"),t}));var Pn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Er("\\dotso",(function(e){return e.future().text in Pn?"\\ldots\\,":"\\ldots"})),Er("\\dotsc",(function(e){var t=e.future().text;return t in Pn&&","!==t?"\\ldots\\,":"\\ldots"})),Er("\\cdots",(function(e){return e.future().text in Pn?"\\@cdots\\,":"\\@cdots"})),Er("\\dotsb","\\cdots"),Er("\\dotsm","\\cdots"),Er("\\dotsi","\\!\\cdots"),Er("\\dotsx","\\ldots\\,"),Er("\\DOTSI","\\relax"),Er("\\DOTSB","\\relax"),Er("\\DOTSX","\\relax"),Er("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Er("\\,","\\tmspace+{3mu}{.1667em}"),Er("\\thinspace","\\,"),Er("\\>","\\mskip{4mu}"),Er("\\:","\\tmspace+{4mu}{.2222em}"),Er("\\medspace","\\:"),Er("\\;","\\tmspace+{5mu}{.2777em}"),Er("\\thickspace","\\;"),Er("\\!","\\tmspace-{3mu}{.1667em}"),Er("\\negthinspace","\\!"),Er("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Er("\\negthickspace","\\tmspace-{5mu}{.277em}"),Er("\\enspace","\\kern.5em "),Er("\\enskip","\\hskip.5em\\relax"),Er("\\quad","\\hskip1em\\relax"),Er("\\qquad","\\hskip2em\\relax"),Er("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Er("\\tag@paren","\\tag@literal{({#1})}"),Er("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Er("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Er("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Er("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Er("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Er("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Er("\\newline","\\\\\\relax"),Er("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Fn=V(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Er("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Fn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Er("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Fn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Er("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Er("\\@hspace","\\hskip #1\\relax"),Er("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Er("\\ordinarycolon",":"),Er("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Er("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Er("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Er("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Er("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Er("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Er("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Er("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Er("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Er("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Er("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Er("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Er("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Er("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Er("\u2237","\\dblcolon"),Er("\u2239","\\eqcolon"),Er("\u2254","\\coloneqq"),Er("\u2255","\\eqqcolon"),Er("\u2a74","\\Coloneqq"),Er("\\ratio","\\vcentcolon"),Er("\\coloncolon","\\dblcolon"),Er("\\colonequals","\\coloneqq"),Er("\\coloncolonequals","\\Coloneqq"),Er("\\equalscolon","\\eqqcolon"),Er("\\equalscoloncolon","\\Eqqcolon"),Er("\\colonminus","\\coloneq"),Er("\\coloncolonminus","\\Coloneq"),Er("\\minuscolon","\\eqcolon"),Er("\\minuscoloncolon","\\Eqcolon"),Er("\\coloncolonapprox","\\Colonapprox"),Er("\\coloncolonsim","\\Colonsim"),Er("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Er("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Er("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Er("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Er("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Er("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Er("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Er("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Er("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Er("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Er("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Er("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Er("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Er("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Er("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Er("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Er("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Er("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Er("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Er("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Er("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Er("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Er("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Er("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Er("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Er("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Er("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Er("\\imath","\\html@mathml{\\@imath}{\u0131}"),Er("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Er("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Er("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Er("\u27e6","\\llbracket"),Er("\u27e7","\\rrbracket"),Er("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Er("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Er("\u2983","\\lBrace"),Er("\u2984","\\rBrace"),Er("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Er("\u29b5","\\minuso"),Er("\\darr","\\downarrow"),Er("\\dArr","\\Downarrow"),Er("\\Darr","\\Downarrow"),Er("\\lang","\\langle"),Er("\\rang","\\rangle"),Er("\\uarr","\\uparrow"),Er("\\uArr","\\Uparrow"),Er("\\Uarr","\\Uparrow"),Er("\\N","\\mathbb{N}"),Er("\\R","\\mathbb{R}"),Er("\\Z","\\mathbb{Z}"),Er("\\alef","\\aleph"),Er("\\alefsym","\\aleph"),Er("\\Alpha","\\mathrm{A}"),Er("\\Beta","\\mathrm{B}"),Er("\\bull","\\bullet"),Er("\\Chi","\\mathrm{X}"),Er("\\clubs","\\clubsuit"),Er("\\cnums","\\mathbb{C}"),Er("\\Complex","\\mathbb{C}"),Er("\\Dagger","\\ddagger"),Er("\\diamonds","\\diamondsuit"),Er("\\empty","\\emptyset"),Er("\\Epsilon","\\mathrm{E}"),Er("\\Eta","\\mathrm{H}"),Er("\\exist","\\exists"),Er("\\harr","\\leftrightarrow"),Er("\\hArr","\\Leftrightarrow"),Er("\\Harr","\\Leftrightarrow"),Er("\\hearts","\\heartsuit"),Er("\\image","\\Im"),Er("\\infin","\\infty"),Er("\\Iota","\\mathrm{I}"),Er("\\isin","\\in"),Er("\\Kappa","\\mathrm{K}"),Er("\\larr","\\leftarrow"),Er("\\lArr","\\Leftarrow"),Er("\\Larr","\\Leftarrow"),Er("\\lrarr","\\leftrightarrow"),Er("\\lrArr","\\Leftrightarrow"),Er("\\Lrarr","\\Leftrightarrow"),Er("\\Mu","\\mathrm{M}"),Er("\\natnums","\\mathbb{N}"),Er("\\Nu","\\mathrm{N}"),Er("\\Omicron","\\mathrm{O}"),Er("\\plusmn","\\pm"),Er("\\rarr","\\rightarrow"),Er("\\rArr","\\Rightarrow"),Er("\\Rarr","\\Rightarrow"),Er("\\real","\\Re"),Er("\\reals","\\mathbb{R}"),Er("\\Reals","\\mathbb{R}"),Er("\\Rho","\\mathrm{P}"),Er("\\sdot","\\cdot"),Er("\\sect","\\S"),Er("\\spades","\\spadesuit"),Er("\\sub","\\subset"),Er("\\sube","\\subseteq"),Er("\\supe","\\supseteq"),Er("\\Tau","\\mathrm{T}"),Er("\\thetasym","\\vartheta"),Er("\\weierp","\\wp"),Er("\\Zeta","\\mathrm{Z}"),Er("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Er("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Er("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Er("\\bra","\\mathinner{\\langle{#1}|}"),Er("\\ket","\\mathinner{|{#1}\\rangle}"),Er("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Er("\\Bra","\\left\\langle#1\\right|"),Er("\\Ket","\\left|#1\\right\\rangle"),Er("\\angln","{\\angl n}"),Er("\\blue","\\textcolor{##6495ed}{#1}"),Er("\\orange","\\textcolor{##ffa500}{#1}"),Er("\\pink","\\textcolor{##ff00af}{#1}"),Er("\\red","\\textcolor{##df0030}{#1}"),Er("\\green","\\textcolor{##28ae7b}{#1}"),Er("\\gray","\\textcolor{gray}{#1}"),Er("\\purple","\\textcolor{##9d38bd}{#1}"),Er("\\blueA","\\textcolor{##ccfaff}{#1}"),Er("\\blueB","\\textcolor{##80f6ff}{#1}"),Er("\\blueC","\\textcolor{##63d9ea}{#1}"),Er("\\blueD","\\textcolor{##11accd}{#1}"),Er("\\blueE","\\textcolor{##0c7f99}{#1}"),Er("\\tealA","\\textcolor{##94fff5}{#1}"),Er("\\tealB","\\textcolor{##26edd5}{#1}"),Er("\\tealC","\\textcolor{##01d1c1}{#1}"),Er("\\tealD","\\textcolor{##01a995}{#1}"),Er("\\tealE","\\textcolor{##208170}{#1}"),Er("\\greenA","\\textcolor{##b6ffb0}{#1}"),Er("\\greenB","\\textcolor{##8af281}{#1}"),Er("\\greenC","\\textcolor{##74cf70}{#1}"),Er("\\greenD","\\textcolor{##1fab54}{#1}"),Er("\\greenE","\\textcolor{##0d923f}{#1}"),Er("\\goldA","\\textcolor{##ffd0a9}{#1}"),Er("\\goldB","\\textcolor{##ffbb71}{#1}"),Er("\\goldC","\\textcolor{##ff9c39}{#1}"),Er("\\goldD","\\textcolor{##e07d10}{#1}"),Er("\\goldE","\\textcolor{##a75a05}{#1}"),Er("\\redA","\\textcolor{##fca9a9}{#1}"),Er("\\redB","\\textcolor{##ff8482}{#1}"),Er("\\redC","\\textcolor{##f9685d}{#1}"),Er("\\redD","\\textcolor{##e84d39}{#1}"),Er("\\redE","\\textcolor{##bc2612}{#1}"),Er("\\maroonA","\\textcolor{##ffbde0}{#1}"),Er("\\maroonB","\\textcolor{##ff92c6}{#1}"),Er("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Er("\\maroonD","\\textcolor{##ca337c}{#1}"),Er("\\maroonE","\\textcolor{##9e034e}{#1}"),Er("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Er("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Er("\\purpleC","\\textcolor{##aa87ff}{#1}"),Er("\\purpleD","\\textcolor{##7854ab}{#1}"),Er("\\purpleE","\\textcolor{##543b78}{#1}"),Er("\\mintA","\\textcolor{##f5f9e8}{#1}"),Er("\\mintB","\\textcolor{##edf2df}{#1}"),Er("\\mintC","\\textcolor{##e0e5cc}{#1}"),Er("\\grayA","\\textcolor{##f6f7f7}{#1}"),Er("\\grayB","\\textcolor{##f0f1f2}{#1}"),Er("\\grayC","\\textcolor{##e3e5e6}{#1}"),Er("\\grayD","\\textcolor{##d6d8da}{#1}"),Er("\\grayE","\\textcolor{##babec2}{#1}"),Er("\\grayF","\\textcolor{##888d93}{#1}"),Er("\\grayG","\\textcolor{##626569}{#1}"),Er("\\grayH","\\textcolor{##3b3e40}{#1}"),Er("\\grayI","\\textcolor{##21242c}{#1}"),Er("\\kaBlue","\\textcolor{##314453}{#1}"),Er("\\kaGreen","\\textcolor{##71B307}{#1}");var Vn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Gn=function(){function e(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new On(Hn,t.macros),this.mode=r,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Rn(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var a=this.consumeArg(["]"]);n=a.tokens,r=a.end}else{var i=this.consumeArg();n=i.tokens,t=i.start,r=i.end}return this.pushToken(new Dr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")},t.consumeSpaces=function(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}},t.consumeArg=function(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,i=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new n("Extra }",a)}else if("EOF"===a.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;athis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var h;(h=i).splice.apply(h,[s,2].concat(o[+l.text-1]))}}}return this.pushTokens(i),i},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Dr)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Dr(e)]):void 0},t.expandTokens=function(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;){var n=this.expandOnce(!0);n instanceof Dr&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var a=0;if(-1!==n.indexOf("#"))for(var i=n.replace(/##/g,"");-1!==i.indexOf("#"+(a+1));)++a;for(var o=new Rn(n,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:a}}return n},t.isDefined=function(e){return this.macros.has(e)||Nn.hasOwnProperty(e)||ae.math.hasOwnProperty(e)||ae.text.hasOwnProperty(e)||Vn.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Nn.hasOwnProperty(e)&&!Nn[e].primitive},e}(),Un={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Yn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"},Xn=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Gn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Dr("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r},t.parseExpression=function(t,r){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==e.endOfExpression.indexOf(a.text))break;if(r&&a.text===r)break;if(t&&Nn[a.text]&&Nn[a.text].infix)break;var i=this.parseAtom(r);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,r=-1,a=0;a=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ae[this.mode][t].group,h=Lr.range(e);if(te.hasOwnProperty(l)){var m=l;s={type:"atom",mode:this.mode,family:m,loc:h,text:t}}else s={type:l,mode:this.mode,loc:h,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:Lr.range(e),text:t}}if(this.consume(),o)for(var c=0;c *:first-child { + /* This make the first thing in the preamble align with the sidebar */ + padding-top: 0; + margin-top: 0; +} + +header { + margin-bottom: 30px; +} + +header.odoc-preamble { + grid-column: 2; + grid-row: 3; +} + +nav { + font-family: "Fira Sans", sans-serif; +} + +nav.odoc-nav { + grid-column: 2; + grid-row: 2; +} + +/* Basic markup elements */ + +b, strong { + font-weight: bold; +} + +i { + font-style: italic; +} + +em, i em.odd{ + font-style: italic; +} + +em.odd, i em { + font-style: normal; +} + +sup { + vertical-align: super; +} + +sub { + vertical-align: sub; +} + +sup, sub { + font-size: 12px; + line-height: 0; + margin-left: 0.2ex; +} + +ul, ol { + list-style-position: outside +} + +ul>li { + margin-left: 22px; +} + +ol>li { + margin-left: 27.2px; +} + +li>*:first-child { + margin-top: 0 +} + +/* Text alignements, this should be forbidden. */ + +.left { + text-align: left; +} + +.right { + text-align: right; +} + +.center { + text-align: center; +} + +/* Links and anchors */ + +a { + text-decoration: none; + color: var(--link-color); +} + +.odoc-src pre a { + color: inherit; +} + +a:hover { + box-shadow: 0 1px 0 0 var(--link-color); +} + +/* Linked highlight */ +*:target { + background-color: var(--target-background) !important; + box-shadow: 0 0px 0 1px var(--target-shadow) !important; + border-radius: 1px; +} + +*:hover > a.anchor { + visibility: visible; +} + +a.anchor:before { + content: "#"; +} + +a.anchor:hover { + box-shadow: none; + text-decoration: none; + color: var(--anchor-hover); +} + +a.anchor { + visibility: hidden; + position: absolute; + /* top: 0px; */ + /* margin-left: -3ex; */ + margin-left: -1.3em; + font-weight: normal; + font-style: normal; + padding-right: 0.4em; + padding-left: 0.4em; + /* To remain selectable */ + color: var(--anchor-color); +} + +.spec > a.anchor { + margin-left: -2.3em; + padding-right: 0.9em; +} + +.xref-unresolved { + color: #2C94BD; +} +.xref-unresolved:hover { + box-shadow: 0 1px 0 0 var(--xref-shadow); +} + +/* Source links float inside preformated text or headings. */ +a.source_link { + float: right; + color: var(--source-color); + font-family: "Fira Sans", sans-serif; + font-size: initial; +} + +/* Section and document divisions. + Until at least 4.03 many of the modules of the stdlib start at .h7, + we restart the sequence there like h2 */ + +h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 { + font-family: "Fira Sans", sans-serif; + font-weight: 400; + padding-top: 0.1em; + line-height: 1.2; + overflow-wrap: break-word; +} + +.odoc-preamble h1 { + margin-top: 10px; +} + +h1 { + font-weight: 500; + font-size: 2.441em; +} + +h1 { + font-weight: 500; + font-size: 1.953em; + box-shadow: 0 1px 0 0 var(--header-shadow); +} + +h2 { + font-size: 1.563em; +} + +h3 { + font-size: 1.25em; +} + +small, .font_small { + font-size: 0.8em; +} + +h1 code, h1 tt { + font-size: inherit; + font-weight: inherit; +} + +h2 code, h2 tt { + font-size: inherit; + font-weight: inherit; +} + +h3 code, h3 tt { + font-size: inherit; + font-weight: inherit; +} + +h3 code, h3 tt { + font-size: inherit; + font-weight: inherit; +} + +h4 { + font-size: 1.12em; +} + +/* Comment delimiters, hidden but accessible to screen readers and + selected for copy/pasting */ + +/* Taken from bootstrap */ +/* See also https://stackoverflow.com/a/27769435/4220738 */ +.comment-delim { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +/* Preformatted and code */ + +tt, code, pre { + font-family: "Fira Mono", monospace; + font-weight: 400; +} + +.odoc pre { + padding: 0.1em; + border: 1px solid var(--pre-border-color); + border-radius: 5px; + overflow-x: auto; +} + +.odoc p code, +.odoc li code { + background-color: var(--li-code-background); + color: var(--li-code-color); + border-radius: 3px; + padding: 0 0.3ex; +} + +p a > code, li a > code { + color: var(--link-color); +} + +.odoc code { + white-space: pre-wrap; +} + +/* Code blocks (e.g. Examples) */ + +.odoc pre code { + font-size: 0.893rem; +} + +/* Code lexemes */ + +.keyword { + font-weight: 500; +} + +.arrow { white-space: nowrap } + +/* Module member specification */ + +.spec { + background-color: var(--spec-summary-background); + border-radius: 3px; + border-left: 4px solid var(--spec-summary-border-color); + border-right: 5px solid transparent; + padding: 0.35em 0.5em; +} + +.spec .label, .spec .optlabel { + color: var(--spec-label-color); +} + +li:not(:last-child) > .def-doc { + margin-bottom: 15px; +} + +/* Spacing between items */ +div.odoc-spec,.odoc-include { + margin-bottom: 2em; +} + +.spec.type .variant p, .spec.type .record p { + margin: 5px; +} + +.spec.type .variant, .spec.type .record { + margin-left: 2ch; +} + +.spec.type li.variant, .spec.type li.record { + list-style: none; +} + +.spec.type .record > code, .spec.type .variant > code { + min-width: 40%; +} + +.spec.type > ol { + margin-top: 0; + margin-bottom: 0; +} + +.spec.type .record > .def-doc, .spec.type .variant > .def-doc { + min-width:50%; + padding: 0.25em 0.5em; + margin-left: 10%; + border-radius: 3px; + background: var(--main-background); + box-shadow: 1px 1px 2px lightgrey; +} + +div.def { + margin-top: 0; + text-indent: -2ex; + padding-left: 2ex; +} + +div.def-doc>*:first-child { + margin-top: 0; +} + +/* Collapsible inlined include and module */ + +.odoc-include details { + position: relative; +} + +.odoc-include.shadowed-include { + display: none; +} + +.odoc-include details:after { + z-index: -100; + display: block; + content: " "; + position: absolute; + border-radius: 0 1ex 1ex 0; + right: -20px; + top: 1px; + bottom: 1px; + width: 15px; + background: var(--spec-details-after-background, rgba(0, 4, 15, 0.05)); + box-shadow: 0 0px 0 1px var(--spec-details-after-shadow, rgba(204, 204, 204, 0.53)); +} + +.odoc-include summary { + position: relative; + margin-bottom: 1em; + cursor: pointer; + outline: none; +} + +.odoc-include summary:hover { + background-color: var(--spec-summary-hover-background); +} + +/* FIXME: Does not work in Firefox. */ +.odoc-include summary::-webkit-details-marker { + color: #888; + transform: scaleX(-1); + position: absolute; + top: calc(50% - 5px); + height: 11px; + right: -29px; +} + +/* Records and variants FIXME */ + +div.def table { + text-indent: 0em; + padding: 0; + margin-left: -2ex; +} + +td.def { + padding-left: 2ex; +} + +td.def-doc *:first-child { + margin-top: 0em; +} + +/* Lists of @tags */ + +.at-tags { list-style-type: none; margin-left: -3ex; } +.at-tags li { padding-left: 3ex; text-indent: -3ex; } +.at-tags .at-tag { text-transform: capitalize } + +/* Alert emoji */ + +.alert::before, .deprecated::before { + content: '⚠️ '; +} + +/* Lists of modules */ + +.modules { list-style-type: none; margin-left: -3ex; } +.modules li { padding-left: 3ex; text-indent: -3ex; margin-top: 5px } +.modules .synopsis { padding-left: 1ch; } + +/* Odig package index */ + +.packages { list-style-type: none; margin-left: -3ex; } +.packages li { padding-left: 3ex; text-indent: -3ex } +.packages li a.anchor { padding-right: 0.5ch; padding-left: 3ch; } +.packages .version { font-size: 10px; color: var(--by-name-version-color); } +.packages .synopsis { padding-left: 1ch } + +.by-name nav a { + text-transform: uppercase; + font-size: 18px; + margin-right: 1ex; + color: var(--by-name-nav-link-color,); + display: inline-block; +} + +.by-tag nav a { + margin-right: 1ex; + color: var(--by-name-nav-link-color); + display: inline-block; +} + +.by-tag ol { list-style-type: none; } +.by-tag ol.tags li { margin-left: 1ch; display: inline-block } +.by-tag td:first-child { text-transform: uppercase; } + +/* Odig package page */ + +.package nav { + display: inline; + font-size: 14px; + font-weight: normal; +} + +.package .version { + font-size: 14px; +} + +.package.info { + margin: 0; +} + +.package.info td:first-child { + font-style: italic; + padding-right: 2ex; +} + +.package.info ul { + list-style-type: none; + display: inline; + margin: 0; +} + +.package.info li { + display: inline-block; + margin: 0; + margin-right: 1ex; +} + +#info-authors li, #info-maintainers li { + display: block; +} + +/* Sidebar and TOC */ + +.odoc-toc:before { + display: block; + content: "Contents"; + text-transform: uppercase; + font-size: 1em; + margin: 1.414em 0 0.5em; + font-weight: 500; + color: var(--toc-before-color); + line-height: 1.2; +} + +/* When a search bar is present, we need the sticky sidebar to be a bit lower, + so `top` is higher */ + +.odoc-search + * + .odoc-toc { + --toc-top: calc(var(--search-bar-height) + var(--search-padding-top) + 20px); + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) +} + +.odoc-toc { + --toc-top: 20px; + width: 28ex; + background: var(--toc-background); + overflow: auto; + color: var(--toc-color); + padding-left: 2ex; + padding-right: 2ex; + grid-row-start: 3; + grid-row-end: 5; + grid-column: 1; + height: fit-content; + border: solid 1px var(--border); + border-radius: 5px; + position:sticky; + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) +} + +.odoc-toc ul li a { + font-family: "Fira Sans", sans-serif; + font-size: 0.95em; + color: var(--color); + font-weight: 400; + line-height: 1.2em; + display: block; +} + +.odoc-sidebar ul li a:hover { + box-shadow: none; + text-decoration: underline; +} + +:root { + --search-bar-height: 25px; + --search-padding-top: 1rem; +} + +.odoc-search { + position: sticky; + top: 0; + background: var(--main-background); + /* This amounts to fit-content when the search is not active, but when you + have the search results displayed, you do not want the height of the search + container to change. */ + height: calc(var(--search-bar-height) + var(--search-padding-top)); + width: 100%; + padding-top: var(--search-padding-top); + z-index: 1; + grid-row: 1; + grid-column-start: 1; + grid-column-end: 3; +} + + +.odoc-search .search-inner { + width: 100%; + position: relative; + left: 0; + display: grid; + /* The second column is for the search snake, which has 0 width */ + grid-template-columns: 1fr 0fr; + grid-row-gap: 1rem; + /* The second row is for the search results. It has a width, but only */ + grid-template-rows: min-content 0px; + background: transparent; +} + +.odoc-search .search-bar { + position: relative; + z-index: 2; + font-size: 1em; + transition: font-size 0.3s; + box-shadow: 0px 0px 0.2rem 0.3em var(--main-background); + height: var(--search-bar-height); +} + +.odoc-search:focus-within .search-bar { + font-size: 1.1em; +} + +.odoc-search:not(:focus-within) .search-result { + display: none; +} + +.odoc-search .search-result:empty { + display: none; +} + +.odoc-search .search-result { + grid-row: 2; + background: var(--toc-background); + position: absolute; + left: 0; + right: 0; + border: solid; + border-color: var(--search-results-border); + border-width: 1px; + border-radius: 6px; + box-shadow: 0 3px 10px 2px var(--search-results-shadow), 0 0 3px 4px var(--main-background), 0px -1rem 0px 0px var(--main-background); + /* Works better on smallish screens with this */ + max-height: calc(min(40rem, 50vh)); + overflow-y: auto; +} + +.search-bar { + /* inputs are of fixed size by default, even if you display:block them */ + width: 100%; +} + + +.odoc-search .search-no-result { + color: var(--color); + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 10px; + padding-right: 0.5rem; +} + +.search-bar-container { + display: flex; + align-items: stretch; + border-bottom: 1rem solid var(--main-background); +} + +.search-snake { + grid-row: 1; + grid-column: 2; + display: flex; + align-items: center; + width: 0; + z-index: 2; + position: relative; + left: 0; + margin-top: 4px; + margin-bottom: 4px; + /* Otherwise the search snake flickers for very fast searches. */ + transition: opacity 0.2s; + opacity: 0; +} + +.search-snake.search-busy { + opacity: 1; +} + +.search-snake:before { + content: " "; + display: block; + aspect-ratio: 1 / 1; + height: 100%; + margin-right: 4px; + border-radius: 50%; + border: 3px solid #aaa; + border-color: var(--search-snake) transparent var(--search-snake) transparent; + animation: search-snake 1.2s linear infinite; + position: absolute; + right: 0; +} + +@keyframes search-snake { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +:root { + --kind-font-size-factor: 0.8; +} + +.odoc-search .search-entry { + color: var(--color); + display: grid; + /* Possible kinds are the following : + "doc" "type" "mod" "exn" "class" "meth" "cons" "sig" "cons" "field" "val" + and "ext". + As the longest is 5 characters (and the font monospace), we give 5 + character size to the column. However the font used for kind is a little + smaller, so we adjust by this factor. + */ + grid-template-columns: [kinds] calc(var(--kind-font-size-factor) * 5ch) [titles] 1fr; + column-gap: 0.5rem; + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 0.4rem 0.4rem 0.7rem 0.7rem; +} +.odoc-search .search-entry p { + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.odoc-search .search-entry:focus-visible { + box-shadow: none; + background-color: var(--target-background); +} + +.odoc-search .search-entry:hover { + box-shadow: none; + background-color: var(--toc-background-emph); +} + +.odoc-search .search-entry .entry-kind { + grid-row: 1/2; + grid-column: 1/2; + line-height: 1.4rem; + font-size: calc(var(--kind-font-size-factor) * 1em); + font-weight: bold; + text-align: right; + position: relative; + bottom: 0; +} + +.odoc-search .search-entry pre { + border: none; + margin: 0; +} + +.odoc-search .search-entry pre code { + font-size: 1em; + background-color: var(--li-code-background); + color: var(--li-code-color); + border-radius: 3px; + padding: 0 0.3ex; +} + +.odoc-search .search-entry .entry-title { + width: 100%; + display: block; + grid-column: 2/2; + grid-row: 1/2; + align-self: end; + line-height: 1.4rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.odoc-search .entry-name { + font-weight: bold; +} + +.odoc-search .prefix-name { + font-weight: bold; +} + +.odoc-search .search-entry .prefix-name { + opacity: 0.7; +} + +.odoc-search .entry-rhs { + white-space: nowrap; +} + +.odoc-search .search-entry .entry-content { + flex-grow: 1; + flex-shrink: 1; + min-width: 0; +} + +.odoc-search .search-entry .entry-comment { + max-height: 1.5em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 0.95em; + grid-row: 2/2; + grid-column: 2/2; +} + +.odoc-search .search-entry .entry-comment ul { + white-space: nowrap; + display: inline; +} + +.odoc-search .search-entry .entry-comment li { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment ul>li::before { + content: '•'; +} + +.odoc-search .search-entry .entry-comment div { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment p { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment code { + display: inline; + white-space: nowrap; +} + +/* First level titles */ + +.odoc-toc>ul>li>a { + font-weight: 500; +} + +.odoc-toc li ul { + margin: 0px; + padding-top: 0.25em; +} + +.odoc-toc ul { + list-style-type: none; +} + +.odoc-toc ul li { + padding: 0.25em 0; +} + +.odoc-toc>ul>li { + margin-bottom: 0.3em; +} + +.odoc-toc ul li li { + border-left: 1px solid var(--toc-list-border); + margin-left: 5px; + padding-left: 12px; +} + +/* Tables */ + +.odoc-table { + margin: 1em; +} + +.odoc-table td, +.odoc-table th { + padding-left: 0.5em; + padding-right: 0.5em; + border: 1px solid black; +} + +.odoc-table th { + font-weight: bold; +} + +/* Mobile adjustements. */ + +@media only screen and (max-width: 110ex) { + body { + margin: 2em; + padding: 0; + } + + body.odoc { + display: block; + } + + .odoc-toc { + position: static; + width: auto; + min-width: unset; + max-width: unset; + border: none; + padding: 0.2em 1em; + border-radius: 5px; + margin-bottom: 2em; + } +} + +/* Print adjustements. */ + +@media print { + body { + color: black; + background: white; + } + + body nav:first-child { + visibility: hidden; + } +} + +/* Source code. */ + +.source_container { + display: flex; +} + +.source_line_column { + padding-right: 0.5em; + text-align: right; + background: #eee8d5; +} + +.source_line { + padding: 0 1em; +} + +.source_code { + flex-grow: 1; + background: #fdf6e3; + padding: 0 0.3em; + color: #657b83; +} + +/* Source directories */ + +.odoc-directory::before { + content: "📁"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-file::before { + content: "📄"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-folder-list { + list-style: none; +} + +/* Syntax highlighting (based on github-gist) */ + +.hljs { + display: block; + background: var(--code-background); + padding: 0.5em; + color: var(--color); + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag { + color: #a71d5d; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: 500; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #795da3; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} + +.VAL, +.TYPE, +.LET, +.REC, +.IN, +.OPEN, +.NONREC, +.MODULE, +.METHOD, +.LETOP, +.INHERIT, +.INCLUDE, +.FUNCTOR, +.EXTERNAL, +.CONSTRAINT, +.ASSERT, +.AND, +.END, +.CLASS, +.STRUCT, +.SIG { + color: #859900; + ; +} + +.WITH, +.WHILE, +.WHEN, +.VIRTUAL, +.TRY, +.TO, +.THEN, +.PRIVATE, +.OF, +.NEW, +.MUTABLE, +.MATCH, +.LAZY, +.IF, +.FUNCTION, +.FUN, +.FOR, +.EXCEPTION, +.ELSE, +.TO, +.DOWNTO, +.DO, +.DONE, +.BEGIN, +.AS { + color: #cb4b16; +} + +.TRUE, +.FALSE { + color: #b58900; +} + +.failwith, +.INT, +.SEMISEMI, +.LIDENT { + color: #2aa198; +} + +.STRING, +.CHAR, +.UIDENT { + color: #b58900; +} + +.DOCSTRING { + color: #268bd2; +} + +.COMMENT { + color: #93a1a1; +} + +/*--------------------------------------------------------------------------- + Copyright (c) 2016 The odoc contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ---------------------------------------------------------------------------*/ \ No newline at end of file diff --git a/odoc.support/odoc_search.js b/odoc.support/odoc_search.js new file mode 100644 index 000000000..0dc659d27 --- /dev/null +++ b/odoc.support/odoc_search.js @@ -0,0 +1,66 @@ +/* The browsers interpretation of the CORS origin policy prevents to run + webworkers from javascript files fetched from the file:// protocol. This hack + is to workaround this restriction. */ +function createWebWorker() { + var searchs = search_urls.map((search_url) => { + let parts = document.location.href.split("/"); + parts[parts.length - 1] = search_url; + return '"' + parts.join("/") + '"'; + }); + blobContents = ["importScripts(" + searchs.join(",") + ");"]; + var blob = new Blob(blobContents, { type: "application/javascript" }); + var blobUrl = URL.createObjectURL(blob); + + var worker = new Worker(blobUrl); + URL.revokeObjectURL(blobUrl); + + return worker; +} + +var worker; +var waiting = 0; + +function wait() { + waiting = waiting + 1; + document.querySelector(".search-snake").classList.add("search-busy"); +} + +function stop_waiting() { + if (waiting > 0) waiting = waiting - 1; + else waiting = 0; + if (waiting == 0) { + document.querySelector(".search-snake").classList.remove("search-busy"); + } +} + +document.querySelector(".search-bar").addEventListener("focus", (ev) => { + if (typeof worker == "undefined") { + worker = createWebWorker(); + worker.onmessage = (e) => { + stop_waiting(); + let results = e.data; + let search_results = document.querySelector(".search-result"); + search_results.innerHTML = ""; + let f = (entry) => { + let search_result = document.createElement("a"); + search_result.classList.add("search-entry"); + search_result.href = base_url + entry.url; + search_result.innerHTML = entry.html; + search_results.appendChild(search_result); + }; + results.forEach(f); + let search_request = document.querySelector(".search-bar").value; + if (results.length == 0 && search_request != "") { + let no_result = document.createElement("div"); + no_result.classList.add("search-no-result"); + no_result.innerText = "No result..."; + search_results.appendChild(no_result); + } + }; + } +}); + +document.querySelector(".search-bar").addEventListener("input", (ev) => { + wait(); + worker.postMessage(ev.target.value); +}); diff --git a/stanc/Analysis_and_optimization/Dataflow_types/index.html b/stanc/Analysis_and_optimization/Dataflow_types/index.html new file mode 100644 index 000000000..0c041d6ea --- /dev/null +++ b/stanc/Analysis_and_optimization/Dataflow_types/index.html @@ -0,0 +1,19 @@ + +Dataflow_types (stanc.Analysis_and_optimization.Dataflow_types)

Module Analysis_and_optimization.Dataflow_types

type label = int

A label is a unique identifier for a node in the dataflow/dependency graph, and often corresponds to one node in the Mir.

val label_of_sexp : Sexplib0.Sexp.t -> label
val sexp_of_label : label -> Sexplib0.Sexp.t
val hash_fold_label : + Ppx_hash_lib.Std.Hash.state -> + label -> + Ppx_hash_lib.Std.Hash.state
val hash_label : label -> Ppx_hash_lib.Std.Hash.hash_value
val compare_label : label -> label -> int
type vexpr =
  1. | VVar of string

Representation of an expression that can be assigned to. This should also be able to represent indexed variables, but we don't support that yet.

val vexpr_of_sexp : Sexplib0.Sexp.t -> vexpr
val sexp_of_vexpr : vexpr -> Sexplib0.Sexp.t
val hash_fold_vexpr : + Ppx_hash_lib.Std.Hash.state -> + vexpr -> + Ppx_hash_lib.Std.Hash.state
val hash_vexpr : vexpr -> Ppx_hash_lib.Std.Hash.hash_value
val compare_vexpr : vexpr -> vexpr -> int
type reaching_defn = vexpr * label

A 'reaching definition' (or reaching_defn or RD) statement (v, l) says that the variable v could have been affected at the label l.

val reaching_defn_of_sexp : Sexplib0.Sexp.t -> reaching_defn
val sexp_of_reaching_defn : reaching_defn -> Sexplib0.Sexp.t
val hash_fold_reaching_defn : + Ppx_hash_lib.Std.Hash.state -> + reaching_defn -> + Ppx_hash_lib.Std.Hash.state
val hash_reaching_defn : reaching_defn -> Ppx_hash_lib.Std.Hash.hash_value
val compare_reaching_defn : reaching_defn -> reaching_defn -> int
type source_loc =
  1. | MirNode of Middle.Location_span.t
  2. | StartOfBlock
  3. | TargetTerm of {
    1. term : Middle.Expr.Typed.t;
    2. assignment_label : label;
    }

Description of where a node in the dependency graph came from, where MirNode is the location from an Middle.loc_stmt

val source_loc_of_sexp : Sexplib0.Sexp.t -> source_loc
val sexp_of_source_loc : source_loc -> Sexplib0.Sexp.t
type 'rd_info node_info = {
  1. rd_sets : 'rd_info;
  2. possible_previous : label Core.Set.Poly.t;
  3. rhs_set : vexpr Core.Set.Poly.t;
  4. controlflow : label Core.Set.Poly.t;
  5. loc : source_loc;
}

Information to be collected about each node * rd_sets: Information about how the label effects the reaching definition sets * possible_previous: The set of nodes that could have immediately preceded this node under some execution of the program * rhs_set: The 'right hand side' set of variables that affect the value or behavior of this node * controlflow: The set of control flow nodes that are immediate parents of this node: * The most recent nested if/then or loop, * or the beginning of the function or block if there are no containing branches, * plus the set of relevant continue/return statements, * plus, for loops, any break statements they contain * loc: The location of the Mir node that this node corresponds to, or a description if there is none

val node_info_of_sexp : + 'rd_info. (Sexplib0.Sexp.t -> 'rd_info) -> + Sexplib0.Sexp.t -> + 'rd_info node_info
val sexp_of_node_info : + 'rd_info. ('rd_info -> Sexplib0.Sexp.t) -> + 'rd_info node_info -> + Sexplib0.Sexp.t
type node_info_update = + (reaching_defn Core.Set.Poly.t -> reaching_defn Core.Set.Poly.t) node_info

A node_info, where the reaching definition information takes the form of an update function that maps from the 'entry' set to the 'exit' set, where the entry set is what's true before executing this node and the exit set is true after.

type node_info_fixedpoint = + (reaching_defn Core.Set.Poly.t * reaching_defn Core.Set.Poly.t) node_info

A node_info where the reaching definition information is explicitly written as the entry and exit sets, as after finding the fixed-point solution.

val node_info_fixedpoint_of_sexp : Sexplib0.Sexp.t -> node_info_fixedpoint
val sexp_of_node_info_fixedpoint : node_info_fixedpoint -> Sexplib0.Sexp.t
type traversal_state = {
  1. label_ix : label;
  2. node_info_map : (int, node_info_update) Core.Map.Poly.t;
  3. possible_previous : label Core.Set.Poly.t;
  4. target_terms : label Core.Set.Poly.t;
  5. continues : label Core.Set.Poly.t;
  6. breaks : label Core.Set.Poly.t;
  7. returns : label Core.Set.Poly.t;
  8. rejects : label Core.Set.Poly.t;
}

The state that will be maintained throughout the traversal of the Mir * label_ix: The next label that's free to use * node_info_map: The label information that's been built so far * possible_previous: The set of nodes that could have immediately preceded this point under some execution of the program * target_terms: The set of nodes that correspond to terms added to the target variable * continues: A set of the continue nodes that have been encountered since exiting a loop * breaks: A set of the break nodes that have been encountered since exiting a loop * returns: A set of the return nodes that have been encountered

type cf_state = label

The most recently nested control flow (block start, if/then, or loop)

This isn't included in the traversal_state because it only flows downward through the tree, not across and up like everything else

type dataflow_graph = {
  1. node_info_map : (int, node_info_fixedpoint) Core.Map.Poly.t;
  2. possible_exits : label Core.Set.Poly.t;
  3. probabilistic_nodes : label Core.Set.Poly.t;
}

Everything we need to know to do dependency analysis * node_info_map: Collection of node information * possible_exits: Set of nodes that could be the last to execute under some execution * probabilistic_nodes: Set of nodes corresponding to which can only introduce probabilistic dependencies, such as target terms and reject statements, to be excluded for non-statistical dependency analysis

val dataflow_graph_of_sexp : Sexplib0.Sexp.t -> dataflow_graph
val sexp_of_dataflow_graph : dataflow_graph -> Sexplib0.Sexp.t
type prog_df_graphs = {
  1. tdatab : dataflow_graph;
  2. modelb : dataflow_graph;
  3. gqb : dataflow_graph;
}

Represents the dataflow graphs for each interesting block in the program MIR.

See Middle.prog for block descriptions.

val prog_df_graphs_of_sexp : Sexplib0.Sexp.t -> prog_df_graphs
val sexp_of_prog_df_graphs : prog_df_graphs -> Sexplib0.Sexp.t
diff --git a/stanc/Analysis_and_optimization/Dataflow_utils/index.html b/stanc/Analysis_and_optimization/Dataflow_utils/index.html new file mode 100644 index 000000000..438556e4c --- /dev/null +++ b/stanc/Analysis_and_optimization/Dataflow_utils/index.html @@ -0,0 +1,48 @@ + +Dataflow_utils (stanc.Analysis_and_optimization.Dataflow_utils)

Module Analysis_and_optimization.Dataflow_utils

val union_maps_left : + ('a, 'b) Core.Map.Poly.t -> + ('a, 'b) Core.Map.Poly.t -> + ('a, 'b) Core.Map.Poly.t

Union maps, preserving the left element in a collision

val build_cf_graphs : + ?flatten_loops:bool -> + ?blocks_after_body:bool -> + (Dataflow_types.label, + (Middle.Expr.Typed.t, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t + * 'm) + Core.Map.Poly.t -> + Dataflow_types.label Core.Set.Poly.t + * (Dataflow_types.label, Dataflow_types.label Core.Set.Poly.t) + Core.Map.Poly.t + * (Dataflow_types.label, Dataflow_types.label Core.Set.Poly.t) + Core.Map.Poly.t

Simultaneously builds the controlflow parent graph, the predecessor graph and the exit set of a statement. It's advantageous to build them together because they both rely on some of the same Break, Continue and Return bookkeeping.

Takes a statement map and returns the triple: (exit set, predecessor graph, controlflow parent graph) where * (exit set, predecessor graph) is the return value of build_predecessor_graph * (controlflow parent graph) is the return value of build_cf_graph

val build_cf_graph : + (Dataflow_types.label, + (Middle.Expr.Typed.t, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t + * 'm) + Core.Map.Poly.t -> + (Dataflow_types.label, Dataflow_types.label Core.Set.Poly.t) Core.Map.Poly.t

Building the controlflow graph requires a traversal with state that includes continues, breaks, returns and the controlflow graph accumulator. The traversal should be a branching traversal with set unions rather than a forward traversal because continue and return statements shouldn't affect other branches of execution.

val build_predecessor_graph : + ?flatten_loops:bool -> + ?blocks_after_body:bool -> + (Dataflow_types.label, + (Middle.Expr.Typed.t, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t + * 'm) + Core.Map.Poly.t -> + Dataflow_types.label Core.Set.Poly.t + * (Dataflow_types.label, Dataflow_types.label Core.Set.Poly.t) + Core.Map.Poly.t

Building the predecessor graph requires a traversal with state that includes the current previous nodes and the predecessor graph accumulator. Special cases are made for loops, because they should include the body exits as predecessors to the body, and they should include loop predecessors in their exit sets. I'm not sure if the single re-traversal of the loop body is sufficient or this requires finding a fixed-point.

val build_recursive_statement : + (('e, 's) Middle.Stmt.Fixed.Pattern.t -> 'm -> 's) -> + (Dataflow_types.label, + ('e, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t * 'm) + Core.Map.Poly.t -> + Dataflow_types.label -> + 's

Build a fixed-point data type representation of a statement given a label-map representation.

val is_ctrl_flow : ('a, 'b) Middle.Stmt.Fixed.Pattern.t -> bool

Check if the statement controls the execution of its substatements.

val merge_set_maps : + ('a, 'b Core.Set.Poly.t) Core.Map.Poly.t -> + ('a, 'b Core.Set.Poly.t) Core.Map.Poly.t -> + ('a, 'b Core.Set.Poly.t) Core.Map.Poly.t

Merge two maps whose values are sets, and union the sets when there's a collision.

val generate_map : + 'a Core.Set.Poly.t -> + f:('a -> 'b) -> + ('a, 'b) Core.Map.Poly.t

Generate a Map by applying a function to each element of a key set.

val build_statement_map : + ('s -> ('e, 's) Middle.Stmt.Fixed.Pattern.t) -> + ('s -> 'm) -> + 's -> + (Dataflow_types.label, + ('e, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t * 'm) + Core.Map.Poly.t

The statement map is built by traversing substatements recursively to replace substatements with their labels while building up the substatements' statement maps. Then, the result is the union of the substatement maps with this statement's singleton pair, which is expressed in terms of the new label-containing statement.

diff --git a/stanc/Analysis_and_optimization/Debug_data_generation/index.html b/stanc/Analysis_and_optimization/Debug_data_generation/index.html new file mode 100644 index 000000000..f3823d0da --- /dev/null +++ b/stanc/Analysis_and_optimization/Debug_data_generation/index.html @@ -0,0 +1,12 @@ + +Debug_data_generation (stanc.Analysis_and_optimization.Debug_data_generation)

Module Analysis_and_optimization.Debug_data_generation

val json_to_mir : + (Middle.Expr.Typed.t Middle.SizedType.t * 'a * string) list -> + Yojson.Basic.t -> + (string, Middle.Expr.Typed.t) Core.Map.Poly.t

Translates Yojson object into a data type that `gen_values_json` understands.

val gen_values_json : + ?new_only:bool -> + ?context:(string, Middle.Expr.Typed.t) Core.Map.Poly.t -> + (Middle.Expr.Typed.t Middle.SizedType.t + * Middle.Expr.Typed.t Middle.Transformation.t + * string) + list -> + (string, Middle.Location_span.t * string) Core.result

Generates values matching the given declarations and formats them as a JSON string. The declarations may depend on additional values supplied in `context`. If `new_only` is true (defaults to false) the output does not include the values in `context`

diff --git a/stanc/Analysis_and_optimization/Dependence_analysis/index.html b/stanc/Analysis_and_optimization/Dependence_analysis/index.html new file mode 100644 index 000000000..1fafb457b --- /dev/null +++ b/stanc/Analysis_and_optimization/Dependence_analysis/index.html @@ -0,0 +1,46 @@ + +Dependence_analysis (stanc.Analysis_and_optimization.Dependence_analysis)

Module Analysis_and_optimization.Dependence_analysis

~~~~~ TODO ~~~~~ * The interfaces are currently messed up. I think part of the solution is to change the signature of reaching_definitions_mfp in Monotone_framework, which currently requires the full program but shouldn't need the full program. As it stands, stmt_map_dependency_graph does not include data dependencies at all, since it can't use reaching deps, and prog_dependency graph only builds the graph for log_prob, but the user isn't guaranteed to be using the same labeling scheme. * Currently, dependencies on global or uninitialized data are written as depending on node '0'. This should probably be option or some type that indicates global dependence. * Indexed variables are currently handled as monoliths * No probabilistic dependency, I'll do that elsewhere *

type node_dep_info = {
  1. predecessors : Dataflow_types.label Core.Set.Poly.t;
  2. parents : Dataflow_types.label Core.Set.Poly.t;
  3. reaching_defn_entry : Dataflow_types.reaching_defn Core.Set.Poly.t;
  4. reaching_defn_exit : Dataflow_types.reaching_defn Core.Set.Poly.t;
  5. meta : Middle.Location_span.t;
}

Sufficient information about each node to build the dependency graph.

Label dependence doesn't need the exit RD set, but variable dependence does.

val node_immediate_dependencies : + (Dataflow_types.label, + (Middle.Expr.Typed.t, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t + * node_dep_info) + Core.Map.Poly.t -> + ?blockers:Dataflow_types.vexpr Core.Set.Poly.t -> + Dataflow_types.label -> + Dataflow_types.label Core.Set.Poly.t

Given dependency information for each node, find the 'immediate' dependencies of a node, where 'immediate' means the first-degree control flow parents and the reachable definitions of RHS variables.

Given dependency information for each node, find all of the dependencies of a single node.

val node_vars_dependencies : + (Dataflow_types.label, + (Middle.Expr.Typed.t, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t + * node_dep_info) + Core.Map.Poly.t -> + ?blockers:Dataflow_types.vexpr Core.Set.Poly.t -> + Dataflow_types.vexpr Core.Set.Poly.t -> + Dataflow_types.label -> + Dataflow_types.label Core.Set.Poly.t

Given dependency information for each node, find all of the dependencies of a set of variables at single node.

'blockers' are variables which will not be traversed.

Build the dependency information for each node in the log_prob section of a program

Build the dependency information for each node in the log_prob section of a program

val all_node_dependencies : + (Dataflow_types.label, + (Middle.Expr.Typed.t, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t + * node_dep_info) + Core.Map.Poly.t -> + (Dataflow_types.label, Dataflow_types.label Core.Set.Poly.t) Core.Map.Poly.t

Given dependency information for each node, find all of the dependencies of all nodes, effectively building the dependency graph.

This is more efficient than calling node_dependencies on each node individually.

val log_prob_dependency_graph : + Middle.Program.Typed.t -> + (Dataflow_types.label, Dataflow_types.label Core.Set.Poly.t) Core.Map.Poly.t

Build the dependency graph for the log_prob section of a program, where labels correspond to the labels built by statement_map.

val reaching_defn_lookup : + Dataflow_types.reaching_defn Core.Set.Poly.t -> + Dataflow_types.vexpr -> + Dataflow_types.label Core.Set.Poly.t
val mir_uninitialized_variables : + Middle.Program.Typed.t -> + (Middle.Location_span.t * string) Core.Set.Poly.t

Produce a list of uninitialized variables and their label locations, from the flowgraph starting at the given statement

diff --git a/stanc/Analysis_and_optimization/Factor_graph/index.html b/stanc/Analysis_and_optimization/Factor_graph/index.html new file mode 100644 index 000000000..feba72d6a --- /dev/null +++ b/stanc/Analysis_and_optimization/Factor_graph/index.html @@ -0,0 +1,56 @@ + +Factor_graph (stanc.Analysis_and_optimization.Factor_graph)

Module Analysis_and_optimization.Factor_graph

type factor =
  1. | TargetTerm of Middle.Expr.Typed.t
  2. | Reject
  3. | LPFunction of string * Middle.Expr.Typed.t list
val factor_of_sexp : Sexplib0.Sexp.t -> factor
val sexp_of_factor : factor -> Sexplib0.Sexp.t
val hash_fold_factor : + Ppx_hash_lib.Std.Hash.state -> + factor -> + Ppx_hash_lib.Std.Hash.state
val hash_factor : factor -> Ppx_hash_lib.Std.Hash.hash_value
val compare_factor : factor -> factor -> int
type factor_graph = {
  1. factor_map : (factor * Dataflow_types.label, + Dataflow_types.vexpr Core.Set.Poly.t) + Core.Map.Poly.t;
  2. var_map : (Dataflow_types.vexpr, + (factor * Dataflow_types.label) Core.Set.Poly.t) + Core.Map.Poly.t;
}
val factor_graph_of_sexp : Sexplib0.Sexp.t -> factor_graph
val sexp_of_factor_graph : factor_graph -> Sexplib0.Sexp.t
val compare_factor_graph : factor_graph -> factor_graph -> int
val extract_factors_statement : + (Middle.Expr.Typed.t, 'a) Middle.Stmt.Fixed.Pattern.t -> + factor list
val extract_factors : + ('a, (Middle.Expr.Typed.t, 'b) Middle.Stmt.Fixed.Pattern.t * 'c) + Core.Map.Poly.t -> + 'd -> + ('e * factor) list
val factor_rhs : factor -> Dataflow_types.vexpr Core.Set.Poly.t
val factor_var_dependencies : + (Dataflow_types.label, + (Middle.Expr.Typed.t, Dataflow_types.label) Middle.Stmt.Fixed.Pattern.t + * Dependence_analysis.node_dep_info) + Core.Map.Poly.t -> + Dataflow_types.vexpr Core.Set.Poly.t -> + (Dataflow_types.label * factor) -> + (Dataflow_types.vexpr, Core__.Comparator.Poly.comparator_witness) Core.Set.t
val build_adjacency_maps : + (Dataflow_types.label * factor * Dataflow_types.vexpr Core.Set.Poly.t) + Core.List.t -> + factor_graph

Helper function to generate the factor graph adjacency map representation from a factor-adjacency list

val fg_remove_fac : + (factor * Dataflow_types.cf_state) -> + factor_graph -> + factor_graph
val remove_touching : + Dataflow_types.vexpr Core.Set.Poly.t -> + factor_graph -> + factor_graph
val prog_factor_graph : + ?exclude_data_facs:bool -> + Middle.Program.Typed.t -> + factor_graph

Build a factor graph from prog.log_prob using dependency analysis

val fg_reaches : + Dataflow_types.vexpr Core.Set.Poly.t -> + Dataflow_types.vexpr Core.Set.Poly.t -> + factor_graph -> + bool

BFS on 'fg' with initial frontier 'starts' and terminating at any element of 'goals'

val fg_factor_reaches : + (factor * Dataflow_types.label) -> + Dataflow_types.vexpr Core.Set.Poly.t -> + factor_graph -> + bool
val fg_factor_is_prior : + Dataflow_types.vexpr -> + (factor * Dataflow_types.label) -> + Dataflow_types.vexpr Core.Set.Poly.t -> + factor_graph -> + bool
val fg_var_priors : + Dataflow_types.vexpr -> + Dataflow_types.vexpr Core.Set.Poly.t -> + factor_graph -> + (factor * Dataflow_types.label) Core.Set.Poly.t option

Priors of V are neighbors of V which have no connection to any data except though V So for graph G and each parameter V: G' = G\V; For each neighbor F: Use BFS starting from F in G' and search for any data, if there is none, F is a prior

val list_priors : + ?factor_graph:factor_graph option -> + Middle.Program.Typed.t -> + (Dataflow_types.vexpr, + (factor * Dataflow_types.label) Core.Set.Poly.t option) + Core.Map.Poly.t
val string_of_factor : factor -> string
val string_of_vexpr : Dataflow_types.vexpr -> string
val factor_graph_to_dot : factor_graph -> string

Utility to print a factor graph to the Graphviz dot language for visualization

diff --git a/stanc/Analysis_and_optimization/Memory_patterns/index.html b/stanc/Analysis_and_optimization/Memory_patterns/index.html new file mode 100644 index 000000000..7d91b31e7 --- /dev/null +++ b/stanc/Analysis_and_optimization/Memory_patterns/index.html @@ -0,0 +1,60 @@ + +Memory_patterns (stanc.Analysis_and_optimization.Memory_patterns)

Module Analysis_and_optimization.Memory_patterns

Return a Var expression of the name for each type containing an eigen matrix

val query_var_eigen_names : Middle.Expr.Typed.t -> string Core.Set.Poly.t

Return a set of all types containing autodiffable Eigen matrices in an expression.

val is_nonzero_subset : + set:('a, 'b) Core.Set.t -> + subset:('a, 'b) Core.Set.t -> + bool

Check whether one set is a nonzero subset of another set.

val count_single_idx : int -> Middle.Expr.Typed.t Middle.Index.t -> int

Check an Index to count how many times we see a single index.

  • parameter acc

    An accumulator from previous folds of multiple expressions.

  • parameter idx

    An Index to match. For Single types this adds 1 to the acc. For Upfrom and MultiIndex types we check the inner expression for a Single index. All and Between cannot be Single cell access and so pass acc along.

val is_uni_eigen_loop_indexing : + bool -> + Middle.UnsizedType.t -> + Middle.Expr.Typed.t Middle.Index.t list -> + bool

Find indices on Matrix and Vector types that perform single cell access. Returns true if it finds a vector, row vector, matrix, or matrix with single cell access as well as an array of any of the above that is accessing the inner matrix types cell.

  • parameter ut

    An UnsizedType to match against.

  • parameter index

    This list is checked for Single cell access either at the top level or within the Index types of the list.

val query_stan_math_mem_pattern_support : + string -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + bool
val is_fun_soa_supported : string -> Middle.Expr.Typed.t list -> bool
val query_initial_demotable_expr : + bool -> + acc:string Core.Set.Poly.t -> + Middle.Expr.Typed.t -> + string Core.Set.Poly.t

Query to find the initial set of objects that cannot be SoA. This is mostly recursing over expressions, with the exceptions being functions and indexing expressions. For the logic on functions see the docs for query_initial_demotable_funs.

  • parameter in_loop

    a boolean to signify if the expression exists inside of a loop. If so, the names of matrix and vector like objects will be returned if the matrix or vector is accessed by single cell indexing.

val query_initial_demotable_funs : + bool -> + string Core.Set.Poly.t -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Middle.Fun_kind.t -> + Middle.Expr.Typed.t list -> + string Core.Set.Poly.t

Query a function to detect if it or any of its used expression's objects or expressions should be demoted to AoS. * The logic here demotes the expressions in a function to AoS if the function's inner expression returns has a meta type containing a matrix and either of : (1) The function is user defined and the UDFs inputs are matrices. (2) The Stan math function cannot support AoS

  • parameter in_loop

    A boolean to specify the logic of indexing expressions. See query_initial_demotable_expr for an explanation of the logic.

  • parameter kind

    The function type, for StanLib functions we check if the function supports SoA and for UserDefined functions we always fail and return back all of the names of the objects passed in expressions to the UDF. exprs The expression list passed to the functions.

val extract_nonderived_admatrix_types : + Middle.Expr.Typed.t -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list

* Recurse through subexpressions and return a list of Unsized types. * Recursion continues until * 1. A non-autodiffable type is found * 2. An autodiffable scalar is found * 3. A `Var` type is found that is an autodiffable matrix

* Recurse through functions to find nonderived ad matrix types. * Special cases for StanLib functions are for * - `check_matching_dims`: compiler function that has no effect on optimization * - `rep_*vector` These are templated in the C++ to cast up to `Var<Matrix>` types * - `rep_matrix`. When it's only a scalar being propogated an math library overload can upcast to `Var<Matrix>`

val contains_at_least_one_ad_matrix_or_all_data : + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + bool

Checks if a list of types contains at least on ad matrix or if everything is derived from data

val query_initial_demotable_stmt : + bool -> + string Core.Set.Poly.t -> + (Middle.Expr.Typed.Meta.t, Middle.Stmt.Located.Meta.t) Middle.Stmt.Fixed.t -> + string Core.Set.Poly.t

Query to find the initial set of objects in statements that cannot be SoA. This is mostly recursive over expressions and statements, with the exception of functions and Assignments. * For assignments: We demote the LHS variable if any of the following are true: 1. A single cell of the LHS is being assigned within a loop. 2. The top level expression on the RHS is a combination of only data matrices and scalar types. Operations on data matrix and scalar values in Stan math will return a AoS matrix. We currently have no way to tell Stan math to return a SoA matrix. 3. None of the RHS's functions are able to accept SoA matrices and the rhs is not an internal compiler function. * We demote RHS variables if any of the following are true: 1. The LHS variable has previously or through this iteration been marked AoS. 2. The LHS is a tuple projection * For functions see the documentation for query_initial_demotable_funs for the logic on demotion rules.

  • parameter in_loop

    A boolean to specify the logic of indexing expressions. See query_initial_demotable_expr for an explanation of the logic.

val query_demotable_stmt : + string Core.Set.Poly.t -> + (Middle.Expr.Typed.t, int) Middle.Stmt.Fixed.Pattern.t -> + string Core.Set.Poly.t

Look through a statement to see whether the objects used in it need to be modified from SoA to AoS. Returns the set of object names that need demoted in a statement, if any. This function looks at Assignment statements, and returns back the set of top level object names given: 1. If the name of the lhs assignee is in the aos_exits, all the names of the expressions with a type containing a matrix are returned. 2. If the names of the rhs objects containing matrix types are in the subset of aos_exits.

  • parameter aos_exits

    A set of variables that can be demoted.

  • parameter pattern

    The Stmt pattern to query.

val modify_kind : + ?force_demotion:bool -> + string Core.Set.Poly.t -> + Middle.Expr.Typed.t Middle.Fun_kind.t -> + Middle.Expr.Typed.t list -> + Middle.Expr.Typed.t Middle.Fun_kind.t * Middle.Expr.Typed.t list

Modify a function and it's subexpressions from SoA <-> AoS and vice versa. This performs demotion for sub expressions recursively. The top level expression and it's sub expressions are demoted to SoA if 1. The names of the variables in the subexpressions returning objects holding matrices are all in the modifiable set. 2. The function does not support SoA 3. The force argument is true

  • parameter force_demotion

    If true, forces an expression and it's sub-expressions to be AoS.

  • parameter modifiable_set

    The set of names that are either demotable to AoS or promotable to SoA.

  • parameter kind

    A Fun_kind.t

  • parameter exprs

    A list of expressions going into the function. *

val modify_expr_pattern : + ?force_demotion:bool -> + string Core.Set.Poly.t -> + Middle.Expr.Typed.t Middle.Expr.Fixed.Pattern.t -> + Middle.Expr.Typed.t Middle.Expr.Fixed.Pattern.t

Modify an expression and it's subexpressions from SoA <-> AoS and vice versa. The only real paths in the below is on the functions and ternary expressions. * The logic for functions is defined in modify_kind. TernaryIf is forcefully demoted to AoS if the type of the expression contains a matrix.

  • parameter force_demotion

    If true, forces an expression and it's sub-expressions to be AoS.

  • parameter modifiable_set

    The name of the variables whose associated expressions we want to modify.

  • parameter pattern

    The expression to modify.

val modify_expr : + ?force_demotion:bool -> + string Core.Set.Poly.t -> + Middle.Expr.Typed.t -> + Middle.Expr.Typed.t

Given a Set of strings containing the names of objects that can be modified from AoS <-> SoA and vice versa, modify them within the expression.

  • parameter mem_pattern

    The memory pattern to change expressions to.

  • parameter modifiable_set

    The name of the variables whose associated expressions we want to modify.

  • parameter expr

    the expression to modify.

Modify statement patterns in the MIR from AoS <-> SoA and vice versa For Decl and Assignment's reading in parameters, we demote to AoS if the decl_id (or assign name) is in the modifiable set and otherwise promote the statement to SoA. For general Assignment statements, we check if the assignee is in the demotable set. If so, we force demotion of all of the rhs expressions. All other statements recurse over their statements and expressions. *

  • parameter pattern

    The statement pattern to modify

  • parameter modifiable_set

    The name of the variable we are searching for.

val modify_stmt : + Middle.Stmt.Located.t -> + string Core.Set.Poly.t -> + Middle.Stmt.Located.t

Modify statement patterns in the MIR from AoS <-> SoA and vice versa

  • parameter mem_pattern

    A mem_pattern to modify expressions to. For the given memory pattern, this modifies statement patterns and expressions to it.

  • parameter stmt

    The statement to modify.

  • parameter modifiable_set

    The name of the variable we are searching for.

val collect_mem_pattern_variables : + Middle.Stmt.Located.t Core.List.t -> + (string + * Middle.Expr.Typed.Meta.t Middle.Stmt.Fixed.First.t Middle.SizedType.t) + list
val pp_mem_patterns : Stdlib.Format.formatter -> Middle.Program.Typed.t -> unit
diff --git a/stanc/Analysis_and_optimization/Mir_utils/index.html b/stanc/Analysis_and_optimization/Mir_utils/index.html new file mode 100644 index 000000000..7bfb64ec1 --- /dev/null +++ b/stanc/Analysis_and_optimization/Mir_utils/index.html @@ -0,0 +1,104 @@ + +Mir_utils (stanc.Analysis_and_optimization.Mir_utils)

Module Analysis_and_optimization.Mir_utils

val var_declarations : ('a, 'b) Middle.Stmt.Fixed.t -> string Core.Set.Poly.t
val num_expr_value : Middle.Expr.Typed.t -> (float * string) option
type bound_values = {
  1. lower : [ `None | `Nonlit | `Lit of float ];
  2. upper : [ `None | `Nonlit | `Lit of float ];
}
val chop_dist_name : string -> string Core.Option.t
val top_var_declarations : Middle.Stmt.Located.t -> string Core.Set.Poly.t
val data_set : + ?exclude_transformed:bool -> + ?exclude_ints:bool -> + Middle.Program.Typed.t -> + string Core.Set.Poly.t
val parameter_set : + ?include_transformed:bool -> + Middle.Program.Typed.t -> + (string * Middle.Expr.Typed.t Middle.Transformation.t) Core.Set.Poly.t
val parameter_names_set : + ?include_transformed:bool -> + Middle.Program.Typed.t -> + string Core.Set.Poly.t
val fold_expr : + take_expr:('c -> Middle.Expr.Typed.t -> 'c) -> + init:'c -> + Middle.Expr.Typed.t -> + 'c
val fold_stmts : + take_expr:('c -> Middle.Expr.Typed.t -> 'c) -> + take_stmt:('c -> Middle.Stmt.Located.t -> 'c) -> + init:'c -> + Middle.Stmt.Located.t Core.List.t -> + 'c
val stmt_loc_of_stmt_loc_num : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + Middle.Stmt.Located.Non_recursive.t -> + Middle.Stmt.Located.t
val statement_stmt_loc_of_statement_stmt_loc_num : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (Middle.Expr.Typed.t, int) Middle.Stmt.Fixed.Pattern.t -> + (Middle.Expr.Typed.t, Middle.Stmt.Located.t) Middle.Stmt.Fixed.Pattern.t
val unnumbered_prog_of_numbered_prog : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + ('a -> 'b) -> + (Middle.Stmt.Located.Non_recursive.t, 'a, 'c) Middle.Program.t -> + (Middle.Stmt.Located.t, 'b, 'c) Middle.Program.t
val fwd_traverse_statement : + ('e, 'a) Middle.Stmt.Fixed.Pattern.t -> + init:'f -> + f:('f -> 'a -> 'f * 'c) -> + 'f * ('e, 'c) Middle.Stmt.Fixed.Pattern.t

A traversal that simultaneously accumulates a state (type 'f) and replaces the substatement values from ('a to 'c). Traversal is done in-order but ignores branching, e.g., and if's then block is followed by the else block rather than branching.

val vexpr_of_expr_exn : Middle.Expr.Typed.t -> Dataflow_types.vexpr

Take a LHS expression from a general expression, throwing an exception if it can't be a LHS expression.

val expr_var_set : + Middle.Expr.Typed.t -> + (Dataflow_types.vexpr * Middle.Expr.Typed.Meta.t) Core.Set.Poly.t

The set of variables in an expression, including inside an index. For use in RHS sets, not LHS assignment sets, except in a target term.

The set of variables in an index. For use in RHS sets, not LHS assignment sets, except in a target term

val expr_var_names_set : Middle.Expr.Typed.t -> string Core.Set.Poly.t

Return the names of the variables in an expression.

val stmt_rhs : + (Middle.Expr.Typed.t, 's) Middle.Stmt.Fixed.Pattern.t -> + Middle.Expr.Typed.t Core.Set.Poly.t

The set of variables that can affect the value or behavior of the expression, i.e. rhs. Using Set.Poly instead of ExprSet so that 'e can be polymorphic, it usually doesn't matter if there's duplication.

val union_map : + 'a Core.Set.Poly.t -> + f:('a -> 'b Core.Set.Poly.t) -> + 'b Core.Set.Poly.t

This is a helper function equivalent to List.concat_map but for Sets

The set of variables in an expression, including inside an index. For use in RHS sets, not LHS assignment sets, except in a target term.

val expr_assigned_var : Middle.Expr.Typed.t -> Dataflow_types.vexpr

The variable being assigned to when the expression is the LHS

val summation_terms : Middle.Expr.Typed.t -> Middle.Expr.Typed.t list

The list of terms in expression separated by a +

val subst_expr : + (string, Middle.Expr.Typed.t) Core.Map.Poly.t -> + Middle.Expr.Typed.t -> + Middle.Expr.Typed.t

Substitute variables in an expression according to the provided Map.

val subst_stmt_base : + (string, Middle.Expr.Typed.t) Core.Map.Poly.t -> + (Middle.Expr.Typed.t, 'a) Middle.Stmt.Fixed.Pattern.t -> + (Middle.Expr.Typed.t, 'a) Middle.Stmt.Fixed.Pattern.t

Substitute variables occurring at the top level in statements according to the provided Map.

val subst_stmt : + (string, Middle.Expr.Typed.t) Core.Map.Poly.t -> + Middle.Stmt.Located.t -> + Middle.Stmt.Located.t

Substitute variables occurring anywhere in a statement according to the provided Map.

val name_subst_stmt : + (string, string) Core.Map.Poly.t -> + Middle.Stmt.Located.t -> + Middle.Stmt.Located.t

Substitute subexpressions occurring anywhere in a statement according to the provided Map.

Substitute subexpressions in an expression according to the provided Map, trying to match on larger subexpressions before smaller ones.

Substitute subexpressions occurring at the top level in statements according to the provided Map.

val expr_depth : Middle.Expr.Typed.t -> int

Calculate how deeply nested an expression is.

val update_expr_ad_levels : + string Core.Set.Poly.t -> + Middle.Expr.Typed.t -> + Middle.Expr.Typed.t

Recompute all AD-levels in the metadata of an expression from the bottom up, making the variables in the first argument autodiffable

val cleanup_empty_stmts : + ('e, 's) Middle.Stmt.Fixed.t list -> + ('e, 's) Middle.Stmt.Fixed.t list
val unsafe_unsized_to_sized_type : + Middle.Expr.Typed.t Middle.Type.t -> + Middle.Expr.Typed.t Middle.Type.t
diff --git a/stanc/Analysis_and_optimization/Monotone_framework/index.html b/stanc/Analysis_and_optimization/Monotone_framework/index.html new file mode 100644 index 000000000..ad273bbdc --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework/index.html @@ -0,0 +1,279 @@ + +Monotone_framework (stanc.Analysis_and_optimization.Monotone_framework)

Module Analysis_and_optimization.Monotone_framework

The common elements of a monotone framework

val print_mfp : + ('a -> Core__.Import.string) -> + (int, ('a, 'b) Core__Set.t Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + unit

Debugging tool to print out MFP sets *

val free_vars_expr : Middle.Expr.Typed.t -> string Core.Set.Poly.t

Calculate the free (non-bound) variables in an expression

val free_vars_idx : + Middle.Expr.Typed.t Middle.Index.t -> + string Core.Set.Poly.t

Calculate the free (non-bound) variables in an index

val free_vars_fnapp : + Middle.Expr.Typed.t Middle.Fun_kind.t -> + Middle.Expr.Typed.t Base__List.t -> + string Core.Set.Poly.t
val free_vars_lval : + Middle.Expr.Typed.t Middle.Stmt.Fixed.Pattern.lvalue -> + string Core.Set.Poly.t
val free_vars_stmt : + (Middle.Expr.Typed.t, Middle.Stmt.Located.t) Middle.Stmt.Fixed.Pattern.t -> + string Core.Set.Poly.t

Calculate the free (non-bound) variables in a statement

val top_free_vars_stmt : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (Middle.Expr.Typed.t, int) Middle.Stmt.Fixed.Pattern.t -> + string Core.Set.Poly.t

A variation on free_vars_stmt, where we do not recursively count free variables in sub statements

val inverse_flowgraph_of_stmt : + ?flatten_loops:bool -> + ?blocks_after_body:bool -> + Middle.Stmt.Located.t -> + (module Monotone_framework_sigs.FLOWGRAPH + with type labels = int) + * (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t

Compute the inverse flowgraph of a Stan statement (for reverse analyses)

val reverse : + (module Monotone_framework_sigs.FLOWGRAPH with type labels = 'l) -> + (module Monotone_framework_sigs.FLOWGRAPH + with type labels = 'l0)

Reverse flowgraphs to be used for reverse analyses. Observe that this respects the invariants listed for a FLOWGRAPH

val make_circular_flowgraph : + (module Monotone_framework_sigs.FLOWGRAPH with type labels = 'l) -> + (module Monotone_framework_sigs.FLOWGRAPH with type labels = 'l0) -> + (module Monotone_framework_sigs.FLOWGRAPH + with type labels = 'l1)

Modify the end nodes of a flowgraph to depend on its inits To force the monotone framework to run until the program never changes this function modifies the input Flowgraph so that it's end nodes depend on it's initial nodes. The inits of the reverse flowgraph are used for this since we normally have both the forward and reverse flowgraphs available.

  • parameter l

    Type of the label for each flowgraph, most commonly an int

  • parameter Flowgraph

    The flowgraph to modify

  • parameter RevFlowgraph

    The same flowgraph as Flowgraph but reversed. *

val forward_flowgraph_of_stmt : + ?flatten_loops:bool -> + ?blocks_after_body:bool -> + Middle.Stmt.Located.t -> + (module Monotone_framework_sigs.FLOWGRAPH + with type labels = int) + * (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t

Compute the forward flowgraph of a Stan statement (for forward analyses)

val powerset_lattice : + (module Monotone_framework_sigs.INITIALTYPE with type vals = 'v) -> + (module Monotone_framework_sigs.LATTICE + with type properties = 'v0 Core.Set.Poly.t)

The lattice of sets of some values, with the inclusion order, set union and the empty set

val dual_powerset_lattice : + (module Monotone_framework_sigs.INITIALTOTALTYPE with type vals = 'v) -> + (module Monotone_framework_sigs.LATTICE + with type properties = 'v0 Core.Set.Poly.t)

The lattice of subsets of some set, with the inverse inclusion order, set intersection and the total set

val powerset_lattice_expressions : + Middle.Expr.Typed.Set.t -> + (module Monotone_framework_sigs.LATTICE + with type properties = Middle.Expr.Typed.Set.t)
val dual_powerset_lattice_expressions : + Middle.Expr.Typed.Set.t -> + Middle.Expr.Typed.Set.t -> + (module Monotone_framework_sigs.LATTICE + with type properties = Middle.Expr.Typed.Set.t)
val new_bot : + (module Monotone_framework_sigs.LATTICE_NO_BOT with type properties = 'p) -> + (module Monotone_framework_sigs.LATTICE + with type properties = 'p0 option)

Add a fresh bottom element to a lattice (possibly without bottom)

val dual_partial_function_lattice : + (module Monotone_framework_sigs.TOTALTYPE with type vals = 'dv) -> + (module Monotone_framework_sigs.TYPE with type vals = 'cv) -> + (module Monotone_framework_sigs.LATTICE_NO_BOT + with type properties = ('dv0, 'cv0) Core.Map.Poly.t)

The lattice (without bottom) of partial functions, ordered under inverse graph inclusion, with intersection

val dual_partial_function_lattice_with_bot : + (module Monotone_framework_sigs.TOTALTYPE with type vals = 'dv) -> + (module Monotone_framework_sigs.TYPE with type vals = 'cv) -> + (module Monotone_framework_sigs.LATTICE + with type properties = ('dv0, 'cv0) Core.Map.Poly.t option)

The lattice of partial functions, where we add a fresh bottom element, to represent an inconsistent combination of functions

val dual_powerset_lattice_empty_initial : + (module Monotone_framework_sigs.TOTALTYPE with type vals = 'v) -> + (module Monotone_framework_sigs.LATTICE + with type properties = 'v0 Core.Set.Poly.t)

A dual powerset lattice, where we set the initial set to be empty

val powerset_lattice_empty_initial : + (module Monotone_framework_sigs.TYPE with type vals = 'v) -> + (module Monotone_framework_sigs.LATTICE + with type properties = 'v0 Core.Set.Poly.t)

A powerset lattice, where we set the initial set to be empty

val reaching_definitions_lattice : + (module Monotone_framework_sigs.INITIALTYPE with type vals = 'v) -> + (module Monotone_framework_sigs.TYPE with type vals = 'l) -> + (module Monotone_framework_sigs.LATTICE + with type properties = ('v0 * 'l0 option) Core.Set.Poly.t)

The specific powerset lattice we use for reaching definitions analysis

val minimal_variables_lattice : + string Core.Set.Poly.t -> + (module Monotone_framework_sigs.LATTICE + with type properties = string Core.Set.Poly.t)

Lattice for finding the smallest set that satisfies some criterion

val constant_propagation_transfer : + ?preserve_stability:bool -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = (string, Middle.Expr.Typed.t) Core.Map.Poly.t option)
val label_top_decls : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + int -> + string Core.Set.Poly.t
val expression_propagation_transfer : + ?preserve_stability:bool -> + (Middle.Expr.Typed.t -> bool) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = (string, Middle.Expr.Typed.t) Core.Map.Poly.t option)

The transfer function for an expression propagation analysis, AKA forward substitution (see page 396 of Muchnick)

val copy_propagation_transfer : + string Core.Set.Poly.t -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = (string, Middle.Expr.Typed.t) Core.Map.Poly.t option)

The transfer function for a copy propagation analysis

val transfer_gen_kill : + ('a, 'b) Core.Set.t -> + ('c, 'd) Core.Set.t -> + ('a, 'b) Core.Set.t -> + ('c, 'd) Core.Set.t

A helper function for building transfer functions from gen and kill sets

val assigned_vars_stmt : + (Middle.Expr.Typed.t, 'a) Middle.Stmt.Fixed.Pattern.t -> + string Core.Set.Poly.t

Calculate the set of variables that a statement can assign to

val declared_vars_stmt : + (Middle.Expr.Typed.t, 'a) Middle.Stmt.Fixed.Pattern.t -> + string Core.Set.Poly.t

Calculate the set of variables that a statement can declare

val assigned_or_declared_vars_stmt : + (Middle.Expr.Typed.t, 'a) Middle.Stmt.Fixed.Pattern.t -> + (string, Core__.Comparator.Poly.comparator_witness) Core.Set.t

Calculate the set of variables that a statement can assign to or declare

val reaching_definitions_transfer : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = (string * int option) Core.Set.Poly.t)

The transfer function for a reaching definitions analysis

val initialized_vars_transfer : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = string Core.Set.Poly.t)

The transfer function for an initialized variables analysis

val live_variables_transfer : + string Core.Set.Poly.t -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = string Core.Set.Poly.t)

The transfer function for a live variables analysis

Calculate the set of sub-expressions of an expression

val used_expressions_expr : + Middle.Expr.Typed.Set.Elt.t -> + Middle.Expr.Typed.Set.t

Calculate the set of expressions of an expression

Calculate the set of sub-expressions in a statement

Calculate the set of expressions in a statement

Calculate the set of sub-expressions at the top level in a statement

Calculate the set of expressions at the top level in a statement

Calculate the subset (of p) of expressions that will need to be recomputed as a consequence of evaluating the statement s (because of writes to variables performed by s)

val used : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (int, + (Middle.Expr.Typed.Set.Elt.t, Middle.Expr.Typed.Set.Elt.comparator_witness) + Core.Set.t) + Core.Map.Poly.t

Calculate the set of subexpressions that needs to be computed at each node in the flowgraph

val anticipated_expressions_transfer : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = Middle.Expr.Typed.Set.t)

The transfer function for an anticipated expressions analysis (as a part of lazy code motion)

val transfer_gen_kill_alt : + ('a, 'b) Core.Set.t -> + ('a, 'b) Core.Set.t -> + ('c, 'd) Core.Set.t -> + ('c, 'd) Core.Set.t

A helper function for defining transfer functions in terms of gen and kill sets in an alternative way, that is used in some of the subanalyses of lazy code motion

val available_expressions_transfer : + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = Middle.Expr.Typed.Set.t)

An available expressions analysis, to be used in lazy code motion

val earliest : + (int, Middle.Expr.Typed.Set.t Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t -> + (int, + (Middle.Expr.Typed.Set.Elt.t, Middle.Expr.Typed.Set.Elt.comparator_witness) + Core.Set.t) + Core.Map.Poly.t

Calculates the set of expressions that can be calculated for the first time at each node in the flow graph

val postponable_expressions_transfer : + (int, Middle.Expr.Typed.Set.t) Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = Middle.Expr.Typed.Set.t)

The transfer function for a postponable expressions analysis (as a part of lazy code motion)

val latest : + (int, int Core.Set.Poly.t) Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t) Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t) Core.Map.Poly.t -> + (int, + (Middle.Expr.Typed.Set.Elt.t, Middle.Expr.Typed.Set.Elt.comparator_witness) + Core.Set.t) + Core.Map.Poly.t

Calculates the set of expressions that can be computed at the latest at each node

val used_not_latest_expressions_transfer : + (int, Middle.Expr.Typed.Set.t) Core.Map.Poly.t -> + (int, Middle.Expr.Typed.Set.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = Middle.Expr.Typed.Set.t)

The transfer function for a used-not-latest expressions analysis, as a part of lazy code motion

val minimal_variables_fwd_transfer : + ((int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + int -> + string Core.Set.Poly.t -> + string Core.Set.Poly.t) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = string Core.Set.Poly.t)

The transfer function for the first forward analysis part of determining optimal ad-levels for variables

val monotone_framework : + (module Monotone_framework_sigs.FLOWGRAPH with type labels = 'l) -> + (module Monotone_framework_sigs.LATTICE with type properties = 'p) -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = 'l0 + and type properties = 'p0) -> + (module Monotone_framework_sigs.MONOTONE_FRAMEWORK + with type labels = 'l1 + and type properties = 'p1)

The central definition of a monotone dataflow analysis framework. Given a compatible flowgraph, lattice and transfer function, we can run the mfp (maximal fixed point) algorithm, which computes a maximal fixed point (MFP) for the set of equations/inequalities of properties at the entry and exit of each node in the flow graph, as defined by the triple. Note that this gives a safe approximation to the MOP (meet over all paths) solution that we would really be interested in, but which is often incomputable. In case of a distributive lattice of properties, the MFP and MOP solutions coincide.

val declared_variables_stmt : + (Middle.Expr.Typed.t, Middle.Stmt.Located.t) Middle.Stmt.Fixed.Pattern.t -> + string Core.Set.Poly.t
val propagation_mfp : + Middle.Program.Typed.t -> + (module Monotone_framework_sigs.FLOWGRAPH with type labels = int) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + ((int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (module Monotone_framework_sigs.TRANSFER_FUNCTION + with type labels = int + and type properties = (string, Middle.Expr.Typed.t) Core.Map.Poly.t option)) -> + (int, + (string, Middle.Expr.Typed.t) Core.Map.Poly.t option + Analysis_and_optimization__Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t
val reaching_definitions_mfp : + Middle.Program.Typed.t -> + (module Monotone_framework_sigs.FLOWGRAPH with type labels = int) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (int, + (string * int option) Core.Set.Poly.t + Analysis_and_optimization__Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t
val initialized_vars_mfp : + string Core.Set.Poly.t -> + (module Monotone_framework_sigs.FLOWGRAPH with type labels = int) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (int, + string Core.Set.Poly.t + Analysis_and_optimization__Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t
val globals : Middle.Program.Typed.t -> string Core.Set.Poly.t
val live_variables_mfp : + Middle.Program.Typed.t -> + (module Monotone_framework_sigs.FLOWGRAPH with type labels = int) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (int, + string Core.Set.Poly.t + Analysis_and_optimization__Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t

Monotone framework instance for live_variables analysis. Expects reverse flowgraph.

val lazy_expressions_mfp : + (module Monotone_framework_sigs.FLOWGRAPH with type labels = int) -> + (module Monotone_framework_sigs.FLOWGRAPH with type labels = int) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + (int, + (Middle.Expr.Typed.Set.Elt.t, Middle.Expr.Typed.Set.Elt.comparator_witness) + Core.Set.t) + Core.Map.Poly.t + * (int, + Middle.Expr.Typed.Set.t + Analysis_and_optimization__Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t

Instantiate all four instances of the monotone framework for lazy code motion, reusing code between them

val minimal_variables_mfp : + (module Monotone_framework_sigs.FLOWGRAPH with type labels = int) -> + (int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + string Core.Set.Poly.t -> + ((int, Middle.Stmt.Located.Non_recursive.t) Core.Map.Poly.t -> + int -> + string Core.Set.Poly.t -> + string Core.Set.Poly.t) -> + (int, + string Core.Set.Poly.t + Analysis_and_optimization__Monotone_framework_sigs.entry_exit) + Core.Map.Poly.t

Run the minimal fixed point algorithm to deduce the smallest set of variables that satisfy a set of conditions.

  • parameter Flowgraph

    The set of nodes to analyze

  • parameter flowgraph_to_mir

    Map of nodes to their actual values in the MIR

  • parameter initial_variables

    The set of variables to start in the set

  • parameter gen_variable

    Used in the transfer function to deduce variables that should be in the set *

diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/index.html new file mode 100644 index 000000000..0c8b7844d --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/index.html @@ -0,0 +1,2 @@ + +Monotone_framework_sigs (stanc.Analysis_and_optimization.Monotone_framework_sigs)

Module Analysis_and_optimization.Monotone_framework_sigs

The API for a monotone framework, as described in 2.3-2.4 of Nielson, Nielson, and Hankin or 9.3 of Aho et al.. This gives a modular way of implementing many static analyses.

module type FLOWGRAPH = sig ... end

The API for a flowgraph, needed for the mfp algorithm in the monotone framework. Assumed invariants: successors contains all graph nodes as keys initials is a subset of the graph nodes

module type TYPE = sig ... end

The minimal data we need to use a type in forming a lattice of various kinds

module type INITIALTYPE = sig ... end

The data we need to form a powerset lattice

module type TOTALTYPE = sig ... end

The data we need to form e.g. an available xpressions lattice

module type INITIALTOTALTYPE = sig ... end

The data we need to form a dual powerset lattice

module type LATTICE_NO_BOT = sig ... end
module type LATTICE = sig ... end

The API for a complete (possibly non-distributive) lattice, needed for the mfp algorithm in the monotone framework

module type TRANSFER_FUNCTION = sig ... end

The API for a transfer function, needed for the mfp algorithm in the monotone framework. This describes how output properties are computed from input properties at a given node in the flow graph.

type 'a entry_exit = {
  1. entry : 'a;
  2. exit : 'a;
}
module type MONOTONE_FRAMEWORK = sig ... end

The API for a monotone framework. mfp computes the minimal fixed point of the equations/inequalities defined between property lattice elements at the entry and exit of different flowgraph nodes, where these equations/inequalities are generated from the transfer function. Returns a map of the (input_properties, output_properties) for each node l in the flow graph. The analysis performed is always a forward analysis. For a reverse analysis, supply the reverse flow graph.

diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-FLOWGRAPH/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-FLOWGRAPH/index.html new file mode 100644 index 000000000..1d77aef8f --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-FLOWGRAPH/index.html @@ -0,0 +1,2 @@ + +FLOWGRAPH (stanc.Analysis_and_optimization.Monotone_framework_sigs.FLOWGRAPH)

Module type Monotone_framework_sigs.FLOWGRAPH

The API for a flowgraph, needed for the mfp algorithm in the monotone framework. Assumed invariants: successors contains all graph nodes as keys initials is a subset of the graph nodes

type labels
type t = labels
val compare : t Base__Ppx_compare_lib.compare
val sexp_of_t : t -> Sexplib0.Sexp.t
val hash : t -> int
val initials : labels Core.Set.Poly.t
val successors : (labels, labels Core.Set.Poly.t) Core.Map.Poly.t
diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-INITIALTOTALTYPE/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-INITIALTOTALTYPE/index.html new file mode 100644 index 000000000..06db38b1c --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-INITIALTOTALTYPE/index.html @@ -0,0 +1,2 @@ + +INITIALTOTALTYPE (stanc.Analysis_and_optimization.Monotone_framework_sigs.INITIALTOTALTYPE)

Module type Monotone_framework_sigs.INITIALTOTALTYPE

The data we need to form a dual powerset lattice

include INITIALTYPE
include TYPE
type vals
val initial : vals Core.Set.Poly.t
include TOTALTYPE with type vals := vals
include TYPE with type vals := vals
val total : vals Core.Set.Poly.t
diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-INITIALTYPE/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-INITIALTYPE/index.html new file mode 100644 index 000000000..5f40b9506 --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-INITIALTYPE/index.html @@ -0,0 +1,2 @@ + +INITIALTYPE (stanc.Analysis_and_optimization.Monotone_framework_sigs.INITIALTYPE)

Module type Monotone_framework_sigs.INITIALTYPE

The data we need to form a powerset lattice

include TYPE
type vals
val initial : vals Core.Set.Poly.t
diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-LATTICE/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-LATTICE/index.html new file mode 100644 index 000000000..8aa526be0 --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-LATTICE/index.html @@ -0,0 +1,2 @@ + +LATTICE (stanc.Analysis_and_optimization.Monotone_framework_sigs.LATTICE)

Module type Monotone_framework_sigs.LATTICE

The API for a complete (possibly non-distributive) lattice, needed for the mfp algorithm in the monotone framework

include LATTICE_NO_BOT
type properties
val leq : properties -> properties -> bool
val initial : properties

An initial value, which might not be the top element. The idea is that this is the property that you start with (you assume to be true at the start of your analysis).

val bottom : properties
diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-LATTICE_NO_BOT/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-LATTICE_NO_BOT/index.html new file mode 100644 index 000000000..c7bd61c43 --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-LATTICE_NO_BOT/index.html @@ -0,0 +1,2 @@ + +LATTICE_NO_BOT (stanc.Analysis_and_optimization.Monotone_framework_sigs.LATTICE_NO_BOT)

Module type Monotone_framework_sigs.LATTICE_NO_BOT

type properties
val leq : properties -> properties -> bool
val initial : properties

An initial value, which might not be the top element. The idea is that this is the property that you start with (you assume to be true at the start of your analysis).

diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-MONOTONE_FRAMEWORK/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-MONOTONE_FRAMEWORK/index.html new file mode 100644 index 000000000..b2a0157cb --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-MONOTONE_FRAMEWORK/index.html @@ -0,0 +1,2 @@ + +MONOTONE_FRAMEWORK (stanc.Analysis_and_optimization.Monotone_framework_sigs.MONOTONE_FRAMEWORK)

Module type Monotone_framework_sigs.MONOTONE_FRAMEWORK

The API for a monotone framework. mfp computes the minimal fixed point of the equations/inequalities defined between property lattice elements at the entry and exit of different flowgraph nodes, where these equations/inequalities are generated from the transfer function. Returns a map of the (input_properties, output_properties) for each node l in the flow graph. The analysis performed is always a forward analysis. For a reverse analysis, supply the reverse flow graph.

type labels
type properties
val mfp : unit -> (labels, properties entry_exit) Core.Map.Poly.t
diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TOTALTYPE/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TOTALTYPE/index.html new file mode 100644 index 000000000..ef7f3da8f --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TOTALTYPE/index.html @@ -0,0 +1,2 @@ + +TOTALTYPE (stanc.Analysis_and_optimization.Monotone_framework_sigs.TOTALTYPE)

Module type Monotone_framework_sigs.TOTALTYPE

The data we need to form e.g. an available xpressions lattice

include TYPE
type vals
val total : vals Core.Set.Poly.t
diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TRANSFER_FUNCTION/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TRANSFER_FUNCTION/index.html new file mode 100644 index 000000000..10b56ed05 --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TRANSFER_FUNCTION/index.html @@ -0,0 +1,2 @@ + +TRANSFER_FUNCTION (stanc.Analysis_and_optimization.Monotone_framework_sigs.TRANSFER_FUNCTION)

Module type Monotone_framework_sigs.TRANSFER_FUNCTION

The API for a transfer function, needed for the mfp algorithm in the monotone framework. This describes how output properties are computed from input properties at a given node in the flow graph.

type labels
type properties
val transfer_function : labels -> properties -> properties
diff --git a/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TYPE/index.html b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TYPE/index.html new file mode 100644 index 000000000..7082ec36d --- /dev/null +++ b/stanc/Analysis_and_optimization/Monotone_framework_sigs/module-type-TYPE/index.html @@ -0,0 +1,2 @@ + +TYPE (stanc.Analysis_and_optimization.Monotone_framework_sigs.TYPE)

Module type Monotone_framework_sigs.TYPE

The minimal data we need to use a type in forming a lattice of various kinds

type vals
diff --git a/stanc/Analysis_and_optimization/Optimize/index.html b/stanc/Analysis_and_optimization/Optimize/index.html new file mode 100644 index 000000000..4e4ee1f08 --- /dev/null +++ b/stanc/Analysis_and_optimization/Optimize/index.html @@ -0,0 +1,16 @@ + +Optimize (stanc.Analysis_and_optimization.Optimize)

Module Analysis_and_optimization.Optimize

Inline all functions except for ones with forward declarations (e.g. recursive functions, mutually recursive functions, and functions without a definition

val static_loop_unrolling : Middle.Program.Typed.t -> Middle.Program.Typed.t

Unroll all for-loops with constant bounds, as long as they do not contain break or continue statements in their body at the top level

val one_step_loop_unrolling : Middle.Program.Typed.t -> Middle.Program.Typed.t

Unroll all loops for one iteration, as long as they do not contain break or continue statements in their body at the top level

Remove redundant SList constructors from the Mir that might have been introduced by other optimizations

Make sure that SList constructors directly under if, for, while or fundef constructors are replaced with Block constructors. This should probably be run before we generate code.

val constant_propagation : + ?preserve_stability:bool -> + Middle.Program.Typed.t -> + Middle.Program.Typed.t

Propagate constant values through variable assignments

val expression_propagation : + ?preserve_stability:bool -> + Middle.Program.Typed.t -> + Middle.Program.Typed.t

Propagate arbitrary expressions through variable assignments. This can be useful for opening up new possibilities for partial evaluation. It should be followed by some CSE or lazy code motion pass, however.

Propagate copies of variables through assignments.

val dead_code_elimination : Middle.Program.Typed.t -> Middle.Program.Typed.t

Eliminate semantically redundant code branches. This includes removing redundant assignments (because they will be overwritten) and removing redundant code in program branches that will never be reached.

Partially evaluate expressions in the program. This includes simplification using algebraic identities of logical and arithmetic operators as well as Stan math functions.

val lazy_code_motion : + ?preserve_stability:bool -> + Middle.Program.Typed.t -> + Middle.Program.Typed.t

Perform partial redundancy elmination using the lazy code motion algorithm. This subsumes common subexpression elimination and loop-invariant code motion.

Assign the optimal ad-levels to local variables. That means, make sure that variables only ever get treated as autodiff variables if they have some dependency on a parameter

val allow_uninitialized_decls : + Middle.Program.Typed.t -> + Middle.Program.Typed.t

Marks Decl types such that, if the first assignment after the decl assigns to the full object, allow the object to be constructed but not uninitialized.

type optimization_settings = {
  1. function_inlining : bool;
  2. static_loop_unrolling : bool;
  3. one_step_loop_unrolling : bool;
  4. list_collapsing : bool;
  5. block_fixing : bool;
  6. allow_uninitialized_decls : bool;
  7. constant_propagation : bool;
  8. expression_propagation : bool;
  9. copy_propagation : bool;
  10. dead_code_elimination : bool;
  11. partial_evaluation : bool;
  12. lazy_code_motion : bool;
  13. optimize_ad_levels : bool;
  14. preserve_stability : bool;
  15. optimize_soa : bool;
}

Interface for turning individual optimizations on/off. Useful for testing and for top-level interface flags.

val all_optimizations : optimization_settings
val no_optimizations : optimization_settings
type optimization_level =
  1. | O0
  2. | O1
  3. | Oexperimental
val level_optimizations : optimization_level -> optimization_settings
val optimization_suite : + ?settings:optimization_settings -> + Middle.Program.Typed.t -> + Middle.Program.Typed.t

Perform all optimizations in this module on the MIR in an appropriate order.

diff --git a/stanc/Analysis_and_optimization/Partial_evaluator/index.html b/stanc/Analysis_and_optimization/Partial_evaluator/index.html new file mode 100644 index 000000000..fdb1db94e --- /dev/null +++ b/stanc/Analysis_and_optimization/Partial_evaluator/index.html @@ -0,0 +1,36 @@ + +Partial_evaluator (stanc.Analysis_and_optimization.Partial_evaluator)

Module Analysis_and_optimization.Partial_evaluator

exception Rejected of Middle.Location_span.t * string
val is_int : int -> 'a Middle.Expr.Fixed.t -> bool
val apply_prefix_operator_int : + string -> + Core.Int.t -> + 'a Middle.Expr.Fixed.Pattern.t
val apply_prefix_operator_real : + string -> + Core.Float.t -> + 'a Middle.Expr.Fixed.Pattern.t
val apply_operator_int : + string -> + Core__.Int.t -> + Core__.Int.t -> + 'a Middle.Expr.Fixed.Pattern.t
val apply_arithmetic_operator_real : + string -> + float -> + float -> + 'a Middle.Expr.Fixed.Pattern.t
val apply_logical_operator_real : + string -> + 'a -> + 'b -> + 'c Middle.Expr.Fixed.Pattern.t
val is_multi_index : 'a Middle.Index.t -> bool
val eval_expr : + ?preserve_stability:bool -> + Middle.Expr.Typed.t -> + Middle.Expr.Typed.t
val remove_trailing_alls_expr : + 'a Middle.Expr.Fixed.Pattern.t -> + 'b Middle.Expr.Fixed.Pattern.t
diff --git a/stanc/Analysis_and_optimization/Pedantic_analysis/index.html b/stanc/Analysis_and_optimization/Pedantic_analysis/index.html new file mode 100644 index 000000000..10b771822 --- /dev/null +++ b/stanc/Analysis_and_optimization/Pedantic_analysis/index.html @@ -0,0 +1,2 @@ + +Pedantic_analysis (stanc.Analysis_and_optimization.Pedantic_analysis)

Module Analysis_and_optimization.Pedantic_analysis

type warning_span = Middle.Location_span.t * string
val warn_pedantic : Middle.Program.Typed.t -> warning_span list

Collect all pedantic mode warnings and print to a string.

val warn_uninitialized : Middle.Program.Typed.t -> warning_span list

Collect warnings about each variable which is used before being initialized and print to a string.

diff --git a/stanc/Analysis_and_optimization/Pedantic_dist_warnings/index.html b/stanc/Analysis_and_optimization/Pedantic_dist_warnings/index.html new file mode 100644 index 000000000..eb4310252 --- /dev/null +++ b/stanc/Analysis_and_optimization/Pedantic_dist_warnings/index.html @@ -0,0 +1,24 @@ + +Pedantic_dist_warnings (stanc.Analysis_and_optimization.Pedantic_dist_warnings)

Module Analysis_and_optimization.Pedantic_dist_warnings

type compiletime_val =
  1. | Opaque
  2. | Number of float * string
  3. | Param of string * Middle.Expr.Typed.t Middle.Transformation.t
  4. | Data of string

Useful information about an expression. Opaque means we don't know anything.

type dist_info = {
  1. name : string;
  2. loc : Middle.Location_span.t;
  3. args : (compiletime_val * Middle.Expr.Typed.Meta.t) Core.List.t;
}

Info about a distribution occurrences that's useful for checking that distribution properties are met

type range = {
  1. lower : (float * bool) option;
  2. upper : (float * bool) option;
}

Value constraint as a range. The bools are true if the bound is inclusive

type var_constraint =
  1. | Range of range
  2. | Ordered
  3. | PositiveOrdered
  4. | Simplex
  5. | UnitVector
  6. | CholeskyCorr
  7. | CholeskyCov
  8. | Correlation
  9. | Covariance

Value constraint for an argument

type var_constraint_named = {
  1. name : string;
  2. constr : var_constraint;
}

Constraint paired with a name for user messages

val unit_range : var_constraint_named
val exclusive_unit_range : var_constraint_named
val positive_range : var_constraint_named
val nonnegative_range : var_constraint_named
val simplex : var_constraint_named
val ordered : var_constraint_named
val correlation : var_constraint_named
val cholesky_correlation : var_constraint_named
val covariance : var_constraint_named
val cholesky_covariance : var_constraint_named
val bounds_out_of_range : range -> Mir_utils.bound_values -> bool

Check for inconsistency between a distribution argument's value range and the declared bounds of a variable

val transform_mismatch_constraint : + var_constraint -> + Middle.Expr.Typed.t Middle.Transformation.t -> + bool

Check for inconsistency between a distribution argument's constraint and the constraint transformation of a variable

val value_out_of_range : range -> float -> bool

Check for inconsistency between a distribution argument's range and a literal value

val value_mismatch_constraint : var_constraint -> float -> bool

Check for inconsistency between a distribution argument's constraint and a literal value

type arg_info =
  1. | Arg of int * string
  2. | Variate
val arg_number : arg_info -> int
val constr_mismatch_message : string -> string -> arg_info -> string -> string
val constr_literal_mismatch_message : + string -> + string -> + arg_info -> + string -> + string
val constr_mismatch_warning : + var_constraint_named -> + arg_info -> + dist_info -> + (Middle.Location_span.t * string) option

Return a warning if the argn-th argument doesn't match its constraints

val uniform_dist_message : string -> string
val uniform_dist_warning : + dist_info -> + (Middle.Location_span.t * string) option

Warning for all uniform distributions with a parameter

val lkj_corr_message : string
val lkj_corr_dist_warning : + dist_info -> + (Middle.Location_span.t * string) option

Warn about all non-Cholesky lkj_corr distributions

val gamma_arg_dist_message : string
val gamma_arg_dist_warning : + dist_info -> + (Middle.Location_span.t * string) option

Warning particular to gamma and inv_gamma, when A=B<1

val distribution_warning : + dist_info -> + (Middle.Location_span.t * string) Core.List.t

Generate all of the warnings that are relevant to a given distribution

val distribution_warnings : + dist_info Core.Set.Poly.t -> + (Middle.Location_span.t * string) Core.Set.Poly.t

Generate the distribution warnings for a program

diff --git a/stanc/Analysis_and_optimization/index.html b/stanc/Analysis_and_optimization/index.html new file mode 100644 index 000000000..83b319710 --- /dev/null +++ b/stanc/Analysis_and_optimization/index.html @@ -0,0 +1,2 @@ + +Analysis_and_optimization (stanc.Analysis_and_optimization)

Module Analysis_and_optimization

module Dataflow_types : sig ... end
module Dataflow_utils : sig ... end
module Debug_data_generation : sig ... end
module Dependence_analysis : sig ... end

~~~~~ TODO ~~~~~ * The interfaces are currently messed up. I think part of the solution is to change the signature of reaching_definitions_mfp in Monotone_framework, which currently requires the full program but shouldn't need the full program. As it stands, stmt_map_dependency_graph does not include data dependencies at all, since it can't use reaching deps, and prog_dependency graph only builds the graph for log_prob, but the user isn't guaranteed to be using the same labeling scheme. * Currently, dependencies on global or uninitialized data are written as depending on node '0'. This should probably be option or some type that indicates global dependence. * Indexed variables are currently handled as monoliths * No probabilistic dependency, I'll do that elsewhere *

module Factor_graph : sig ... end
module Memory_patterns : sig ... end
module Mir_utils : sig ... end
module Monotone_framework : sig ... end

The common elements of a monotone framework

module Monotone_framework_sigs : sig ... end
module Optimize : sig ... end
module Partial_evaluator : sig ... end
module Pedantic_analysis : sig ... end
module Pedantic_dist_warnings : sig ... end
diff --git a/stanc/Common/Fixed/Make/argument-1-Pattern/index.html b/stanc/Common/Fixed/Make/argument-1-Pattern/index.html new file mode 100644 index 000000000..72eb40f6c --- /dev/null +++ b/stanc/Common/Fixed/Make/argument-1-Pattern/index.html @@ -0,0 +1,10 @@ + +Pattern (stanc.Common.Fixed.Make.Pattern)

Parameter Make.Pattern

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Fixed/Make/index.html b/stanc/Common/Fixed/Make/index.html new file mode 100644 index 000000000..37fae6e59 --- /dev/null +++ b/stanc/Common/Fixed/Make/index.html @@ -0,0 +1,16 @@ + +Make (stanc.Common.Fixed.Make)

Module Fixed.Make

Functor which creates the fixed-point of the type defined in the Pattern module argument

Parameters

Signature

type 'a t = {
  1. pattern : 'a t Pattern.t;
  2. meta : 'a;
}
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
val fold_pattern : f:(('a * 'r Pattern.t) -> 'r) -> 'a t -> 'r

fold_pattern traverses the data structure from the bottom up replacing the original meta data of type 'a with some result type 'r and combines the result values on the way back up. For example, given a pattern with the following type:

type 'a pattern = Leaf of string | Branch of 'a * 'a

we can use fold_pattern to calculate the maximum depth of data structure obtained by fixing the pattern type:

let max_depth t =
+  let f = function
+      | meta , Leaf _ -> 1
+      | meta , Branch(left_depth,right_depth) ->
+          1 + (max left_depth right_depth)
+  in
+  fold_pattern ~f t

Note that the function 'f' supplied to fold_pattern accepts a tuple rather than our type 'a t since the type of the pattern has been transformed to 'r t Pattern.t and is no longer 'compatible' with the original type of meta data 'a. That is, a tuple ('a * 'b t Pattern.t) has two type variables where as 'a t has one.

val rewrite_bottom_up : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_bottom_up specializes fold_pattern so that the result type 'r is equal to the type of our fixed-point data structure i.e. 'r = 'a t. This also means that the function f can be written with our fixed-point type 'a t as its argument.

val unfold_pattern : f:('r -> 'a * 'r Pattern.t) -> 'r -> 'a t

unfold builds a fixed-point data structure from the top down. Starting with a user-supplied seed of type 'r, unfold recursively applies the function f yielding a tuple of meta-data and pattern with elements of type 'r to which f is further applied.

The unfold terminates when a pattern element which does not carry an 'r is reached.

As with fold_pattern the function f returns a tuple of meta-data and pattern rather than our record type since, in general, 'r =/= 'a t.

val rewrite_top_down : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_top_down specializes unfold by requiring that r = 'a t. As a consequence the function f accepts our record type 'a t as its argument.

diff --git a/stanc/Common/Fixed/Make2/argument-1-First/Pattern/index.html b/stanc/Common/Fixed/Make2/argument-1-First/Pattern/index.html new file mode 100644 index 000000000..8863a9c6c --- /dev/null +++ b/stanc/Common/Fixed/Make2/argument-1-First/Pattern/index.html @@ -0,0 +1,10 @@ + +Pattern (stanc.Common.Fixed.Make2.First.Pattern)

Module First.Pattern

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Fixed/Make2/argument-1-First/index.html b/stanc/Common/Fixed/Make2/argument-1-First/index.html new file mode 100644 index 000000000..f101fad3e --- /dev/null +++ b/stanc/Common/Fixed/Make2/argument-1-First/index.html @@ -0,0 +1,16 @@ + +First (stanc.Common.Fixed.Make2.First)

Parameter Make2.First

type 'a t = {
  1. pattern : 'a t Pattern.t;
  2. meta : 'a;
}
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
val fold_pattern : f:(('a * 'r Pattern.t) -> 'r) -> 'a t -> 'r

fold_pattern traverses the data structure from the bottom up replacing the original meta data of type 'a with some result type 'r and combines the result values on the way back up. For example, given a pattern with the following type:

type 'a pattern = Leaf of string | Branch of 'a * 'a

we can use fold_pattern to calculate the maximum depth of data structure obtained by fixing the pattern type:

let max_depth t =
+  let f = function
+      | meta , Leaf _ -> 1
+      | meta , Branch(left_depth,right_depth) ->
+          1 + (max left_depth right_depth)
+  in
+  fold_pattern ~f t

Note that the function 'f' supplied to fold_pattern accepts a tuple rather than our type 'a t since the type of the pattern has been transformed to 'r t Pattern.t and is no longer 'compatible' with the original type of meta data 'a. That is, a tuple ('a * 'b t Pattern.t) has two type variables where as 'a t has one.

val rewrite_bottom_up : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_bottom_up specializes fold_pattern so that the result type 'r is equal to the type of our fixed-point data structure i.e. 'r = 'a t. This also means that the function f can be written with our fixed-point type 'a t as its argument.

val unfold_pattern : f:('r -> 'a * 'r Pattern.t) -> 'r -> 'a t

unfold builds a fixed-point data structure from the top down. Starting with a user-supplied seed of type 'r, unfold recursively applies the function f yielding a tuple of meta-data and pattern with elements of type 'r to which f is further applied.

The unfold terminates when a pattern element which does not carry an 'r is reached.

As with fold_pattern the function f returns a tuple of meta-data and pattern rather than our record type since, in general, 'r =/= 'a t.

val rewrite_top_down : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_top_down specializes unfold by requiring that r = 'a t. As a consequence the function f accepts our record type 'a t as its argument.

diff --git a/stanc/Common/Fixed/Make2/argument-2-Pattern/index.html b/stanc/Common/Fixed/Make2/argument-2-Pattern/index.html new file mode 100644 index 000000000..e5dcf7b2e --- /dev/null +++ b/stanc/Common/Fixed/Make2/argument-2-Pattern/index.html @@ -0,0 +1,41 @@ + +Pattern (stanc.Common.Fixed.Make2.Pattern)

Parameter Make2.Pattern

type ('a, 'b) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Foldable.S2 with type ('a, 'b) t := ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
include Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
diff --git a/stanc/Common/Fixed/Make2/index.html b/stanc/Common/Fixed/Make2/index.html new file mode 100644 index 000000000..0ba3fcdc5 --- /dev/null +++ b/stanc/Common/Fixed/Make2/index.html @@ -0,0 +1,57 @@ + +Make2 (stanc.Common.Fixed.Make2)

Module Fixed.Make2

Parameters

module First : S

Signature

type ('a, 'b) t = {
  1. pattern : ('a First.t, ('a, 'b) t) Pattern.t;
  2. meta : 'b;
}
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Foldable.S2 with type ('a, 'b) t := ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
include Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
val fold_pattern : + f:(('a * 'r1 First.Pattern.t) -> 'r1) -> + g:(('b * ('r1, 'r2) Pattern.t) -> 'r2) -> + ('a, 'b) t -> + 'r2

fold_pattern traverses the data structure from the bottom up replacing the original meta data of First with type 'a with some result type 'r1 and the meta data at this level withtype 'b to another result type 'r2 and combines the result values on the way back up.

val rewrite_bottom_up : + f:('a First.t -> 'a First.t) -> + g:(('a, 'b) t -> ('a, 'b) t) -> + ('a, 'b) t -> + ('a, 'b) t

rewrite_bottom_up specializes fold_pattern so that the result type 'r1 is equal to the type of the nested fixed-point type i.e. 'r1 = 'a First.t and the result type 'r2 is equal to the top-level fixed-point type i.e. 'r2 = ('a,'b) t.

This also means that the function f can be written with our nested fixed-point type 'a First.t as its argument and g can be written with ('a,'b) t as its argument.

val unfold_pattern : + f:('r1 -> 'a * 'r1 First.Pattern.t) -> + g:('r2 -> 'b * ('r1, 'r2) Pattern.t) -> + 'r2 -> + ('a, 'b) t

unfold_pattern takes a seed value of type 'r2 and uses the function g to generate a tuple of meta-data and a pattern with types 'r1 and 'r2. The functions proceeds by recursively applying g to the contained values of type 'r2 and f to values of type 'r1 finishing when the pattern contains no values of type 'r1 or 'r2.

val rewrite_top_down : + f:('a First.t -> 'a First.t) -> + g:(('a, 'b) t -> ('a, 'b) t) -> + ('a, 'b) t -> + ('a, 'b) t

rewrite_top_down specializes unfold_pattern in a manner analogous to how rewrite_bottom_up specializes fold_pattern

diff --git a/stanc/Common/Fixed/index.html b/stanc/Common/Fixed/index.html new file mode 100644 index 000000000..5980a29ef --- /dev/null +++ b/stanc/Common/Fixed/index.html @@ -0,0 +1,5 @@ + +Fixed (stanc.Common.Fixed)

Module Common.Fixed

This module defines the signatures and Make functors for the 'fixed point' (or two-level) type we use for our intermediate representations

module type S = sig ... end

The fixed-point of Pattern.t annotated with some meta-data

module Make (Pattern : Pattern.S) : S with module Pattern := Pattern

Functor which creates the fixed-point of the type defined in the Pattern module argument

module type S2 = sig ... end

Nested fixed-point type where an element of the Pattern is itself a fixed-point type. We use this to represent statements which contain expressions.

module Make2 + (First : S) + (Pattern : Pattern.S2) : + S2 with module First := First and module Pattern := Pattern
diff --git a/stanc/Common/Fixed/module-type-S/Pattern/index.html b/stanc/Common/Fixed/module-type-S/Pattern/index.html new file mode 100644 index 000000000..a170497f9 --- /dev/null +++ b/stanc/Common/Fixed/module-type-S/Pattern/index.html @@ -0,0 +1,10 @@ + +Pattern (stanc.Common.Fixed.S.Pattern)

Module S.Pattern

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Fixed/module-type-S/index.html b/stanc/Common/Fixed/module-type-S/index.html new file mode 100644 index 000000000..34512cba9 --- /dev/null +++ b/stanc/Common/Fixed/module-type-S/index.html @@ -0,0 +1,16 @@ + +S (stanc.Common.Fixed.S)

Module type Fixed.S

The fixed-point of Pattern.t annotated with some meta-data

type 'a t = {
  1. pattern : 'a t Pattern.t;
  2. meta : 'a;
}
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
val fold_pattern : f:(('a * 'r Pattern.t) -> 'r) -> 'a t -> 'r

fold_pattern traverses the data structure from the bottom up replacing the original meta data of type 'a with some result type 'r and combines the result values on the way back up. For example, given a pattern with the following type:

type 'a pattern = Leaf of string | Branch of 'a * 'a

we can use fold_pattern to calculate the maximum depth of data structure obtained by fixing the pattern type:

let max_depth t =
+  let f = function
+      | meta , Leaf _ -> 1
+      | meta , Branch(left_depth,right_depth) ->
+          1 + (max left_depth right_depth)
+  in
+  fold_pattern ~f t

Note that the function 'f' supplied to fold_pattern accepts a tuple rather than our type 'a t since the type of the pattern has been transformed to 'r t Pattern.t and is no longer 'compatible' with the original type of meta data 'a. That is, a tuple ('a * 'b t Pattern.t) has two type variables where as 'a t has one.

val rewrite_bottom_up : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_bottom_up specializes fold_pattern so that the result type 'r is equal to the type of our fixed-point data structure i.e. 'r = 'a t. This also means that the function f can be written with our fixed-point type 'a t as its argument.

val unfold_pattern : f:('r -> 'a * 'r Pattern.t) -> 'r -> 'a t

unfold builds a fixed-point data structure from the top down. Starting with a user-supplied seed of type 'r, unfold recursively applies the function f yielding a tuple of meta-data and pattern with elements of type 'r to which f is further applied.

The unfold terminates when a pattern element which does not carry an 'r is reached.

As with fold_pattern the function f returns a tuple of meta-data and pattern rather than our record type since, in general, 'r =/= 'a t.

val rewrite_top_down : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_top_down specializes unfold by requiring that r = 'a t. As a consequence the function f accepts our record type 'a t as its argument.

diff --git a/stanc/Common/Fixed/module-type-S2/First/Pattern/index.html b/stanc/Common/Fixed/module-type-S2/First/Pattern/index.html new file mode 100644 index 000000000..a101a7ceb --- /dev/null +++ b/stanc/Common/Fixed/module-type-S2/First/Pattern/index.html @@ -0,0 +1,10 @@ + +Pattern (stanc.Common.Fixed.S2.First.Pattern)

Module First.Pattern

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Fixed/module-type-S2/First/index.html b/stanc/Common/Fixed/module-type-S2/First/index.html new file mode 100644 index 000000000..3111ef98e --- /dev/null +++ b/stanc/Common/Fixed/module-type-S2/First/index.html @@ -0,0 +1,16 @@ + +First (stanc.Common.Fixed.S2.First)

Module S2.First

type 'a t = {
  1. pattern : 'a t Pattern.t;
  2. meta : 'a;
}
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
val fold_pattern : f:(('a * 'r Pattern.t) -> 'r) -> 'a t -> 'r

fold_pattern traverses the data structure from the bottom up replacing the original meta data of type 'a with some result type 'r and combines the result values on the way back up. For example, given a pattern with the following type:

type 'a pattern = Leaf of string | Branch of 'a * 'a

we can use fold_pattern to calculate the maximum depth of data structure obtained by fixing the pattern type:

let max_depth t =
+  let f = function
+      | meta , Leaf _ -> 1
+      | meta , Branch(left_depth,right_depth) ->
+          1 + (max left_depth right_depth)
+  in
+  fold_pattern ~f t

Note that the function 'f' supplied to fold_pattern accepts a tuple rather than our type 'a t since the type of the pattern has been transformed to 'r t Pattern.t and is no longer 'compatible' with the original type of meta data 'a. That is, a tuple ('a * 'b t Pattern.t) has two type variables where as 'a t has one.

val rewrite_bottom_up : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_bottom_up specializes fold_pattern so that the result type 'r is equal to the type of our fixed-point data structure i.e. 'r = 'a t. This also means that the function f can be written with our fixed-point type 'a t as its argument.

val unfold_pattern : f:('r -> 'a * 'r Pattern.t) -> 'r -> 'a t

unfold builds a fixed-point data structure from the top down. Starting with a user-supplied seed of type 'r, unfold recursively applies the function f yielding a tuple of meta-data and pattern with elements of type 'r to which f is further applied.

The unfold terminates when a pattern element which does not carry an 'r is reached.

As with fold_pattern the function f returns a tuple of meta-data and pattern rather than our record type since, in general, 'r =/= 'a t.

val rewrite_top_down : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_top_down specializes unfold by requiring that r = 'a t. As a consequence the function f accepts our record type 'a t as its argument.

diff --git a/stanc/Common/Fixed/module-type-S2/Pattern/index.html b/stanc/Common/Fixed/module-type-S2/Pattern/index.html new file mode 100644 index 000000000..0bd1c92d6 --- /dev/null +++ b/stanc/Common/Fixed/module-type-S2/Pattern/index.html @@ -0,0 +1,41 @@ + +Pattern (stanc.Common.Fixed.S2.Pattern)

Module S2.Pattern

type ('a, 'b) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Foldable.S2 with type ('a, 'b) t := ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
include Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
diff --git a/stanc/Common/Fixed/module-type-S2/index.html b/stanc/Common/Fixed/module-type-S2/index.html new file mode 100644 index 000000000..6da744594 --- /dev/null +++ b/stanc/Common/Fixed/module-type-S2/index.html @@ -0,0 +1,57 @@ + +S2 (stanc.Common.Fixed.S2)

Module type Fixed.S2

Nested fixed-point type where an element of the Pattern is itself a fixed-point type. We use this to represent statements which contain expressions.

module First : S
type ('a, 'b) t = {
  1. pattern : ('a First.t, ('a, 'b) t) Pattern.t;
  2. meta : 'b;
}
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Foldable.S2 with type ('a, 'b) t := ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
include Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
val fold_pattern : + f:(('a * 'r1 First.Pattern.t) -> 'r1) -> + g:(('b * ('r1, 'r2) Pattern.t) -> 'r2) -> + ('a, 'b) t -> + 'r2

fold_pattern traverses the data structure from the bottom up replacing the original meta data of First with type 'a with some result type 'r1 and the meta data at this level withtype 'b to another result type 'r2 and combines the result values on the way back up.

val rewrite_bottom_up : + f:('a First.t -> 'a First.t) -> + g:(('a, 'b) t -> ('a, 'b) t) -> + ('a, 'b) t -> + ('a, 'b) t

rewrite_bottom_up specializes fold_pattern so that the result type 'r1 is equal to the type of the nested fixed-point type i.e. 'r1 = 'a First.t and the result type 'r2 is equal to the top-level fixed-point type i.e. 'r2 = ('a,'b) t.

This also means that the function f can be written with our nested fixed-point type 'a First.t as its argument and g can be written with ('a,'b) t as its argument.

val unfold_pattern : + f:('r1 -> 'a * 'r1 First.Pattern.t) -> + g:('r2 -> 'b * ('r1, 'r2) Pattern.t) -> + 'r2 -> + ('a, 'b) t

unfold_pattern takes a seed value of type 'r2 and uses the function g to generate a tuple of meta-data and a pattern with types 'r1 and 'r2. The functions proceeds by recursively applying g to the contained values of type 'r2 and f to values of type 'r1 finishing when the pattern contains no values of type 'r1 or 'r2.

val rewrite_top_down : + f:('a First.t -> 'a First.t) -> + g:(('a, 'b) t -> ('a, 'b) t) -> + ('a, 'b) t -> + ('a, 'b) t

rewrite_top_down specializes unfold_pattern in a manner analogous to how rewrite_bottom_up specializes fold_pattern

diff --git a/stanc/Common/Foldable/Make/argument-1-X/index.html b/stanc/Common/Foldable/Make/argument-1-X/index.html new file mode 100644 index 000000000..a346c6168 --- /dev/null +++ b/stanc/Common/Foldable/Make/argument-1-X/index.html @@ -0,0 +1,2 @@ + +X (stanc.Common.Foldable.Make.X)

Parameter Make.X

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
diff --git a/stanc/Common/Foldable/Make/index.html b/stanc/Common/Foldable/Make/index.html new file mode 100644 index 000000000..e7852c648 --- /dev/null +++ b/stanc/Common/Foldable/Make/index.html @@ -0,0 +1,2 @@ + +Make (stanc.Common.Foldable.Make)

Module Foldable.Make

Parameters

module X : Basic

Signature

val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a X.t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a X.t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a X.t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a X.t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

diff --git a/stanc/Common/Foldable/Make2/argument-1-X/index.html b/stanc/Common/Foldable/Make2/argument-1-X/index.html new file mode 100644 index 000000000..cb5d1d8c0 --- /dev/null +++ b/stanc/Common/Foldable/Make2/argument-1-X/index.html @@ -0,0 +1,2 @@ + +X (stanc.Common.Foldable.Make2.X)

Parameter Make2.X

type ('a, 'b) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
diff --git a/stanc/Common/Foldable/Make2/index.html b/stanc/Common/Foldable/Make2/index.html new file mode 100644 index 000000000..cf809d57d --- /dev/null +++ b/stanc/Common/Foldable/Make2/index.html @@ -0,0 +1,22 @@ + +Make2 (stanc.Common.Foldable.Make2)

Module Foldable.Make2

Parameters

module X : Basic2

Signature

val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) X.t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) X.t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) X.t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) X.t -> + bool
diff --git a/stanc/Common/Foldable/index.html b/stanc/Common/Foldable/index.html new file mode 100644 index 000000000..979e0e641 --- /dev/null +++ b/stanc/Common/Foldable/index.html @@ -0,0 +1,2 @@ + +Foldable (stanc.Common.Foldable)

Module Common.Foldable

This module follows the Jane Street organisation and naming conventions for 'standard interfaces' i.e. commonly used signatures; briefly:

  • Basic defines the _minimal_ set of type and function signatures that a user must provide
  • S defines the _complete_ set of type and functions signatures that will be exposed by any module supporting the standard interface associated with S
  • Make is a functor (i.e. a function from module to module) that takes the user supplied Basic module and returns a completed module with the signature defined by S

Where a standard interface is defined for difference arities of type constructors, the convention is to append the arity to the names of the signatures and functors e.g. Basic2, S2 and Make2

module type Basic = sig ... end

The Basic definition for type constructors with a single type variable.

module type S = sig ... end

The complete module signature for Foldable for types with a single type variable.

module Make (X : Basic) : S with type 'a t := 'a X.t
module type Basic2 = sig ... end

The Basic definition for type constructors with two type variables.

module type S2 = sig ... end

The complete module signature for Foldable for types with a single type variable.

module Make2 (X : Basic2) : S2 with type ('a, 'b) t := ('a, 'b) X.t
diff --git a/stanc/Common/Foldable/module-type-Basic/index.html b/stanc/Common/Foldable/module-type-Basic/index.html new file mode 100644 index 000000000..9cd61e37b --- /dev/null +++ b/stanc/Common/Foldable/module-type-Basic/index.html @@ -0,0 +1,2 @@ + +Basic (stanc.Common.Foldable.Basic)

Module type Foldable.Basic

The Basic definition for type constructors with a single type variable.

This signature just says that you have some type 'a t and a function fold with type:

fold: ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

This function can be derived using ppx_deriving.

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
diff --git a/stanc/Common/Foldable/module-type-Basic2/index.html b/stanc/Common/Foldable/module-type-Basic2/index.html new file mode 100644 index 000000000..6432210ca --- /dev/null +++ b/stanc/Common/Foldable/module-type-Basic2/index.html @@ -0,0 +1,2 @@ + +Basic2 (stanc.Common.Foldable.Basic2)

Module type Foldable.Basic2

The Basic definition for type constructors with two type variables.

type ('a, 'b) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
diff --git a/stanc/Common/Foldable/module-type-S/index.html b/stanc/Common/Foldable/module-type-S/index.html new file mode 100644 index 000000000..08c09826b --- /dev/null +++ b/stanc/Common/Foldable/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (stanc.Common.Foldable.S)

Module type Foldable.S

The complete module signature for Foldable for types with a single type variable.

type 'a t

A data structure which can be folded

val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

diff --git a/stanc/Common/Foldable/module-type-S2/index.html b/stanc/Common/Foldable/module-type-S2/index.html new file mode 100644 index 000000000..a63de9bb8 --- /dev/null +++ b/stanc/Common/Foldable/module-type-S2/index.html @@ -0,0 +1,22 @@ + +S2 (stanc.Common.Foldable.S2)

Module type Foldable.S2

The complete module signature for Foldable for types with a single type variable.

type ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
diff --git a/stanc/Common/Gensym/index.html b/stanc/Common/Gensym/index.html new file mode 100644 index 000000000..392429940 --- /dev/null +++ b/stanc/Common/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (stanc.Common.Gensym)

Module Common.Gensym

Generate fresh (never before used) symbols.

Uses an internal (mutable) counter

val generate : ?prefix:string -> unit -> string
val enter : unit -> string * (unit -> unit)
val reset_danger_use_cautiously : unit -> unit
diff --git a/stanc/Common/ICE/index.html b/stanc/Common/ICE/index.html new file mode 100644 index 000000000..df8002df7 --- /dev/null +++ b/stanc/Common/ICE/index.html @@ -0,0 +1,2 @@ + +ICE (stanc.Common.ICE)

Module Common.ICE

Internal compiler errors

val internal_compiler_error : Base__.Sexp.t -> 'a

An alias of Core.raise_s. This used to do more processing, for now it is preserved just as a nicer marker in the code

val with_exn_message : (unit -> 'a) -> ('b, string) Core._result

Catch all exceptions at the top-level and convert them into a 'a, string result where the string contains the exception and a backtrace if present, followed by a link to our bugtracker.

diff --git a/stanc/Common/Pattern/index.html b/stanc/Common/Pattern/index.html new file mode 100644 index 000000000..8e55d1a0d --- /dev/null +++ b/stanc/Common/Pattern/index.html @@ -0,0 +1,2 @@ + +Pattern (stanc.Common.Pattern)

Module Common.Pattern

A Pattern defines the signature of modules that may be fixed with Fixed.Make and Fixed.Make2.

These signatures ensure that all the operations we want to support on our top level intermediate representations can be defined by the Fixed.Make functors.

module type S = sig ... end
module type S2 = sig ... end
diff --git a/stanc/Common/Pattern/module-type-S/index.html b/stanc/Common/Pattern/module-type-S/index.html new file mode 100644 index 000000000..70e821407 --- /dev/null +++ b/stanc/Common/Pattern/module-type-S/index.html @@ -0,0 +1,10 @@ + +S (stanc.Common.Pattern.S)

Module type Pattern.S

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Pattern/module-type-S2/index.html b/stanc/Common/Pattern/module-type-S2/index.html new file mode 100644 index 000000000..3a707685e --- /dev/null +++ b/stanc/Common/Pattern/module-type-S2/index.html @@ -0,0 +1,41 @@ + +S2 (stanc.Common.Pattern.S2)

Module type Pattern.S2

type ('a, 'b) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Foldable.S2 with type ('a, 'b) t := ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
include Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
diff --git a/stanc/Common/Pretty/index.html b/stanc/Common/Pretty/index.html new file mode 100644 index 000000000..6227d6c3e --- /dev/null +++ b/stanc/Common/Pretty/index.html @@ -0,0 +1,2 @@ + +Pretty (stanc.Common.Pretty)

Module Common.Pretty

Named signatures for types that can be pretty-printed.

module type S = sig ... end
module type S1 = sig ... end
module type S2 = sig ... end
diff --git a/stanc/Common/Pretty/module-type-S/index.html b/stanc/Common/Pretty/module-type-S/index.html new file mode 100644 index 000000000..cee4f4229 --- /dev/null +++ b/stanc/Common/Pretty/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (stanc.Common.Pretty.S)

Module type Pretty.S

type t
val pp : Stdlib.Format.formatter -> t -> unit
diff --git a/stanc/Common/Pretty/module-type-S1/index.html b/stanc/Common/Pretty/module-type-S1/index.html new file mode 100644 index 000000000..b33ab95df --- /dev/null +++ b/stanc/Common/Pretty/module-type-S1/index.html @@ -0,0 +1,6 @@ + +S1 (stanc.Common.Pretty.S1)

Module type Pretty.S1

type 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Pretty/module-type-S2/index.html b/stanc/Common/Pretty/module-type-S2/index.html new file mode 100644 index 000000000..568d473cc --- /dev/null +++ b/stanc/Common/Pretty/module-type-S2/index.html @@ -0,0 +1,7 @@ + +S2 (stanc.Common.Pretty.S2)

Module type Pretty.S2

type ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
diff --git a/stanc/Common/Specialized/Make/Map/Key/index.html b/stanc/Common/Specialized/Make/Map/Key/index.html new file mode 100644 index 000000000..b6bc477fc --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/Make/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Common/Specialized/Make/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..513af288a --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make/Map/Provide_bin_io/index.html b/stanc/Common/Specialized/Make/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..aaffc489f --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.Make.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Common/Specialized/Make/Map/Provide_hash/argument-1-Key/index.html b/stanc/Common/Specialized/Make/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..5081e164c --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/Make/Map/Provide_hash/index.html b/stanc/Common/Specialized/Make/Map/Provide_hash/index.html new file mode 100644 index 000000000..6226ab911 --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Common.Specialized.Make.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Common/Specialized/Make/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Common/Specialized/Make/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..7be07ecc5 --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Common/Specialized/Make/Map/Provide_of_sexp/index.html b/stanc/Common/Specialized/Make/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..34f5d44a8 --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.Make.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Common/Specialized/Make/Map/index.html b/stanc/Common/Specialized/Make/Map/index.html new file mode 100644 index 000000000..888a908ce --- /dev/null +++ b/stanc/Common/Specialized/Make/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Common.Specialized.Make.Map)

Module Make.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/Make/Replace_polymorphic_compare/index.html b/stanc/Common/Specialized/Make/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..9b48e8aa8 --- /dev/null +++ b/stanc/Common/Specialized/Make/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Common.Specialized.Make.Replace_polymorphic_compare)

Module Make.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Common/Specialized/Make/Set/Elt/index.html b/stanc/Common/Specialized/Make/Set/Elt/index.html new file mode 100644 index 000000000..189c35de7 --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/Make/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Common/Specialized/Make/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..6ee61032f --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make/Set/Provide_bin_io/index.html b/stanc/Common/Specialized/Make/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..83bfc7504 --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.Make.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Common/Specialized/Make/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..a8aacb8ac --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/Make/Set/Provide_hash/index.html b/stanc/Common/Specialized/Make/Set/Provide_hash/index.html new file mode 100644 index 000000000..0db411550 --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Common.Specialized.Make.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Common/Specialized/Make/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Common/Specialized/Make/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..81be801b5 --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Common/Specialized/Make/Set/Provide_of_sexp/index.html b/stanc/Common/Specialized/Make/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..1c89b6cf5 --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.Make.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Common/Specialized/Make/Set/index.html b/stanc/Common/Specialized/Make/Set/index.html new file mode 100644 index 000000000..ee703758f --- /dev/null +++ b/stanc/Common/Specialized/Make/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Common.Specialized.Make.Set)

Module Make.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/Make/argument-1-X/index.html b/stanc/Common/Specialized/Make/argument-1-X/index.html new file mode 100644 index 000000000..f3935b9b6 --- /dev/null +++ b/stanc/Common/Specialized/Make/argument-1-X/index.html @@ -0,0 +1,10 @@ + +X (stanc.Common.Specialized.Make.X)

Parameter Make.X

type 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Specialized/Make/argument-2-Meta/index.html b/stanc/Common/Specialized/Make/argument-2-Meta/index.html new file mode 100644 index 000000000..2c7f01438 --- /dev/null +++ b/stanc/Common/Specialized/Make/argument-2-Meta/index.html @@ -0,0 +1,2 @@ + +Meta (stanc.Common.Specialized.Make.Meta)

Parameter Make.Meta

type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
diff --git a/stanc/Common/Specialized/Make/index.html b/stanc/Common/Specialized/Make/index.html new file mode 100644 index 000000000..058f1db0d --- /dev/null +++ b/stanc/Common/Specialized/Make/index.html @@ -0,0 +1,7 @@ + +Make (stanc.Common.Specialized.Make)

Module Specialized.Make

Parameters

module X : Unspecialized
module Meta : Meta

Signature

type t = Meta.t X.t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
include Core.Comparator.S with type t := t
type comparator_witness
include Core.Comparable.S + with type t := t + and type comparator_witness := comparator_witness
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
diff --git a/stanc/Common/Specialized/Make2/Map/Key/index.html b/stanc/Common/Specialized/Make2/Map/Key/index.html new file mode 100644 index 000000000..96e2da4d1 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/Make2/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Common/Specialized/Make2/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..8a6151f6d --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make2/Map/Provide_bin_io/index.html b/stanc/Common/Specialized/Make2/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..751cc785c --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.Make2.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Common/Specialized/Make2/Map/Provide_hash/argument-1-Key/index.html b/stanc/Common/Specialized/Make2/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..fa47bca3a --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/Make2/Map/Provide_hash/index.html b/stanc/Common/Specialized/Make2/Map/Provide_hash/index.html new file mode 100644 index 000000000..5cf5a5c8d --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Common.Specialized.Make2.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Common/Specialized/Make2/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Common/Specialized/Make2/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..0fc8e8de0 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Common/Specialized/Make2/Map/Provide_of_sexp/index.html b/stanc/Common/Specialized/Make2/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..4561e4104 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.Make2.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Common/Specialized/Make2/Map/index.html b/stanc/Common/Specialized/Make2/Map/index.html new file mode 100644 index 000000000..85e5cf208 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Common.Specialized.Make2.Map)

Module Make2.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/Make2/Replace_polymorphic_compare/index.html b/stanc/Common/Specialized/Make2/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..75708cc06 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Common.Specialized.Make2.Replace_polymorphic_compare)

Module Make2.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Common/Specialized/Make2/Set/Elt/index.html b/stanc/Common/Specialized/Make2/Set/Elt/index.html new file mode 100644 index 000000000..e5a3e548d --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/Make2/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Common/Specialized/Make2/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..76a698320 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make2/Set/Provide_bin_io/index.html b/stanc/Common/Specialized/Make2/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..9fe58877b --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.Make2.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make2/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Common/Specialized/Make2/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..170c83c19 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/Make2/Set/Provide_hash/index.html b/stanc/Common/Specialized/Make2/Set/Provide_hash/index.html new file mode 100644 index 000000000..53d96152d --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Common.Specialized.Make2.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Common/Specialized/Make2/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Common/Specialized/Make2/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..e7b1262f6 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Common/Specialized/Make2/Set/Provide_of_sexp/index.html b/stanc/Common/Specialized/Make2/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..d96294c5b --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.Make2.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Common/Specialized/Make2/Set/index.html b/stanc/Common/Specialized/Make2/Set/index.html new file mode 100644 index 000000000..8ee1be888 --- /dev/null +++ b/stanc/Common/Specialized/Make2/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Common.Specialized.Make2.Set)

Module Make2.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/Make2/argument-1-X/index.html b/stanc/Common/Specialized/Make2/argument-1-X/index.html new file mode 100644 index 000000000..e78197cb4 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-1-X/index.html @@ -0,0 +1,21 @@ + +X (stanc.Common.Specialized.Make2.X)

Parameter Make2.X

type ('a, 'b) t
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/Key/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/Key/index.html new file mode 100644 index 000000000..795cfc611 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.First.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..760aff221 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.First.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_bin_io/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..7eac0b359 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.Make2.First.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_hash/argument-1-Key/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..b0bbc2f28 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.First.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_hash/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_hash/index.html new file mode 100644 index 000000000..6ff29dbda --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Common.Specialized.Make2.First.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..ec07459c4 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.Make2.First.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_of_sexp/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..88b61d282 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.Make2.First.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Map/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Map/index.html new file mode 100644 index 000000000..225780871 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Common.Specialized.Make2.First.Map)

Module First.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Meta/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Meta/index.html new file mode 100644 index 000000000..6fbd2ff27 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Meta/index.html @@ -0,0 +1,2 @@ + +Meta (stanc.Common.Specialized.Make2.First.Meta)

Module First.Meta

type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Replace_polymorphic_compare/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..1ca428f0a --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Common.Specialized.Make2.First.Replace_polymorphic_compare)

Module First.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/Elt/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/Elt/index.html new file mode 100644 index 000000000..92785025c --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.First.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..431e898f0 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.First.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_bin_io/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..4dea29fb1 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.Make2.First.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..423e61993 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.First.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_hash/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_hash/index.html new file mode 100644 index 000000000..d2b5c12c4 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Common.Specialized.Make2.First.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..b1365addd --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.Make2.First.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_of_sexp/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..73d25809e --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.Make2.First.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/Set/index.html b/stanc/Common/Specialized/Make2/argument-2-First/Set/index.html new file mode 100644 index 000000000..717e494c6 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Common.Specialized.Make2.First.Set)

Module First.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/Make2/argument-2-First/index.html b/stanc/Common/Specialized/Make2/argument-2-First/index.html new file mode 100644 index 000000000..8e923bf16 --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-2-First/index.html @@ -0,0 +1,7 @@ + +First (stanc.Common.Specialized.Make2.First)

Parameter Make2.First

type t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
module Meta : Meta
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
include Core.Comparator.S with type t := t
type comparator_witness
include Core.Comparable.S + with type t := t + and type comparator_witness := comparator_witness
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
diff --git a/stanc/Common/Specialized/Make2/argument-3-Meta/index.html b/stanc/Common/Specialized/Make2/argument-3-Meta/index.html new file mode 100644 index 000000000..73b53443c --- /dev/null +++ b/stanc/Common/Specialized/Make2/argument-3-Meta/index.html @@ -0,0 +1,2 @@ + +Meta (stanc.Common.Specialized.Make2.Meta)

Parameter Make2.Meta

type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
diff --git a/stanc/Common/Specialized/Make2/index.html b/stanc/Common/Specialized/Make2/index.html new file mode 100644 index 000000000..9df11603b --- /dev/null +++ b/stanc/Common/Specialized/Make2/index.html @@ -0,0 +1,7 @@ + +Make2 (stanc.Common.Specialized.Make2)

Module Specialized.Make2

Parameters

module X : Unspecialized2
module First : S
module Meta : Meta

Signature

type t = (First.Meta.t, Meta.t) X.t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
include Core.Comparator.S with type t := t
type comparator_witness
include Core.Comparable.S + with type t := t + and type comparator_witness := comparator_witness
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
diff --git a/stanc/Common/Specialized/index.html b/stanc/Common/Specialized/index.html new file mode 100644 index 000000000..99ca1a5ae --- /dev/null +++ b/stanc/Common/Specialized/index.html @@ -0,0 +1,9 @@ + +Specialized (stanc.Common.Specialized)

Module Common.Specialized

This module defines signature and functors used to 'specialize' a fixed-point type that is polymorphic in the type of meta-data to a particular type of meta-data.

This specialization is useful since we end up with a concrete type of kind * (i.e. not a type _constructor_) allowing us to make the type Comparable. In the analysis and optimization code, we work with map's and sets of our IR types a lot and this approach makes the types much nicer to work with.

module type Meta = sig ... end

Signature of all meta data used to annotate IRs

module type Unspecialized = sig ... end
module type Unspecialized2 = sig ... end
module type S = sig ... end

Since the type t is now concrete (i.e. not a type _constructor_) we can construct a Comparable.S giving us Map and Set specialized to the type.

module Make + (X : Unspecialized) + (Meta : Meta) : + S with type t = Meta.t X.t and module Meta := Meta
module Make2 + (X : Unspecialized2) + (First : S) + (Meta : Meta) : + S with type t = (First.Meta.t, Meta.t) X.t and module Meta := Meta
diff --git a/stanc/Common/Specialized/module-type-Meta/index.html b/stanc/Common/Specialized/module-type-Meta/index.html new file mode 100644 index 000000000..28d33cd4c --- /dev/null +++ b/stanc/Common/Specialized/module-type-Meta/index.html @@ -0,0 +1,2 @@ + +Meta (stanc.Common.Specialized.Meta)

Module type Specialized.Meta

Signature of all meta data used to annotate IRs

type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
diff --git a/stanc/Common/Specialized/module-type-S/Map/Key/index.html b/stanc/Common/Specialized/module-type-S/Map/Key/index.html new file mode 100644 index 000000000..1cbe247c5 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.S.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/module-type-S/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Common/Specialized/module-type-S/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..f0e14cc24 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.S.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/module-type-S/Map/Provide_bin_io/index.html b/stanc/Common/Specialized/module-type-S/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..673b9098b --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.S.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Common/Specialized/module-type-S/Map/Provide_hash/argument-1-Key/index.html b/stanc/Common/Specialized/module-type-S/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..ea3e744da --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.S.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/module-type-S/Map/Provide_hash/index.html b/stanc/Common/Specialized/module-type-S/Map/Provide_hash/index.html new file mode 100644 index 000000000..b87e6ba9c --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Common.Specialized.S.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Common/Specialized/module-type-S/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Common/Specialized/module-type-S/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..3a00632ef --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Common.Specialized.S.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Common/Specialized/module-type-S/Map/Provide_of_sexp/index.html b/stanc/Common/Specialized/module-type-S/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..213269313 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.S.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Common/Specialized/module-type-S/Map/index.html b/stanc/Common/Specialized/module-type-S/Map/index.html new file mode 100644 index 000000000..6d8222ae4 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Common.Specialized.S.Map)

Module S.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/module-type-S/Meta/index.html b/stanc/Common/Specialized/module-type-S/Meta/index.html new file mode 100644 index 000000000..894b7391f --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Meta/index.html @@ -0,0 +1,2 @@ + +Meta (stanc.Common.Specialized.S.Meta)

Module S.Meta

type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
diff --git a/stanc/Common/Specialized/module-type-S/Replace_polymorphic_compare/index.html b/stanc/Common/Specialized/module-type-S/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..191c8e8a0 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Common.Specialized.S.Replace_polymorphic_compare)

Module S.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Common/Specialized/module-type-S/Set/Elt/index.html b/stanc/Common/Specialized/module-type-S/Set/Elt/index.html new file mode 100644 index 000000000..099387a3f --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.S.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Common/Specialized/module-type-S/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Common/Specialized/module-type-S/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..6262fdd74 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.S.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/module-type-S/Set/Provide_bin_io/index.html b/stanc/Common/Specialized/module-type-S/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..4a37f770b --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Common.Specialized.S.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Common/Specialized/module-type-S/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Common/Specialized/module-type-S/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..0dba5dedb --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.S.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Common/Specialized/module-type-S/Set/Provide_hash/index.html b/stanc/Common/Specialized/module-type-S/Set/Provide_hash/index.html new file mode 100644 index 000000000..9b857a7a4 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Common.Specialized.S.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Common/Specialized/module-type-S/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Common/Specialized/module-type-S/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..a5d0d2b54 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Common.Specialized.S.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Common/Specialized/module-type-S/Set/Provide_of_sexp/index.html b/stanc/Common/Specialized/module-type-S/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..bafc01ee3 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Common.Specialized.S.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Common/Specialized/module-type-S/Set/index.html b/stanc/Common/Specialized/module-type-S/Set/index.html new file mode 100644 index 000000000..60b095f0d --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Common.Specialized.S.Set)

Module S.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Common/Specialized/module-type-S/index.html b/stanc/Common/Specialized/module-type-S/index.html new file mode 100644 index 000000000..b411128d5 --- /dev/null +++ b/stanc/Common/Specialized/module-type-S/index.html @@ -0,0 +1,7 @@ + +S (stanc.Common.Specialized.S)

Module type Specialized.S

Since the type t is now concrete (i.e. not a type _constructor_) we can construct a Comparable.S giving us Map and Set specialized to the type.

type t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
module Meta : Meta
include Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
include Core.Comparator.S with type t := t
type comparator_witness
include Core.Comparable.S + with type t := t + and type comparator_witness := comparator_witness
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
diff --git a/stanc/Common/Specialized/module-type-Unspecialized/index.html b/stanc/Common/Specialized/module-type-Unspecialized/index.html new file mode 100644 index 000000000..07c5b347b --- /dev/null +++ b/stanc/Common/Specialized/module-type-Unspecialized/index.html @@ -0,0 +1,10 @@ + +Unspecialized (stanc.Common.Specialized.Unspecialized)

Module type Specialized.Unspecialized

type 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Common/Specialized/module-type-Unspecialized2/index.html b/stanc/Common/Specialized/module-type-Unspecialized2/index.html new file mode 100644 index 000000000..35159c26b --- /dev/null +++ b/stanc/Common/Specialized/module-type-Unspecialized2/index.html @@ -0,0 +1,21 @@ + +Unspecialized2 (stanc.Common.Specialized.Unspecialized2)

Module type Specialized.Unspecialized2

type ('a, 'b) t
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
diff --git a/stanc/Common/index.html b/stanc/Common/index.html new file mode 100644 index 000000000..1aa6f7f15 --- /dev/null +++ b/stanc/Common/index.html @@ -0,0 +1,2 @@ + +Common (stanc.Common)

Module Common

module Fixed : sig ... end

This module defines the signatures and Make functors for the 'fixed point' (or two-level) type we use for our intermediate representations

module Foldable : sig ... end

This module follows the Jane Street organisation and naming conventions for 'standard interfaces' i.e. commonly used signatures; briefly:

module Gensym : sig ... end

Generate fresh (never before used) symbols.

module ICE : sig ... end

Internal compiler errors

module Pattern : sig ... end

A Pattern defines the signature of modules that may be fixed with Fixed.Make and Fixed.Make2.

module Pretty : sig ... end

Named signatures for types that can be pretty-printed.

module Specialized : sig ... end

This module defines signature and functors used to 'specialize' a fixed-point type that is polymorphic in the type of meta-data to a particular type of meta-data.

diff --git a/stanc/Frontend/Ast/index.html b/stanc/Frontend/Ast/index.html new file mode 100644 index 000000000..96a1aca22 --- /dev/null +++ b/stanc/Frontend/Ast/index.html @@ -0,0 +1,388 @@ + +Ast (stanc.Frontend.Ast)

Module Frontend.Ast

Abstract syntax tree for Stan. Defined with the 'two-level types' pattern, where the variant types are not directly recursive, but rather parametric in some other type.

This type ends up being substituted for the fixpoint of the recursive type itself including metadata. So instead of recursively referencing expression you would instead reference type parameter 'e, which will later be filled in with something like type expr_with_meta = metadata expression

type identifier = {
  1. name : string;
  2. id_loc : Middle.Location_span.t;
}

Our type for identifiers, on which we record a location

val identifier_of_sexp : Sexplib0.Sexp.t -> identifier
val sexp_of_identifier : identifier -> Sexplib0.Sexp.t
val hash_fold_identifier : + Ppx_hash_lib.Std.Hash.state -> + identifier -> + Ppx_hash_lib.Std.Hash.state
val hash_identifier : identifier -> Ppx_hash_lib.Std.Hash.hash_value
val compare_identifier : identifier -> identifier -> int
type 'e index =
  1. | All
  2. | Single of 'e
  3. | Upfrom of 'e
  4. | Downfrom of 'e
  5. | Between of 'e * 'e

Indices for array access

val map_index : ('a -> 'b) -> 'c index -> 'd index
val fold_index : ('a -> 'b -> 'c) -> 'd -> 'e index -> 'f
val index_of_sexp : 'e. (Sexplib0.Sexp.t -> 'e) -> Sexplib0.Sexp.t -> 'e index
val sexp_of_index : 'e. ('e -> Sexplib0.Sexp.t) -> 'e index -> Sexplib0.Sexp.t
val hash_fold_index : + 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e index -> + Ppx_hash_lib.Std.Hash.state
val compare_index : 'e. ('e -> 'e -> int) -> 'e index -> 'e index -> int
type fun_kind =
  1. | StanLib of bool Middle.Fun_kind.suffix
  2. | UserDefined of bool Middle.Fun_kind.suffix

Front-end function kinds

val compare_fun_kind : fun_kind -> fun_kind -> int
val fun_kind_of_sexp : Sexplib0.Sexp.t -> fun_kind
val sexp_of_fun_kind : fun_kind -> Sexplib0.Sexp.t
val hash_fold_fun_kind : + Ppx_hash_lib.Std.Hash.state -> + fun_kind -> + Ppx_hash_lib.Std.Hash.state
val hash_fun_kind : fun_kind -> Ppx_hash_lib.Std.Hash.hash_value
type ('e, 'f) expression =
  1. | TernaryIf of 'e * 'e * 'e
  2. | BinOp of 'e * Middle.Operator.t * 'e
  3. | PrefixOp of Middle.Operator.t * 'e
  4. | PostfixOp of 'e * Middle.Operator.t
  5. | Variable of identifier
  6. | IntNumeral of string
  7. | RealNumeral of string
  8. | ImagNumeral of string
  9. | FunApp of 'f * identifier * 'e list
  10. | CondDistApp of 'f * identifier * 'e list
  11. | Promotion of 'e * Middle.UnsizedType.t * Middle.UnsizedType.autodifftype
  12. | GetTarget
  13. | ArrayExpr of 'e list
  14. | RowVectorExpr of 'e list
  15. | Paren of 'e
  16. | Indexed of 'e * 'e index list
  17. | TupleProjection of 'e * int
  18. | TupleExpr of 'e list

Expression shapes (used for both typed and untyped expressions, where we substitute untyped_expression or typed_expression for 'e

val map_expression : + ('a -> 'b) -> + ('c -> 'd) -> + ('e, 'f) expression -> + ('g, 'h) expression
val fold_expression : + ('a -> 'b -> 'a) -> + ('c -> 'd -> 'e) -> + 'f -> + ('g, 'h) expression -> + 'i
val expression_of_sexp : + 'e 'f. (Sexplib0.Sexp.t -> 'e) -> + (Sexplib0.Sexp.t -> 'f) -> + Sexplib0.Sexp.t -> + ('e, 'f) expression
val sexp_of_expression : + 'e 'f. ('e -> Sexplib0.Sexp.t) -> + ('f -> Sexplib0.Sexp.t) -> + ('e, 'f) expression -> + Sexplib0.Sexp.t
val hash_fold_expression : + 'e 'f. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'f -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + ('e, 'f) expression -> + Ppx_hash_lib.Std.Hash.state
val compare_expression : + 'e 'f. ('e -> 'e -> Core__.Import.int) -> + ('f -> 'f -> Core__.Import.int) -> + ('e, 'f) expression -> + ('e, 'f) expression -> + Core__.Import.int
type ('m, 'f) expr_with = {
  1. expr : (('m, 'f) expr_with, 'f) expression;
  2. emeta : 'm;
}
val map_expr_with : + ('m -> 'a) -> + ('f -> 'b) -> + ('m0, 'f0) expr_with -> + ('c, 'd) expr_with
val fold_expr_with : + ('a -> 'b -> 'c) -> + ('d -> 'e -> 'd) -> + 'd -> + ('f, 'g) expr_with -> + 'd
val expr_with_of_sexp : + 'm 'f. (Sexplib0.Sexp.t -> 'm) -> + (Sexplib0.Sexp.t -> 'f) -> + Sexplib0.Sexp.t -> + ('m, 'f) expr_with
val sexp_of_expr_with : + 'm 'f. ('m -> Sexplib0.Sexp.t) -> + ('f -> Sexplib0.Sexp.t) -> + ('m, 'f) expr_with -> + Sexplib0.Sexp.t
val compare_expr_with : + 'm 'f. ('m -> 'm -> Core__.Import.int) -> + ('f -> 'f -> Core__.Import.int) -> + ('m, 'f) expr_with -> + ('m, 'f) expr_with -> + Core__.Import.int
val hash_fold_expr_with : + 'm 'f. (Ppx_hash_lib.Std.Hash.state -> 'm -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'f -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + ('m, 'f) expr_with -> + Ppx_hash_lib.Std.Hash.state
type located_meta = {
  1. loc : Middle.Location_span.t;
}

Untyped expressions, which have location_spans as meta-data

val map_located_meta : located_meta -> located_meta
val fold_located_meta : 'a -> located_meta -> 'b
val located_meta_of_sexp : Sexplib0.Sexp.t -> located_meta
val sexp_of_located_meta : located_meta -> Sexplib0.Sexp.t
val compare_located_meta : located_meta -> located_meta -> int
val hash_fold_located_meta : + Ppx_hash_lib.Std.Hash.state -> + located_meta -> + Ppx_hash_lib.Std.Hash.state
val hash_located_meta : located_meta -> Ppx_hash_lib.Std.Hash.hash_value
type untyped_expression = (located_meta, unit) expr_with
val map_untyped_expression : 'a -> 'b
val fold_untyped_expression : 'a -> 'b -> 'c
val untyped_expression_of_sexp : Sexplib0.Sexp.t -> untyped_expression
val sexp_of_untyped_expression : untyped_expression -> Sexplib0.Sexp.t
val compare_untyped_expression : + untyped_expression -> + untyped_expression -> + int
val hash_fold_untyped_expression : + Ppx_hash_lib.Std.Hash.state -> + untyped_expression -> + Ppx_hash_lib.Std.Hash.state
val hash_untyped_expression : + untyped_expression -> + Ppx_hash_lib.Std.Hash.hash_value
type typed_expr_meta = {
  1. loc : Middle.Location_span.t;
  2. ad_level : Middle.UnsizedType.autodifftype;
  3. type_ : Middle.UnsizedType.t;
}

Typed expressions also have meta-data after type checking: a location_span, as well as a type and an origin block (lub of the origin blocks of the identifiers in it)

val map_typed_expr_meta : typed_expr_meta -> typed_expr_meta
val fold_typed_expr_meta : 'a -> typed_expr_meta -> 'b
val typed_expr_meta_of_sexp : Sexplib0.Sexp.t -> typed_expr_meta
val sexp_of_typed_expr_meta : typed_expr_meta -> Sexplib0.Sexp.t
val compare_typed_expr_meta : typed_expr_meta -> typed_expr_meta -> int
val hash_fold_typed_expr_meta : + Ppx_hash_lib.Std.Hash.state -> + typed_expr_meta -> + Ppx_hash_lib.Std.Hash.state
val hash_typed_expr_meta : typed_expr_meta -> Ppx_hash_lib.Std.Hash.hash_value
type typed_expression = (typed_expr_meta, fun_kind) expr_with
val map_typed_expression : 'a -> 'b
val fold_typed_expression : 'a -> 'b -> 'c
val typed_expression_of_sexp : Sexplib0.Sexp.t -> typed_expression
val sexp_of_typed_expression : typed_expression -> Sexplib0.Sexp.t
val compare_typed_expression : typed_expression -> typed_expression -> int
val hash_fold_typed_expression : + Ppx_hash_lib.Std.Hash.state -> + typed_expression -> + Ppx_hash_lib.Std.Hash.state
val hash_typed_expression : + typed_expression -> + Ppx_hash_lib.Std.Hash.hash_value
val mk_untyped_expression : + expr:((located_meta, 'a) expr_with, 'a) expression -> + loc:Middle.Location_span.t -> + (located_meta, 'a) expr_with
val mk_typed_expression : + expr:((typed_expr_meta, 'a) expr_with, 'a) expression -> + loc:Middle.Location_span.t -> + type_:Middle.UnsizedType.t -> + ad_level:Middle.UnsizedType.autodifftype -> + (typed_expr_meta, 'a) expr_with
val expr_loc_lub : + (typed_expr_meta, 'a) expr_with list -> + Middle.Location_span.t
val expr_ad_lub : + (typed_expr_meta, 'a) expr_with list -> + Middle.UnsizedType.autodifftype option

Least upper bound of expression autodiff types

type assignmentoperator =
  1. | Assign
  2. | OperatorAssign of Middle.Operator.t

Assignment operators

val assignmentoperator_of_sexp : Sexplib0.Sexp.t -> assignmentoperator
val sexp_of_assignmentoperator : assignmentoperator -> Sexplib0.Sexp.t
val hash_fold_assignmentoperator : + Ppx_hash_lib.Std.Hash.state -> + assignmentoperator -> + Ppx_hash_lib.Std.Hash.state
val hash_assignmentoperator : + assignmentoperator -> + Ppx_hash_lib.Std.Hash.hash_value
val compare_assignmentoperator : + assignmentoperator -> + assignmentoperator -> + int
type 'e truncation =
  1. | NoTruncate
  2. | TruncateUpFrom of 'e
  3. | TruncateDownFrom of 'e
  4. | TruncateBetween of 'e * 'e

Truncations

val map_truncation : ('a -> 'b) -> 'c truncation -> 'd truncation
val fold_truncation : ('a -> 'b -> 'c) -> 'd -> 'e truncation -> 'f
val truncation_of_sexp : + 'e. (Sexplib0.Sexp.t -> 'e) -> + Sexplib0.Sexp.t -> + 'e truncation
val sexp_of_truncation : + 'e. ('e -> Sexplib0.Sexp.t) -> + 'e truncation -> + Sexplib0.Sexp.t
val hash_fold_truncation : + 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e truncation -> + Ppx_hash_lib.Std.Hash.state
val compare_truncation : + 'e. ('e -> 'e -> int) -> + 'e truncation -> + 'e truncation -> + int
type 'e printable =
  1. | PString of string
  2. | PExpr of 'e

Things that can be printed

val map_printable : ('a -> 'b) -> 'c printable -> 'd printable
val fold_printable : ('a -> 'b -> 'c) -> 'd -> 'e printable -> 'f
val printable_of_sexp : + 'e. (Sexplib0.Sexp.t -> 'e) -> + Sexplib0.Sexp.t -> + 'e printable
val sexp_of_printable : + 'e. ('e -> Sexplib0.Sexp.t) -> + 'e printable -> + Sexplib0.Sexp.t
val compare_printable : + 'e. ('e -> 'e -> Core__.Import.int) -> + 'e printable -> + 'e printable -> + Core__.Import.int
val hash_fold_printable : + 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e printable -> + Ppx_hash_lib.Std.Hash.state
type ('l, 'e) lvalue =
  1. | LVariable of identifier
  2. | LIndexed of 'l * 'e index list
  3. | LTupleProjection of 'l * int
val map_lvalue : ('a -> 'b) -> ('c -> 'd) -> ('e, 'f) lvalue -> ('g, 'h) lvalue
val fold_lvalue : + ('a -> 'b -> 'c) -> + ('d -> 'e -> 'd) -> + 'f -> + ('g, 'h) lvalue -> + 'i
val lvalue_of_sexp : + 'l 'e. (Sexplib0.Sexp.t -> 'l) -> + (Sexplib0.Sexp.t -> 'e) -> + Sexplib0.Sexp.t -> + ('l, 'e) lvalue
val sexp_of_lvalue : + 'l 'e. ('l -> Sexplib0.Sexp.t) -> + ('e -> Sexplib0.Sexp.t) -> + ('l, 'e) lvalue -> + Sexplib0.Sexp.t
val hash_fold_lvalue : + 'l 'e. (Ppx_hash_lib.Std.Hash.state -> 'l -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + ('l, 'e) lvalue -> + Ppx_hash_lib.Std.Hash.state
val compare_lvalue : + 'l 'e. ('l -> 'l -> Core__.Import.int) -> + ('e -> 'e -> Core__.Import.int) -> + ('l, 'e) lvalue -> + ('l, 'e) lvalue -> + Core__.Import.int
type 'l lvalue_pack =
  1. | LValue of 'l
  2. | LTuplePack of {
    1. lvals : 'l lvalue_pack list;
    2. loc : Middle.Location_span.t;
    }
val map_lvalue_pack : ('a -> 'b) -> 'c lvalue_pack -> 'd lvalue_pack
val fold_lvalue_pack : ('a -> 'b -> 'c) -> 'd -> 'e lvalue_pack -> 'd
val lvalue_pack_of_sexp : + 'l. (Sexplib0.Sexp.t -> 'l) -> + Sexplib0.Sexp.t -> + 'l lvalue_pack
val sexp_of_lvalue_pack : + 'l. ('l -> Sexplib0.Sexp.t) -> + 'l lvalue_pack -> + Sexplib0.Sexp.t
val hash_fold_lvalue_pack : + 'l. (Ppx_hash_lib.Std.Hash.state -> 'l -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'l lvalue_pack -> + Ppx_hash_lib.Std.Hash.state
val compare_lvalue_pack : + 'l. ('l -> 'l -> Core__.Import.int) -> + 'l lvalue_pack -> + 'l lvalue_pack -> + Core__.Import.int
type ('e, 'm) lval_with = {
  1. lval : (('e, 'm) lval_with, 'e) lvalue;
  2. lmeta : 'm;
}
val map_lval_with : + ('e -> 'a) -> + ('m -> 'b) -> + ('e0, 'm0) lval_with -> + ('c, 'd) lval_with
val fold_lval_with : + ('a -> 'b -> 'a) -> + ('c -> 'd -> 'e) -> + 'a -> + ('f, 'g) lval_with -> + 'a
val lval_with_of_sexp : + 'e 'm. (Sexplib0.Sexp.t -> 'e) -> + (Sexplib0.Sexp.t -> 'm) -> + Sexplib0.Sexp.t -> + ('e, 'm) lval_with
val sexp_of_lval_with : + 'e 'm. ('e -> Sexplib0.Sexp.t) -> + ('m -> Sexplib0.Sexp.t) -> + ('e, 'm) lval_with -> + Sexplib0.Sexp.t
val hash_fold_lval_with : + 'e 'm. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'm -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + ('e, 'm) lval_with -> + Ppx_hash_lib.Std.Hash.state
val compare_lval_with : + 'e 'm. ('e -> 'e -> Core__.Import.int) -> + ('m -> 'm -> Core__.Import.int) -> + ('e, 'm) lval_with -> + ('e, 'm) lval_with -> + Core__.Import.int
val map_untyped_lval : 'a -> 'b
val fold_untyped_lval : 'a -> 'b -> 'c
val untyped_lval_of_sexp : Sexplib0.Sexp.t -> untyped_lval
val sexp_of_untyped_lval : untyped_lval -> Sexplib0.Sexp.t
val hash_fold_untyped_lval : + Ppx_hash_lib.Std.Hash.state -> + untyped_lval -> + Ppx_hash_lib.Std.Hash.state
val hash_untyped_lval : untyped_lval -> Ppx_hash_lib.Std.Hash.hash_value
val compare_untyped_lval : untyped_lval -> untyped_lval -> int
type untyped_lval_pack = untyped_lval lvalue_pack
val untyped_lval_pack_of_sexp : Sexplib0.Sexp.t -> untyped_lval_pack
val sexp_of_untyped_lval_pack : untyped_lval_pack -> Sexplib0.Sexp.t
val compare_untyped_lval_pack : untyped_lval_pack -> untyped_lval_pack -> int
val map_typed_lval : 'a -> 'b
val fold_typed_lval : 'a -> 'b -> 'c
val typed_lval_of_sexp : Sexplib0.Sexp.t -> typed_lval
val sexp_of_typed_lval : typed_lval -> Sexplib0.Sexp.t
val hash_fold_typed_lval : + Ppx_hash_lib.Std.Hash.state -> + typed_lval -> + Ppx_hash_lib.Std.Hash.state
val hash_typed_lval : typed_lval -> Ppx_hash_lib.Std.Hash.hash_value
val compare_typed_lval : typed_lval -> typed_lval -> int
type typed_lval_pack = typed_lval lvalue_pack
val typed_lval_pack_of_sexp : Sexplib0.Sexp.t -> typed_lval_pack
val sexp_of_typed_lval_pack : typed_lval_pack -> Sexplib0.Sexp.t
val compare_typed_lval_pack : typed_lval_pack -> typed_lval_pack -> int
type 'e variable = {
  1. identifier : identifier;
  2. initial_value : 'e option;
}
val map_variable : ('e -> 'a) -> 'e0 variable -> 'b variable
val fold_variable : ('a -> 'b -> 'c) -> 'd -> 'e variable -> 'f
val variable_of_sexp : + 'e. (Sexplib0.Sexp.t -> 'e) -> + Sexplib0.Sexp.t -> + 'e variable
val sexp_of_variable : + 'e. ('e -> Sexplib0.Sexp.t) -> + 'e variable -> + Sexplib0.Sexp.t
val hash_fold_variable : + 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e variable -> + Ppx_hash_lib.Std.Hash.state
val compare_variable : + 'e. ('e -> 'e -> Core__.Import.int) -> + 'e variable -> + 'e variable -> + Core__.Import.int
type ('e, 's, 'l, 'f) statement =
  1. | Assignment of {
    1. assign_lhs : 'l lvalue_pack;
    2. assign_op : assignmentoperator;
    3. assign_rhs : 'e;
    }
  2. | NRFunApp of 'f * identifier * 'e list
  3. | TargetPE of 'e
  4. | Tilde of {
    1. arg : 'e;
    2. distribution : identifier;
    3. args : 'e list;
    4. truncation : 'e truncation;
    }
  5. | Break
  6. | Continue
  7. | Return of 'e
  8. | ReturnVoid
  9. | Print of 'e printable list
  10. | Reject of 'e printable list
  11. | FatalError of 'e printable list
  12. | Skip
  13. | IfThenElse of 'e * 's * 's option
  14. | While of 'e * 's
  15. | For of {
    1. loop_variable : identifier;
    2. lower_bound : 'e;
    3. upper_bound : 'e;
    4. loop_body : 's;
    }
  16. | ForEach of identifier * 'e * 's
  17. | Profile of string * 's list
  18. | Block of 's list
  19. | VarDecl of {
    1. decl_type : 'e Middle.SizedType.t;
    2. transformation : 'e Middle.Transformation.t;
    3. is_global : bool;
    4. variables : 'e variable list;
    }
  20. | FunDef of {
    1. returntype : Middle.UnsizedType.returntype;
    2. funname : identifier;
    3. arguments : (Middle.UnsizedType.autodifftype + * Middle.UnsizedType.t + * identifier) + list;
    4. body : 's;
    }

Statement shapes, where we substitute untyped_expression and untyped_statement for 'e and 's respectively to get untyped_statement and typed_expression and typed_statement to get typed_statement

val map_statement : + ('a -> 'b) -> + ('c -> 'd) -> + ('e -> 'f) -> + ('g -> 'h) -> + ('i, 'j, 'k, 'l) statement -> + ('m, 'n, 'o, 'p) statement
val fold_statement : + ('a -> 'b -> 'a) -> + ('c -> 'd -> 'c) -> + ('e -> 'f -> 'e) -> + ('g -> 'h -> 'i) -> + 'j -> + ('k, 'l, 'm, 'n) statement -> + 'o
val statement_of_sexp : + 'e 's 'l 'f. (Sexplib0.Sexp.t -> 'e) -> + (Sexplib0.Sexp.t -> 's) -> + (Sexplib0.Sexp.t -> 'l) -> + (Sexplib0.Sexp.t -> 'f) -> + Sexplib0.Sexp.t -> + ('e, 's, 'l, 'f) statement
val sexp_of_statement : + 'e 's 'l 'f. ('e -> Sexplib0.Sexp.t) -> + ('s -> Sexplib0.Sexp.t) -> + ('l -> Sexplib0.Sexp.t) -> + ('f -> Sexplib0.Sexp.t) -> + ('e, 's, 'l, 'f) statement -> + Sexplib0.Sexp.t
val hash_fold_statement : + 'e 's 'l 'f. (Ppx_hash_lib.Std.Hash.state -> + 'e -> + Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 's -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'l -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'f -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + ('e, 's, 'l, 'f) statement -> + Ppx_hash_lib.Std.Hash.state
val compare_statement : + 'e 's 'l 'f. ('e -> 'e -> Core__.Import.int) -> + ('s -> 's -> Core__.Import.int) -> + ('l -> 'l -> Core__.Import.int) -> + ('f -> 'f -> Core__.Import.int) -> + ('e, 's, 'l, 'f) statement -> + ('e, 's, 'l, 'f) statement -> + Core__.Import.int
type statement_returntype =
  1. | Incomplete
  2. | NonlocalControlFlow
  3. | Complete

Statement return types which we will decorate statements with during type checking:

  • Complete corresponds to statements that exit the function (return or error) in every branch
  • Incomplete corresponds to statements which pass control flow to following statements in at least some branches
  • NonlocalControlFlow is simila to Incomplete but specifically used when breaks are present in loops. Normally, an infinite loop with Incomplete return type is fine (and considered Complete), since it either returns or diverges. However, in the presence of break statements, control flow may jump to the end of the loop.
val statement_returntype_of_sexp : Sexplib0.Sexp.t -> statement_returntype
val sexp_of_statement_returntype : statement_returntype -> Sexplib0.Sexp.t
val hash_fold_statement_returntype : + Ppx_hash_lib.Std.Hash.state -> + statement_returntype -> + Ppx_hash_lib.Std.Hash.state
val hash_statement_returntype : + statement_returntype -> + Ppx_hash_lib.Std.Hash.hash_value
val compare_statement_returntype : + statement_returntype -> + statement_returntype -> + int
type ('e, 'm, 'l, 'f) statement_with = {
  1. stmt : ('e, ('e, 'm, 'l, 'f) statement_with, 'l, 'f) statement;
  2. smeta : 'm;
}
val map_statement_with : + ('e -> 'a) -> + ('m -> 'b) -> + ('l -> 'c) -> + ('f -> 'd) -> + ('e0, 'm0, 'l0, 'f0) statement_with -> + ('g, 'h, 'i, 'j) statement_with
val fold_statement_with : + ('a -> 'b -> 'a) -> + ('c -> 'd -> 'e) -> + ('a -> 'f -> 'a) -> + ('a -> 'g -> 'a) -> + 'a -> + ('h, 'i, 'j, 'k) statement_with -> + 'a
val statement_with_of_sexp : + 'e 'm 'l 'f. (Sexplib0.Sexp.t -> 'e) -> + (Sexplib0.Sexp.t -> 'm) -> + (Sexplib0.Sexp.t -> 'l) -> + (Sexplib0.Sexp.t -> 'f) -> + Sexplib0.Sexp.t -> + ('e, 'm, 'l, 'f) statement_with
val sexp_of_statement_with : + 'e 'm 'l 'f. ('e -> Sexplib0.Sexp.t) -> + ('m -> Sexplib0.Sexp.t) -> + ('l -> Sexplib0.Sexp.t) -> + ('f -> Sexplib0.Sexp.t) -> + ('e, 'm, 'l, 'f) statement_with -> + Sexplib0.Sexp.t
val compare_statement_with : + 'e 'm 'l 'f. ('e -> 'e -> Core__.Import.int) -> + ('m -> 'm -> Core__.Import.int) -> + ('l -> 'l -> Core__.Import.int) -> + ('f -> 'f -> Core__.Import.int) -> + ('e, 'm, 'l, 'f) statement_with -> + ('e, 'm, 'l, 'f) statement_with -> + Core__.Import.int
val hash_fold_statement_with : + 'e 'm 'l 'f. (Ppx_hash_lib.Std.Hash.state -> + 'e -> + Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'm -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'l -> Ppx_hash_lib.Std.Hash.state) -> + (Ppx_hash_lib.Std.Hash.state -> 'f -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + ('e, 'm, 'l, 'f) statement_with -> + Ppx_hash_lib.Std.Hash.state
type untyped_statement = + (untyped_expression, located_meta, untyped_lval, unit) statement_with

Untyped statements, which have location_spans as meta-data

val map_untyped_statement : 'a -> 'b
val untyped_statement_of_sexp : Sexplib0.Sexp.t -> untyped_statement
val sexp_of_untyped_statement : untyped_statement -> Sexplib0.Sexp.t
val compare_untyped_statement : untyped_statement -> untyped_statement -> int
val hash_fold_untyped_statement : + Ppx_hash_lib.Std.Hash.state -> + untyped_statement -> + Ppx_hash_lib.Std.Hash.state
val hash_untyped_statement : + untyped_statement -> + Ppx_hash_lib.Std.Hash.hash_value
type stmt_typed_located_meta = {
  1. loc : Middle.Location_span.t;
  2. return_type : statement_returntype;
}
val map_stmt_typed_located_meta : + stmt_typed_located_meta -> + stmt_typed_located_meta
val stmt_typed_located_meta_of_sexp : + Sexplib0.Sexp.t -> + stmt_typed_located_meta
val sexp_of_stmt_typed_located_meta : + stmt_typed_located_meta -> + Sexplib0.Sexp.t
val compare_stmt_typed_located_meta : + stmt_typed_located_meta -> + stmt_typed_located_meta -> + int
val hash_fold_stmt_typed_located_meta : + Ppx_hash_lib.Std.Hash.state -> + stmt_typed_located_meta -> + Ppx_hash_lib.Std.Hash.state
val hash_stmt_typed_located_meta : + stmt_typed_located_meta -> + Ppx_hash_lib.Std.Hash.hash_value

Typed statements also have meta-data after type checking: a location_span, as well as a statement returntype to check that function bodies have the right return type

val map_typed_statement : 'a -> 'b
val typed_statement_of_sexp : Sexplib0.Sexp.t -> typed_statement
val sexp_of_typed_statement : typed_statement -> Sexplib0.Sexp.t
val compare_typed_statement : typed_statement -> typed_statement -> int
val hash_fold_typed_statement : + Ppx_hash_lib.Std.Hash.state -> + typed_statement -> + Ppx_hash_lib.Std.Hash.state
val hash_typed_statement : typed_statement -> Ppx_hash_lib.Std.Hash.hash_value
val mk_typed_statement : + stmt: + ('a, ('a, stmt_typed_located_meta, 'b, 'c) statement_with, 'b, 'c) + statement -> + loc:Middle.Location_span.t -> + return_type:statement_returntype -> + ('a, stmt_typed_located_meta, 'b, 'c) statement_with
type 's block = {
  1. stmts : 's list;
  2. xloc : Middle.Location_span.t;
}

Program shapes, where we obtain types of programs if we substitute typed or untyped statements for 's

and comment_type =
  1. | LineComment of string * Middle.Location_span.t
  2. | Include of string * Middle.Location_span.t
  3. | BlockComment of string list * Middle.Location_span.t
  4. | Separator of Middle.Location.t
    (*

    Separator records the location of items like commas, operators, and keywords which don't have location information stored in the AST but are useful for placing comments in pretty printing

    *)
and 's program = {
  1. functionblock : 's block option;
  2. datablock : 's block option;
  3. transformeddatablock : 's block option;
  4. parametersblock : 's block option;
  5. transformedparametersblock : 's block option;
  6. modelblock : 's block option;
  7. generatedquantitiesblock : 's block option;
  8. comments : comment_type list;
}
val map_block : ('s -> 'a) -> 's0 block -> 'b block
val map_comment_type : comment_type -> comment_type
val map_program : ('s -> 'a) -> 's0 program -> 'b program
val fold_block : ('a -> 'b -> 'a) -> 'c -> 'd block -> 'e
val fold_comment_type : 'a -> comment_type -> 'b
val fold_program : ('a -> 'b -> 'a) -> 'c -> 'd program -> 'e
val block_of_sexp : 's. (Sexplib0.Sexp.t -> 's) -> Sexplib0.Sexp.t -> 's block
val comment_type_of_sexp : Sexplib0.Sexp.t -> comment_type
val program_of_sexp : + 's. (Sexplib0.Sexp.t -> 's) -> + Sexplib0.Sexp.t -> + 's program
val sexp_of_block : 's. ('s -> Sexplib0.Sexp.t) -> 's block -> Sexplib0.Sexp.t
val sexp_of_comment_type : comment_type -> Sexplib0.Sexp.t
val sexp_of_program : + 's. ('s -> Sexplib0.Sexp.t) -> + 's program -> + Sexplib0.Sexp.t
val hash_fold_block : + 's. (Ppx_hash_lib.Std.Hash.state -> 's -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 's block -> + Ppx_hash_lib.Std.Hash.state
val hash_fold_comment_type : + Ppx_hash_lib.Std.Hash.state -> + comment_type -> + Ppx_hash_lib.Std.Hash.state
val hash_fold_program : + 's. (Ppx_hash_lib.Std.Hash.state -> 's -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 's program -> + Ppx_hash_lib.Std.Hash.state
val hash_comment_type : comment_type -> Ppx_hash_lib.Std.Hash.hash_value
val compare_block : + 's. ('s -> 's -> Core__.Import.int) -> + 's block -> + 's block -> + Core__.Import.int
val compare_comment_type : comment_type -> comment_type -> int
val compare_program : + 's. ('s -> 's -> Core__.Import.int) -> + 's program -> + 's program -> + Core__.Import.int
val get_stmts : 'a block option -> 'b list
type untyped_program = untyped_statement program

Untyped programs (before type checking)

val map_untyped_program : 'a -> 'b
val untyped_program_of_sexp : Sexplib0.Sexp.t -> untyped_program
val sexp_of_untyped_program : untyped_program -> Sexplib0.Sexp.t
val compare_untyped_program : untyped_program -> untyped_program -> int
type typed_program = typed_statement program

Typed programs (after type checking)

val map_typed_program : 'a -> 'b
val typed_program_of_sexp : Sexplib0.Sexp.t -> typed_program
val sexp_of_typed_program : typed_program -> Sexplib0.Sexp.t
val compare_typed_program : typed_program -> typed_program -> int
val untyped_expression_of_typed_expression : + typed_expression -> + untyped_expression

Forgetful function from typed to untyped expressions

val untyped_lvalue_of_typed_lvalue : typed_lval -> untyped_lval
val untyped_lvalue_of_typed_lvalue_pack : + typed_lval lvalue_pack -> + untyped_lval lvalue_pack

Forgetful function from typed to untyped statements

val untyped_program_of_typed_program : typed_program -> untyped_program

Forgetful function from typed to untyped programs

val expr_of_lvalue : (('a, 'b) expr_with, 'c) lval_with -> ('a, 'b) expr_with
val extract_ids : ('a, 'b) expr_with -> identifier Base__List.t
val lvalue_of_expr_opt : + untyped_expression -> + ((located_meta, unit) expr_with, located_meta) lval_with lvalue_pack option
val get_loc_lvalue_pack : typed_lval lvalue_pack -> Middle.Location_span.t
val get_first_loc : untyped_statement -> Middle.Location.t
diff --git a/stanc/Frontend/Ast_to_Mir/index.html b/stanc/Frontend/Ast_to_Mir/index.html new file mode 100644 index 000000000..4edbf6076 --- /dev/null +++ b/stanc/Frontend/Ast_to_Mir/index.html @@ -0,0 +1,7 @@ + +Ast_to_Mir (stanc.Frontend.Ast_to_Mir)

Module Frontend.Ast_to_Mir

Translate from the AST to the MIR

val trans_prog : string -> Ast.typed_program -> Middle.Program.Typed.t
diff --git a/stanc/Frontend/Canonicalize/index.html b/stanc/Frontend/Canonicalize/index.html new file mode 100644 index 000000000..a25efa787 --- /dev/null +++ b/stanc/Frontend/Canonicalize/index.html @@ -0,0 +1,5 @@ + +Canonicalize (stanc.Frontend.Canonicalize)

Module Frontend.Canonicalize

Re-write ASTs to remove deprecated features and clean up extra parenthesis, etc

type canonicalizer_settings = {
  1. deprecations : bool;
  2. parentheses : bool;
  3. braces : bool;
  4. inline_includes : bool;
  5. strip_comments : bool;
}

Flags to enable or disable certain kinds of canonicalization. NB: inline_includes is controlled by the --canonicalize argument to stanc, but it consumed by the pretty-printer, not this module.

Equivalent to what --print-canonical did before these settings were available

val canonicalize_program : + Ast.typed_program -> + canonicalizer_settings -> + Ast.typed_program

"Canonicalize" the program by removing deprecations, adding or removing parenthesis and braces, etc.

diff --git a/stanc/Frontend/Debugging/index.html b/stanc/Frontend/Debugging/index.html new file mode 100644 index 000000000..81fb6e9c9 --- /dev/null +++ b/stanc/Frontend/Debugging/index.html @@ -0,0 +1,2 @@ + +Debugging (stanc.Frontend.Debugging)

Module Frontend.Debugging

Some helpers for debugging

val lexer_logging : bool Core.ref

Controls whether the lexing operations get logged

val lexer_logger : string -> unit
val lexer_pos_logger : Stdlib.Lexing.position -> unit
val grammar_logging : bool Core.ref

Controls whether the parsing operations get logged

val grammar_logger : string -> unit
val ast_printing : bool Core.ref

Controls whether an AST gets printed during parsing

val ast_to_string : Ast.untyped_program -> string
val ast_logger : Ast.untyped_program -> unit
val typed_ast_printing : bool Core.ref

Controls whether a decorated AST gets printed after the semantic check

val typed_ast_to_string : Ast.typed_program -> string
val typed_ast_logger : Ast.typed_program -> unit
diff --git a/stanc/Frontend/Deprecation_analysis/index.html b/stanc/Frontend/Deprecation_analysis/index.html new file mode 100644 index 000000000..8ee870ea1 --- /dev/null +++ b/stanc/Frontend/Deprecation_analysis/index.html @@ -0,0 +1,5 @@ + +Deprecation_analysis (stanc.Frontend.Deprecation_analysis)

Module Frontend.Deprecation_analysis

Utilities for emitting deprecation warnings and finding proper replacements for deprecated features

val expired : (int * int) -> bool
val deprecated_functions : (string * (int * int)) Core.String.Map.t
val rename_deprecated : + (string * (int * int)) Core.String.Map.t -> + string -> + string
val stan_lib_deprecations : (string * (int * int)) Core.String.Map.t
val collect_warnings : Ast.typed_program -> Warnings.t list
val remove_unneeded_forward_decls : Ast.typed_program -> Ast.typed_program
diff --git a/stanc/Frontend/Environment/index.html b/stanc/Frontend/Environment/index.html new file mode 100644 index 000000000..5d8895914 --- /dev/null +++ b/stanc/Frontend/Environment/index.html @@ -0,0 +1,13 @@ + +Environment (stanc.Frontend.Environment)

Module Frontend.Environment

Type environments used during typechecking. Maps from strings to function or variable information

type originblock =
  1. | MathLibrary
  2. | Functions
  3. | Data
  4. | TData
  5. | Param
  6. | TParam
  7. | Model
  8. | GQuant

Origin blocks, to keep track of where variables are declared

type varinfo = {
  1. origin : originblock;
  2. global : bool;
  3. readonly : bool;
}

Information available for each variable

type info = {
  1. type_ : Middle.UnsizedType.t;
  2. kind : [ `Variable of varinfo + | `UserDeclared of Middle.Location_span.t + | `StanMath + | `UserDefined ];
}
type t
val stan_math_environment : t

A type environment which contains the Stan math library functions

val find : t -> string -> info list
val add : + t -> + string -> + Middle.UnsizedType.t -> + [ `UserDeclared of Middle.Location_span.t + | `StanMath + | `UserDefined + | `Variable of varinfo ] -> + t

Add a new item to the type environment. Does not overwrite existing, but shadows

val set_raw : t -> string -> info list -> t

Overwrite the existing items bound to a name

val mem : t -> string -> bool
val iteri : t -> (string -> info list -> unit) -> unit
val nearest_ident : t -> string -> string option

The nearest identifier by edit distance, capped at edit distance 3 (if one exists)

diff --git a/stanc/Frontend/Errors/index.html b/stanc/Frontend/Errors/index.html new file mode 100644 index 000000000..c7dd7ef06 --- /dev/null +++ b/stanc/Frontend/Errors/index.html @@ -0,0 +1,7 @@ + +Errors (stanc.Frontend.Errors)

Module Frontend.Errors

Some plumbing for our compiler errors

type syntax_error =
  1. | Lexing of Middle.Location.t
  2. | UnexpectedEOF of Middle.Location.t
  3. | Include of string * Middle.Location.t
  4. | Parsing of string * Middle.Location_span.t

Our type of syntax error information

exception SyntaxError of syntax_error

Exception for Syntax Errors

exception SemanticError of Semantic_error.t

Exception SemanticError (loc, msg) indicates a semantic error with message msg, occurring at location loc.

type t =
  1. | FileNotFound of string
  2. | Syntax_error of syntax_error
  3. | Semantic_error of Semantic_error.t
  4. | DebugDataError of Middle.Location_span.t * string
val pp : ?printed_filename:string -> ?code:string -> t Fmt.t

Pretty-printer for error type t. Replace occurances of filename from locations with printed_filename, if supplied. If code is supplied, read context from that string. Otherwise, it will attempt to open the original file.

val to_string : t -> string

Format an error t as a string. Should only be used in testing! For user facing code, prefer pp

val pp_semantic_error : + ?printed_filename:string -> + ?code:string -> + Stdlib.Format.formatter -> + Semantic_error.t -> + unit

A semantic error message used when handling a SemanticError

diff --git a/stanc/Frontend/Include_files/index.html b/stanc/Frontend/Include_files/index.html new file mode 100644 index 000000000..87fef0610 --- /dev/null +++ b/stanc/Frontend/Include_files/index.html @@ -0,0 +1,2 @@ + +Include_files (stanc.Frontend.Include_files)

Module Frontend.Include_files

type t =
  1. | FileSystemPaths of string list
  2. | InMemory of string Core.String.Map.t
val include_provider : t Core.ref

Where and how to look for #include-d files

diff --git a/stanc/Frontend/Info/index.html b/stanc/Frontend/Info/index.html new file mode 100644 index 000000000..7f0683003 --- /dev/null +++ b/stanc/Frontend/Info/index.html @@ -0,0 +1,4 @@ + +Info (stanc.Frontend.Info)

Module Frontend.Info

Implementation of the --info option which outputs on the standard output a JSON object containing information about the model.

The JSON object has a field inputs, parameters, transformed + parameters, and generated quantities containing a dictionary where each entry corresponds to a variable in respectively the data, parameters, transformed parameters, and generated + quantities blocks. To each variable is associated an object with two fields:

  • type: the base type of the variable ("int" or "real").
  • dimensions: the number of dimensions (0 for a scalar, 1 for a vector or row vector, etc.).

The JSON object also have the fields stanlib_calls and distributions containing the name of the standard library functions called and distributions used.

val info : Ast.typed_program -> string
diff --git a/stanc/Frontend/Input_warnings/index.html b/stanc/Frontend/Input_warnings/index.html new file mode 100644 index 000000000..043b1c3fe --- /dev/null +++ b/stanc/Frontend/Input_warnings/index.html @@ -0,0 +1,6 @@ + +Input_warnings (stanc.Frontend.Input_warnings)

Module Frontend.Input_warnings

A module to contain the mutable state used to track warnings from the parser and lexer.

val init : unit -> unit

As something of a hack, Input_warnings keeps track of which warnings the lexer has emitted as a form of hidden state, which must be initialized and collected.

val collect : unit -> Warnings.t list

Returns all of the warnings issued since init was called.

val add_warning : Middle.Location_span.t -> string -> unit

Add a generic warning string to the current list

val empty : string -> unit

Register that an empty file is being parsed

val future_keyword : + string -> + string -> + (Stdlib.Lexing.position * Stdlib.Lexing.position) -> + unit

Warn on a keyword which will be reserved in the future

diff --git a/stanc/Frontend/Lexer/index.html b/stanc/Frontend/Lexer/index.html new file mode 100644 index 000000000..46cddc38b --- /dev/null +++ b/stanc/Frontend/Lexer/index.html @@ -0,0 +1,23 @@ + +Lexer (stanc.Frontend.Lexer)

Module Frontend.Lexer

module Stack = Core.Stack
module Queue = Core.Queue
val incr_linenum : Stdlib.Lexing.lexbuf -> unit
val add_line_comment : + (Stdlib.Lexing.position * Stdlib.Buffer.t) -> + Stdlib.Lexing.position -> + unit
val add_multi_comment : + Stdlib.Lexing.position -> + string list -> + Stdlib.Lexing.position -> + unit
val add_separator : Stdlib.Lexing.lexbuf -> unit
val add_include : string -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> Parser.token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> Parser.token
val multiline_comment : + ((Stdlib.Lexing.position * string list) * Stdlib.Buffer.t) -> + Stdlib.Lexing.lexbuf -> + unit
val __ocaml_lex_multiline_comment_rec : + ((Stdlib.Lexing.position * string list) * Stdlib.Buffer.t) -> + Stdlib.Lexing.lexbuf -> + int -> + unit
val singleline_comment : + (Stdlib.Lexing.position * Stdlib.Buffer.t) -> + Stdlib.Lexing.lexbuf -> + unit
val __ocaml_lex_singleline_comment_rec : + (Stdlib.Lexing.position * Stdlib.Buffer.t) -> + Stdlib.Lexing.lexbuf -> + int -> + unit
diff --git a/stanc/Frontend/Parse/index.html b/stanc/Frontend/Parse/index.html new file mode 100644 index 000000000..607ad1c8a --- /dev/null +++ b/stanc/Frontend/Parse/index.html @@ -0,0 +1,10 @@ + +Parse (stanc.Frontend.Parse)

Module Frontend.Parse

Some complicated stuff to get the custom syntax errors out of Menhir's Incremental API

val parse_file : + (Stdlib.Lexing.position -> + Ast.untyped_program Parser.MenhirInterpreter.checkpoint) -> + string -> + (Ast.untyped_program, Errors.t) Core.result * Warnings.t list

A helper function to take a parser, a filename and produce an AST. Under the hood, it takes care of Menhir's custom syntax error messages.

val parse_string : + (Stdlib.Lexing.position -> + Ast.untyped_program Parser.MenhirInterpreter.checkpoint) -> + string -> + (Ast.untyped_program, Errors.t) Core.result * Warnings.t list
diff --git a/stanc/Frontend/Parser/Incremental/index.html b/stanc/Frontend/Parser/Incremental/index.html new file mode 100644 index 000000000..80523aaf2 --- /dev/null +++ b/stanc/Frontend/Parser/Incremental/index.html @@ -0,0 +1,9 @@ + +Incremental (stanc.Frontend.Parser.Incremental)

Module Parser.Incremental

val functions_only : + Stdlib.Lexing.position -> + Ast.untyped_statement Ast.program MenhirInterpreter.checkpoint
diff --git a/stanc/Frontend/Parser/MenhirInterpreter/index.html b/stanc/Frontend/Parser/MenhirInterpreter/index.html new file mode 100644 index 000000000..4864e376a --- /dev/null +++ b/stanc/Frontend/Parser/MenhirInterpreter/index.html @@ -0,0 +1,33 @@ + +MenhirInterpreter (stanc.Frontend.Parser.MenhirInterpreter)

Module Parser.MenhirInterpreter

include MenhirLib.IncrementalEngine.INCREMENTAL_ENGINE with type token = token
type token = token
type production
type 'a env
type !'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
val offer : + 'a checkpoint -> + (token + * MenhirLib.IncrementalEngine.position + * MenhirLib.IncrementalEngine.position) -> + 'a checkpoint
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
type supplier = + unit -> + token + * MenhirLib.IncrementalEngine.position + * MenhirLib.IncrementalEngine.position
val lexer_lexbuf_to_supplier : + (Stdlib.Lexing.lexbuf -> token) -> + Stdlib.Lexing.lexbuf -> + supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : + ('a -> 'answer) -> + ('a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val loop_handle_undo : + ('a -> 'answer) -> + ('a checkpoint -> 'a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : + 'a checkpoint -> + token -> + MenhirLib.IncrementalEngine.position -> + bool
type 'a lr1state
val number : 'a lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
  1. | Element : 'a lr1state + * 'a + * MenhirLib.IncrementalEngine.position + * MenhirLib.IncrementalEngine.position -> element
type stack = element MenhirLib.General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val positions : + 'a env -> + MenhirLib.IncrementalEngine.position * MenhirLib.IncrementalEngine.position
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : 'a lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
diff --git a/stanc/Frontend/Parser/index.html b/stanc/Frontend/Parser/index.html new file mode 100644 index 000000000..e54558f9a --- /dev/null +++ b/stanc/Frontend/Parser/index.html @@ -0,0 +1,10 @@ + +Parser (stanc.Frontend.Parser)

Module Frontend.Parser

type token =
  1. | WHILE
  2. | VOID
  3. | VECTOR
  4. | UPPER
  5. | UNREACHABLE
  6. | UNITVECTOR
  7. | TUPLE
  8. | TRUNCATE
  9. | TRANSPOSE
  10. | TRANSFORMEDPARAMETERSBLOCK
  11. | TRANSFORMEDDATABLOCK
  12. | TIMESASSIGN
  13. | TIMES
  14. | TILDE
  15. | TARGET
  16. | STRINGLITERAL of string
  17. | SIMPLEX
  18. | SEMICOLON
  19. | RPAREN
  20. | ROWVECTOR
  21. | RETURN
  22. | REJECT
  23. | REALNUMERAL of string
  24. | REAL
  25. | RBRACK
  26. | RBRACE
  27. | RABRACK
  28. | QMARK
  29. | PROFILE
  30. | PRINT
  31. | POSITIVEORDERED
  32. | PLUSASSIGN
  33. | PLUS
  34. | PARAMETERSBLOCK
  35. | ORDERED
  36. | OR
  37. | OFFSET
  38. | NEQUALS
  39. | MULTIPLIER
  40. | MODULO
  41. | MODELBLOCK
  42. | MINUSASSIGN
  43. | MINUS
  44. | MATRIX
  45. | LPAREN
  46. | LOWER
  47. | LEQ
  48. | LDIVIDE
  49. | LBRACK
  50. | LBRACE
  51. | LABRACK
  52. | JACOBIAN
  53. | INTNUMERAL of string
  54. | INT
  55. | IN
  56. | IMAGNUMERAL of string
  57. | IF
  58. | IDIVIDE
  59. | IDENTIFIER of string
  60. | HAT
  61. | GEQ
  62. | GENERATEDQUANTITIESBLOCK
  63. | FUNCTIONBLOCK
  64. | FOR
  65. | FATAL_ERROR
  66. | EQUALS
  67. | EOF
  68. | ELTTIMESASSIGN
  69. | ELTTIMES
  70. | ELTPOW
  71. | ELTDIVIDEASSIGN
  72. | ELTDIVIDE
  73. | ELSE
  74. | DOTNUMERAL of string
  75. | DIVIDEASSIGN
  76. | DIVIDE
  77. | DATABLOCK
  78. | COVMATRIX
  79. | CORRMATRIX
  80. | CONTINUE
  81. | COMPLEXVECTOR
  82. | COMPLEXROWVECTOR
  83. | COMPLEXMATRIX
  84. | COMPLEX
  85. | COMMA
  86. | COLON
  87. | CHOLESKYFACTORCOV
  88. | CHOLESKYFACTORCORR
  89. | BREAK
  90. | BAR
  91. | BANG
  92. | ASSIGN
  93. | ARRAY
  94. | AND
exception Error
val program : + (Stdlib.Lexing.lexbuf -> token) -> + Stdlib.Lexing.lexbuf -> + (Ast.untyped_expression, Ast.located_meta, Ast.untyped_lval, unit) + Ast.statement_with + Ast.program
val functions_only : + (Stdlib.Lexing.lexbuf -> token) -> + Stdlib.Lexing.lexbuf -> + Ast.untyped_statement Ast.program
module MenhirInterpreter : sig ... end
module Incremental : sig ... end
diff --git a/stanc/Frontend/Parsing_errors/index.html b/stanc/Frontend/Parsing_errors/index.html new file mode 100644 index 000000000..435b291b6 --- /dev/null +++ b/stanc/Frontend/Parsing_errors/index.html @@ -0,0 +1,2 @@ + +Parsing_errors (stanc.Frontend.Parsing_errors)

Module Frontend.Parsing_errors

val message : int -> string
diff --git a/stanc/Frontend/Preprocessor/index.html b/stanc/Frontend/Preprocessor/index.html new file mode 100644 index 000000000..91eb60ae7 --- /dev/null +++ b/stanc/Frontend/Preprocessor/index.html @@ -0,0 +1,4 @@ + +Preprocessor (stanc.Frontend.Preprocessor)

Module Frontend.Preprocessor

Preprocessor for handling include directives

val location_of_position : Stdlib.Lexing.position -> Middle.Location.t
val location_span_of_positions : + (Stdlib.Lexing.position * Stdlib.Lexing.position) -> + Middle.Location_span.t
val current_buffer : unit -> Stdlib.Lexing.lexbuf

Buffer at the top of the include stack

val size : unit -> int

Size of the include stack

val init : Stdlib.Lexing.lexbuf -> string -> unit

Push a buffer on to the stack to start

val update_start_positions : Stdlib.Lexing.position -> unit

Update the lex_start_p the lexing buffers on the stack. This solves an issue where a parser which started with one lexbuf but is finishing with another can have the wrong information

val pop_buffer : unit -> Stdlib.Lexing.lexbuf

Pop the buffer at the top of the include stack

val add_comment : Ast.comment_type -> unit
val get_comments : unit -> Ast.comment_type list
val included_files : string list Stdlib.ref

List of files that have been included

val restore_prior_lexbuf : unit -> Stdlib.Lexing.lexbuf

Restore to a previous lexing buffer (assumes that one exists) and updates positions accordingly.

val try_get_new_lexbuf : string -> Stdlib.Lexing.lexbuf

Search include paths for filename and try to create a new lexing buffer with that filename, record that included from specified position

diff --git a/stanc/Frontend/Pretty_print_prog/index.html b/stanc/Frontend/Pretty_print_prog/index.html new file mode 100644 index 000000000..4004ce47b --- /dev/null +++ b/stanc/Frontend/Pretty_print_prog/index.html @@ -0,0 +1,8 @@ + +Pretty_print_prog (stanc.Frontend.Pretty_print_prog)

Module Frontend.Pretty_print_prog

Pretty print a complete Stan program.

This module relies on Parser to be able to run a "sanity check" on the output of the pretty printer, confirming that the output is a valid Stan program and matches the input program.

However, the parser relies on some pretty printing functions to be able to produce nicer error messages, hence the split between Pretty_printing and this module.

val pretty_print_typed_program : + ?bare_functions:bool -> + ?line_length:int -> + ?inline_includes:bool -> + ?strip_comments:bool -> + Ast.typed_program -> + string
diff --git a/stanc/Frontend/Pretty_printing/index.html b/stanc/Frontend/Pretty_printing/index.html new file mode 100644 index 000000000..1fd1b5170 --- /dev/null +++ b/stanc/Frontend/Pretty_printing/index.html @@ -0,0 +1,102 @@ + +Pretty_printing (stanc.Frontend.Pretty_printing)

Module Frontend.Pretty_printing

Some helpers to produce nice error messages and for auto-formatting Stan programs

val comments : Ast.comment_type list Core.ref

To avoid cluttering the AST, comments are not associated with any particular AST node but instead come in a separate list. The pretty printer uses the AST nodes' location metadata to insert whitespace and comments. The comment list is stored in a global state that is accessed by set_comments, get_comments, and skip_comments.

val skipped : + ([ `Block | `Include | `Line ] * string list * Middle.Location_span.t) list + Core.ref
val set_comments : + ?inline_includes:bool -> + ?strip_comments:bool -> + Ast.comment_type list -> + unit
val get_comments : + Middle.Location.t -> + ([> `Block | `Include | `Line ] * string list * Middle.Location_span.t) list
val get_comments_until_separator : + Middle.Location.t -> + ([> `Block | `Include | `Line ] * string list * Middle.Location_span.t) list
val skip_comments : Middle.Location.t -> unit
val remaining_comments : + unit -> + ([ `Block | `Include | `Line ] * string list * Middle.Location_span.t) + Base__List.t
val print_included : bool Core.ref

If false, don't print any statements which came from another file

val should_skip : Middle.Location.t -> bool

Checks if something should be skipped based on the print_included setting

val pp_space : + bool -> + Stdlib.Format.formatter -> + (Middle.Location.t * Middle.Location.t) -> + unit
val pp_comment : + Stdlib.Format.formatter -> + ([< `Block | `Include | `Line ] * string list * Middle.Location_span.t) -> + unit
val pp_spacing : + ?newline:bool -> + Middle.Location.t option -> + Middle.Location.t option -> + Stdlib.Format.formatter -> + ([< `Block | `Include | `Line Include Line ] + * string list + * Middle.Location_span.t) + list -> + unit
val pp_comments_spacing : + bool -> + ('a -> + ([< `Block | `Include | `Line Block ] + * string list + * Middle.Location_span.t) + list) -> + Stdlib.Format.formatter -> + 'b -> + unit
val comma_no_break : unit Fmt.t
val indented_box : + ?offset:int -> + 'a Fmt.t -> + Stdlib.Format.formatter -> + 'b -> + unit
val pp_unsizedtype : Middle.UnsizedType.t Fmt.t
val pp_autodifftype : + Stdlib.Format.formatter -> + Middle.UnsizedType.autodifftype -> + unit
val pp_returntype : + Stdlib.Format.formatter -> + Middle.UnsizedType.returntype -> + unit
val pp_identifier : Stdlib.Format.formatter -> Ast.identifier -> unit
val pp_operator : Stdlib.Format.formatter -> Middle.Operator.t -> unit
val pp_list_of : + (Stdlib.Format.formatter -> 'a -> unit) -> + ('a0 -> Middle.Location_span.t) -> + Stdlib.Format.formatter -> + ('a1 list * Middle.Location_span.t) -> + unit
val pp_index : Ast.untyped_expression Ast.index Fmt.t
val pp_list_of_indices : + Stdlib.Format.formatter -> + Ast.untyped_expression Ast.index list -> + unit
val pp_expression : Stdlib.Format.formatter -> Ast.untyped_expression -> unit
val pp_list_of_expression : + Stdlib.Format.formatter -> + (Ast.untyped_expression list * Middle.Location_span.t) -> + unit
val pp_lvalue : + Stdlib.Format.formatter -> + ((Ast.located_meta, unit) Ast.expr_with, Ast.located_meta) Ast.lval_with + Ast.lvalue_pack -> + unit
val pp_assignmentoperator : + Stdlib.Format.formatter -> + Ast.assignmentoperator -> + unit
val pp_truncation : + Stdlib.Format.formatter -> + Ast.untyped_expression Ast.truncation -> + unit
val pp_printable : + Stdlib.Format.formatter -> + Ast.untyped_expression Ast.printable -> + unit
val pp_list_of_printables : + Stdlib.Format.formatter -> + Ast.untyped_expression Ast.printable list -> + unit
val pp_bracketed_transform : + Stdlib.Format.formatter -> + Ast.untyped_expression Middle.Transformation.t -> + unit
val pp_indent_unless_block : + Stdlib.Format.formatter -> + (Ast.untyped_statement * Middle.Location.t) -> + unit
val pp_recursive_ifthenelse : + ((Ast.untyped_expression, Ast.located_meta, Ast.untyped_lval, unit) + Ast.statement_with + * Middle.Location.t) + Fmt.t

This function helps write chained if-then-else-if-... blocks correctly. Without it, each IfThenElse would trigger a new vbox in front of the if, adding spaces for each level of IfThenElse.

val pp_statement : Ast.untyped_statement Fmt.t
val pp_args : + Stdlib.Format.formatter -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t * Ast.identifier) -> + unit
val pp_list_of_statements : + ((Ast.untyped_expression, Ast.located_meta, Ast.untyped_lval, unit) + Ast.statement_with + list + * Middle.Location_span.t) + Fmt.t
val pp_typed_expression : + Stdlib.Format.formatter -> + Ast.typed_expression -> + unit
diff --git a/stanc/Frontend/Promotion/index.html b/stanc/Frontend/Promotion/index.html new file mode 100644 index 000000000..2264284eb --- /dev/null +++ b/stanc/Frontend/Promotion/index.html @@ -0,0 +1,18 @@ + +Promotion (stanc.Frontend.Promotion)

Module Frontend.Promotion

module UnsizedType = Middle.UnsizedType
type t =
  1. | NoPromotion
  2. | IntToReal
  3. | ToVar
  4. | ToComplexVar
  5. | IntToComplex
  6. | RealToComplex
  7. | TuplePromotion of t list

Type to represent promotions in the typechecker. This can be used to return information about how to promote expressions for use in Ast.Promotion

val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val scalarize : UnsizedType.t -> UnsizedType.t

Our promotion nodes only store the scalar type to promote, e.g to promote a tuple(array int) to a tuple(array real), we store tuple(real), not tuple(array real)

val promote_unsized_type : + UnsizedType.t -> + UnsizedType.autodifftype -> + t -> + UnsizedType.t * UnsizedType.autodifftype

Get the UnsizedType.t which is the result of promoting a given type. See promote for the version which promotes expressions directly.

val get_type_promotion_exn : + (UnsizedType.autodifftype * UnsizedType.t) -> + (UnsizedType.autodifftype * UnsizedType.t) -> + t

Get the promotion needed to make the second type into the first. Types NEED to have previously been checked to be promotable or else a fatal error will be thrown.

val promotion_cost : t -> Core.Int.t

Calculate the "cost"/number of promotions performed. Used to disambiguate function signatures

diff --git a/stanc/Frontend/Semantic_error/index.html b/stanc/Frontend/Semantic_error/index.html new file mode 100644 index 000000000..42bf2df62 --- /dev/null +++ b/stanc/Frontend/Semantic_error/index.html @@ -0,0 +1,138 @@ + +Semantic_error (stanc.Frontend.Semantic_error)

Module Frontend.Semantic_error

type t
val pp : Stdlib.Format.formatter -> t -> unit
val location : t -> Middle.Location_span.t
val mismatched_array_types : + Middle.Location_span.t -> + Middle.UnsizedType.t -> + Middle.UnsizedType.t -> + t
val invalid_row_vector_types : + Middle.Location_span.t -> + Middle.UnsizedType.t -> + t
val invalid_matrix_types : Middle.Location_span.t -> Middle.UnsizedType.t -> t
val int_expected : + Middle.Location_span.t -> + string -> + Middle.UnsizedType.t -> + t
val int_or_real_expected : + Middle.Location_span.t -> + string -> + Middle.UnsizedType.t -> + t
val int_intarray_or_range_expected : + Middle.Location_span.t -> + Middle.UnsizedType.t -> + t
val int_or_real_container_expected : + Middle.Location_span.t -> + Middle.UnsizedType.t -> + t
val scalar_or_type_expected : + Middle.Location_span.t -> + string -> + Middle.UnsizedType.t -> + Middle.UnsizedType.t -> + t
val array_vector_rowvector_matrix_expected : + Middle.Location_span.t -> + Middle.UnsizedType.t -> + t
val returning_fn_expected_nonreturning_found : + Middle.Location_span.t -> + string -> + t
val returning_fn_expected_nonfn_found : Middle.Location_span.t -> string -> t
val returning_fn_expected_undeclaredident_found : + Middle.Location_span.t -> + string -> + string option -> + t
val returning_fn_expected_undeclared_dist_suffix_found : + Middle.Location_span.t -> + (string * string) -> + t
val returning_fn_expected_wrong_dist_suffix_found : + Middle.Location_span.t -> + (string * string) -> + t
val illtyped_reduce_sum_not_array : + Middle.Location_span.t -> + Middle.UnsizedType.t -> + t
val illtyped_reduce_sum_slice : + Middle.Location_span.t -> + Middle.UnsizedType.t -> + t
val ambiguous_function_promotion : + Middle.Location_span.t -> + string -> + Middle.UnsizedType.t list option -> + (Middle.UnsizedType.returntype + * (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list) + list -> + t
val nonreturning_fn_expected_returning_found : + Middle.Location_span.t -> + string -> + t
val nonreturning_fn_expected_nonfn_found : + Middle.Location_span.t -> + string -> + t
val nonreturning_fn_expected_undeclaredident_found : + Middle.Location_span.t -> + string -> + string option -> + t
val illtyped_fn_app : + Middle.Location_span.t -> + string -> + (SignatureMismatch.signature_error list * bool) -> + Middle.UnsizedType.t list -> + t
val illtyped_prefix_op : + Middle.Location_span.t -> + Middle.Operator.t -> + Middle.UnsizedType.t -> + t
val illtyped_postfix_op : + Middle.Location_span.t -> + Middle.Operator.t -> + Middle.UnsizedType.t -> + t
val tuple_index_invalid_index : Middle.Location_span.t -> int -> int -> t
val tuple_index_not_tuple : Middle.Location_span.t -> Middle.UnsizedType.t -> t
val not_indexable : Middle.Location_span.t -> Middle.UnsizedType.t -> int -> t
val ident_is_keyword : Middle.Location_span.t -> string -> t
val ident_is_model_name : Middle.Location_span.t -> string -> t
val ident_is_stanmath_name : Middle.Location_span.t -> string -> t
val ident_in_use : Middle.Location_span.t -> string -> t
val ident_not_in_scope : Middle.Location_span.t -> string -> string option -> t
val invalid_decl_rng_fn : Middle.Location_span.t -> t
val invalid_rng_fn : Middle.Location_span.t -> t
val invalid_unnormalized_fn : Middle.Location_span.t -> t
val udf_is_unnormalized_fn : Middle.Location_span.t -> string -> t
val ident_has_unnormalized_suffix : Middle.Location_span.t -> string -> t
val conditional_notation_not_allowed : Middle.Location_span.t -> t
val conditioning_required : Middle.Location_span.t -> t
val not_printable : Middle.Location_span.t -> t
val empty_array : Middle.Location_span.t -> t
val empty_tuple : Middle.Location_span.t -> t
val bad_int_literal : Middle.Location_span.t -> t
val cannot_assign_to_read_only : Middle.Location_span.t -> string -> t
val cannot_assign_to_global : Middle.Location_span.t -> string -> t
val cannot_assign_function : + Middle.Location_span.t -> + string -> + Middle.UnsizedType.t -> + t
val cannot_assign_to_multiindex : Middle.Location_span.t -> t
val cannot_assign_duplicate_unpacking : + Middle.Location_span.t -> + Ast.untyped_lval list -> + t
val cannot_access_assigning_var : Middle.Location_span.t -> string list -> t
val invalid_tilde_pdf_or_pmf : Middle.Location_span.t -> t
val invalid_tilde_cdf_or_ccdf : Middle.Location_span.t -> string -> t
val invalid_tilde_no_such_dist : Middle.Location_span.t -> string -> bool -> t
val target_plusequals_outside_model_or_logprob : Middle.Location_span.t -> t
val invalid_truncation_cdf_or_ccdf : + Middle.Location_span.t -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + t
val break_outside_loop : Middle.Location_span.t -> t
val continue_outside_loop : Middle.Location_span.t -> t
val expression_return_outside_returning_fn : Middle.Location_span.t -> t
val void_outside_nonreturning_fn : Middle.Location_span.t -> t
val non_data_variable_size_decl : Middle.Location_span.t -> t
val non_int_bounds : Middle.Location_span.t -> t
val complex_transform : Middle.Location_span.t -> t
val transformed_params_int : Middle.Location_span.t -> t
val fn_overload_rt_only : + Middle.Location_span.t -> + string -> + Middle.UnsizedType.returntype -> + Middle.UnsizedType.returntype -> + t
val fn_decl_redefined : + Middle.Location_span.t -> + string -> + stan_math:bool -> + Middle.UnsizedType.t -> + t
val fn_decl_exists : Middle.Location_span.t -> string -> t
val fn_decl_without_def : Middle.Location_span.t -> string -> t
val fn_decl_needs_block : Middle.Location_span.t -> t
val non_real_prob_fn_def : Middle.Location_span.t -> t
val prob_density_non_real_variate : + Middle.Location_span.t -> + Middle.UnsizedType.t option -> + t
val prob_mass_non_int_variate : + Middle.Location_span.t -> + Middle.UnsizedType.t option -> + t
val duplicate_arg_names : Middle.Location_span.t -> t
val incompatible_return_types : Middle.Location_span.t -> t
diff --git a/stanc/Frontend/SignatureMismatch/index.html b/stanc/Frontend/SignatureMismatch/index.html new file mode 100644 index 000000000..0555d2b73 --- /dev/null +++ b/stanc/Frontend/SignatureMismatch/index.html @@ -0,0 +1,51 @@ + +SignatureMismatch (stanc.Frontend.SignatureMismatch)

Module Frontend.SignatureMismatch

type type_mismatch = private
  1. | DataOnlyError
  2. | TypeMismatch of Middle.UnsizedType.t * Middle.UnsizedType.t * details option
and details = private
  1. | SuffixMismatch of unit Middle.Fun_kind.suffix * unit Middle.Fun_kind.suffix
  2. | ReturnTypeMismatch of Middle.UnsizedType.returntype + * Middle.UnsizedType.returntype
  3. | InputMismatch of function_mismatch
and function_mismatch = private
  1. | ArgError of int * type_mismatch
  2. | ArgNumMismatch of int * int
type ('unique, 'error) generic_match_result =
  1. | UniqueMatch of 'unique
  2. | AmbiguousMatch of (Middle.UnsizedType.returntype + * (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) + list) + list
  3. | SignatureErrors of 'error

The match result for general (non-variadic) functions

val check_of_same_type_mod_conv : + Middle.UnsizedType.t -> + Middle.UnsizedType.t -> + (Promotion.t, type_mismatch) Core.result
val check_compatible_arguments_mod_conv : + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + (Promotion.t list, function_mismatch) Core.result
val unique_minimum_promotion : + ('a * Promotion.t list) list -> + ('a * Promotion.t list, 'a list option) Core.result
val matching_function : + Environment.t -> + string -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + match_result

Searches for a function of the given name which can support the required argument types. Requires a unique minimum option under type promotion

val matching_stanlib_function : + string -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + match_result

Same as matching_function but requires specifically that the function be from StanMath (uses Environment.stan_math_environment)

Check variadic function arguments. If a match is found, returns Ok of the function type and a list of promotions (see promote) If none is found, returns Error of the list of args and a function_mismatch.

val pp_signature_mismatch : + Stdlib.Format.formatter -> + (string + * Middle.UnsizedType.t list + * (((Middle.UnsizedType.returntype + * (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list) + * function_mismatch) + list + * bool)) -> + unit
val pp_math_lib_assignmentoperator_sigs : + Stdlib.Format.formatter -> + (Middle.UnsizedType.t * Middle.Operator.t) -> + unit
val compare_errors : function_mismatch -> function_mismatch -> int
val compare_match_results : match_result -> match_result -> int
diff --git a/stanc/Frontend/Typechecker/index.html b/stanc/Frontend/Typechecker/index.html new file mode 100644 index 000000000..adfa1c3d3 --- /dev/null +++ b/stanc/Frontend/Typechecker/index.html @@ -0,0 +1,12 @@ + +Typechecker (stanc.Frontend.Typechecker)

Module Frontend.Typechecker

a type/semantic checker for Stan ASTs

Functions which begin with "check_" return a typed version of their input Functions which begin with "verify_" return unit if a check succeeds, or else throw an Frontend.Errors.SemanticError exception. Other functions which begin with "infer"/"calculate" vary. Usually they return a value, but a few do have error conditions.

All Error.SemanticError excepetions are caught by check_program which turns the ast or exception into a Result.t for external usage

A type environment Frontend.Environment.t is used to hold variables and functions, including Stan math functions. This is a functional map, meaning it is handled immutably.

val check_program_exn : + Ast.untyped_program -> + Ast.typed_program * Warnings.t list

Type check a full Stan program. Can raise Errors.SemanticError

val check_program : + Ast.untyped_program -> + (Ast.typed_program * Warnings.t list, Semantic_error.t) Stdlib.result

The safe version of check_program_exn. This catches all Errors.SemanticError exceptions and converts them into a Result.t

val operator_stan_math_return_type : + Middle.Operator.t -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + (Middle.UnsizedType.returntype * Promotion.t list) option
val stan_math_return_type : + string -> + (Middle.UnsizedType.autodifftype * Middle.UnsizedType.t) list -> + Middle.UnsizedType.returntype option
val model_name : string Stdlib.ref

A reference to hold the model name. Relevant for checking variable clashes and used in code generation.

val check_that_all_functions_have_definition : bool Stdlib.ref

A switch to determine whether we check that all functions have a definition

diff --git a/stanc/Frontend/Warnings/index.html b/stanc/Frontend/Warnings/index.html new file mode 100644 index 000000000..39f304452 --- /dev/null +++ b/stanc/Frontend/Warnings/index.html @@ -0,0 +1,2 @@ + +Warnings (stanc.Frontend.Warnings)

Module Frontend.Warnings

Used for user-facing warning messages

type t = Middle.Location_span.t * string
val pp : ?printed_filename:string -> t Fmt.t
val pp_warnings : ?printed_filename:string -> t list Fmt.t
diff --git a/stanc/Frontend/index.html b/stanc/Frontend/index.html new file mode 100644 index 000000000..d64a115c6 --- /dev/null +++ b/stanc/Frontend/index.html @@ -0,0 +1,2 @@ + +Frontend (stanc.Frontend)

Module Frontend

module Ast : sig ... end

Abstract syntax tree for Stan. Defined with the 'two-level types' pattern, where the variant types are not directly recursive, but rather parametric in some other type.

module Ast_to_Mir : sig ... end
module Canonicalize : sig ... end

Re-write ASTs to remove deprecated features and clean up extra parenthesis, etc

module Debugging : sig ... end

Some helpers for debugging

module Deprecation_analysis : sig ... end

Utilities for emitting deprecation warnings and finding proper replacements for deprecated features

module Environment : sig ... end

Type environments used during typechecking. Maps from strings to function or variable information

module Errors : sig ... end

Some plumbing for our compiler errors

module Include_files : sig ... end
module Info : sig ... end

Implementation of the --info option which outputs on the standard output a JSON object containing information about the model.

module Input_warnings : sig ... end

A module to contain the mutable state used to track warnings from the parser and lexer.

module Lexer : sig ... end
module Parse : sig ... end

Some complicated stuff to get the custom syntax errors out of Menhir's Incremental API

module Parser : sig ... end
module Parsing_errors : sig ... end
module Preprocessor : sig ... end

Preprocessor for handling include directives

module Pretty_print_prog : sig ... end

Pretty print a complete Stan program.

module Pretty_printing : sig ... end

Some helpers to produce nice error messages and for auto-formatting Stan programs

module Promotion : sig ... end
module Semantic_error : sig ... end
module SignatureMismatch : sig ... end
module Typechecker : sig ... end

a type/semantic checker for Stan ASTs

module Warnings : sig ... end

Used for user-facing warning messages

diff --git a/stanc/Middle/Expr/Fixed/Pattern/index.html b/stanc/Middle/Expr/Fixed/Pattern/index.html new file mode 100644 index 000000000..c1f7d42b7 --- /dev/null +++ b/stanc/Middle/Expr/Fixed/Pattern/index.html @@ -0,0 +1,13 @@ + +Pattern (stanc.Middle.Expr.Fixed.Pattern)

Module Fixed.Pattern

type litType =
  1. | Int
  2. | Real
  3. | Imaginary
  4. | Str
val sexp_of_litType : litType -> Sexplib0.Sexp.t
val litType_of_sexp : Sexplib0.Sexp.t -> litType
val hash_fold_litType : + Ppx_hash_lib.Std.Hash.state -> + litType -> + Ppx_hash_lib.Std.Hash.state
val hash_litType : litType -> Ppx_hash_lib.Std.Hash.hash_value
val compare_litType : litType -> litType -> int
type 'a t =
  1. | Var of string
  2. | Lit of litType * string
  3. | FunApp of 'a Fun_kind.t * 'a list
  4. | TernaryIf of 'a * 'a * 'a
  5. | EAnd of 'a * 'a
  6. | EOr of 'a * 'a
  7. | Indexed of 'a * 'a Index.t list
  8. | Promotion of 'a * UnsizedType.t * UnsizedType.autodifftype
  9. | TupleProjection of 'a * int
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
include Common.Pattern.S with type 'a t := 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Common.Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Common.Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
diff --git a/stanc/Middle/Expr/Fixed/index.html b/stanc/Middle/Expr/Fixed/index.html new file mode 100644 index 000000000..f66273c2a --- /dev/null +++ b/stanc/Middle/Expr/Fixed/index.html @@ -0,0 +1,16 @@ + +Fixed (stanc.Middle.Expr.Fixed)

Module Expr.Fixed

module Pattern : sig ... end
include Common.Fixed.S with module Pattern := Pattern
type 'a t = {
  1. pattern : 'a t Pattern.t;
  2. meta : 'a;
}
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Common.Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Common.Pretty.S1 with type 'a t := 'a t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t -> + unit
val fold_pattern : f:(('a * 'r Pattern.t) -> 'r) -> 'a t -> 'r

fold_pattern traverses the data structure from the bottom up replacing the original meta data of type 'a with some result type 'r and combines the result values on the way back up. For example, given a pattern with the following type:

type 'a pattern = Leaf of string | Branch of 'a * 'a

we can use fold_pattern to calculate the maximum depth of data structure obtained by fixing the pattern type:

let max_depth t =
+  let f = function
+      | meta , Leaf _ -> 1
+      | meta , Branch(left_depth,right_depth) ->
+          1 + (max left_depth right_depth)
+  in
+  fold_pattern ~f t

Note that the function 'f' supplied to fold_pattern accepts a tuple rather than our type 'a t since the type of the pattern has been transformed to 'r t Pattern.t and is no longer 'compatible' with the original type of meta data 'a. That is, a tuple ('a * 'b t Pattern.t) has two type variables where as 'a t has one.

val rewrite_bottom_up : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_bottom_up specializes fold_pattern so that the result type 'r is equal to the type of our fixed-point data structure i.e. 'r = 'a t. This also means that the function f can be written with our fixed-point type 'a t as its argument.

val unfold_pattern : f:('r -> 'a * 'r Pattern.t) -> 'r -> 'a t

unfold builds a fixed-point data structure from the top down. Starting with a user-supplied seed of type 'r, unfold recursively applies the function f yielding a tuple of meta-data and pattern with elements of type 'r to which f is further applied.

The unfold terminates when a pattern element which does not carry an 'r is reached.

As with fold_pattern the function f returns a tuple of meta-data and pattern rather than our record type since, in general, 'r =/= 'a t.

val rewrite_top_down : f:('a t -> 'a t) -> 'a t -> 'a t

rewrite_top_down specializes unfold by requiring that r = 'a t. As a consequence the function f accepts our record type 'a t as its argument.

diff --git a/stanc/Middle/Expr/Helpers/index.html b/stanc/Middle/Expr/Helpers/index.html new file mode 100644 index 000000000..60482ce8d --- /dev/null +++ b/stanc/Middle/Expr/Helpers/index.html @@ -0,0 +1,10 @@ + +Helpers (stanc.Middle.Expr.Helpers)

Module Expr.Helpers

val int : int -> Typed.t
val float : float -> Typed.t
val complex : (float * float) -> Typed.t
val str : string -> Typed.t
val variable : string -> Typed.t
val zero : Typed.t
val one : Typed.t
val unary_op : Operator.t -> Typed.t -> Typed.t
val binop : Typed.t -> Operator.t -> Typed.t -> Typed.t
val binop_list : Typed.t list -> Operator.t -> default:Typed.t -> Typed.t
val row_vector : float list -> Typed.t
val vector : float list -> Typed.t
val matrix : float list list -> Typed.t
val matrix_from_rows : Typed.t list -> Typed.t
val complex_row_vector : (float * float) list -> Typed.t
val complex_vector : (float * float) list -> Typed.t
val complex_matrix_from_rows : Typed.t list -> Typed.t
val array_expr : Typed.t list -> Typed.t
val tuple_expr : Typed.t list -> Typed.t
val try_unpack : Typed.t -> Typed.t list option
val loop_bottom : Typed.t
val internal_funapp : + 'a Fixed.t Internal_fun.t -> + 'a Fixed.t list -> + 'a -> + 'a Fixed.t
val contains_fn_kind : + ('a Fixed.t Fun_kind.t -> bool) -> + ?init:bool -> + 'a Fixed.t -> + bool
val infer_type_of_indexed : UnsizedType.t -> 'a Index.t list -> UnsizedType.t
val add_int_index : Typed.t -> Typed.t Index.t -> Typed.t
val add_tuple_index : Typed.t -> int -> Typed.t
val collect_indices : 'a Fixed.t -> 'a Fixed.t Index.t list
diff --git a/stanc/Middle/Expr/Typed/Map/Key/index.html b/stanc/Middle/Expr/Typed/Map/Key/index.html new file mode 100644 index 000000000..219e1ad43 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Expr.Typed.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Expr/Typed/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Middle/Expr/Typed/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..17b213bb6 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Expr.Typed.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Expr/Typed/Map/Provide_bin_io/index.html b/stanc/Middle/Expr/Typed/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..b04c6dc3c --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Expr.Typed.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Middle/Expr/Typed/Map/Provide_hash/argument-1-Key/index.html b/stanc/Middle/Expr/Typed/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..c232601f4 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Expr.Typed.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Middle/Expr/Typed/Map/Provide_hash/index.html b/stanc/Middle/Expr/Typed/Map/Provide_hash/index.html new file mode 100644 index 000000000..93e8f3d38 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Middle.Expr.Typed.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Middle/Expr/Typed/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Middle/Expr/Typed/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..f6fc59179 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Expr.Typed.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Middle/Expr/Typed/Map/Provide_of_sexp/index.html b/stanc/Middle/Expr/Typed/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..18977e27a --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Expr.Typed.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Middle/Expr/Typed/Map/index.html b/stanc/Middle/Expr/Typed/Map/index.html new file mode 100644 index 000000000..a18aca29b --- /dev/null +++ b/stanc/Middle/Expr/Typed/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Middle.Expr.Typed.Map)

Module Typed.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Expr/Typed/Meta/index.html b/stanc/Middle/Expr/Typed/Meta/index.html new file mode 100644 index 000000000..64ea0deb7 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Meta/index.html @@ -0,0 +1,7 @@ + +Meta (stanc.Middle.Expr.Typed.Meta)

Module Typed.Meta

type t = {
  1. type_ : UnsizedType.t;
  2. loc : Location_span.t;
  3. adlevel : UnsizedType.autodifftype;
}
val create : + type_:UnsizedType.t -> + loc:Location_span.t -> + adlevel:UnsizedType.autodifftype -> + unit -> + t
include Ppx_compare_lib.Comparable.S with type t := t
include Sexplib0.Sexpable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
include Common.Specialized.Meta with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Common.Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
diff --git a/stanc/Middle/Expr/Typed/Replace_polymorphic_compare/index.html b/stanc/Middle/Expr/Typed/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..bb54c1170 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Middle.Expr.Typed.Replace_polymorphic_compare)

Module Typed.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Middle/Expr/Typed/Set/Elt/index.html b/stanc/Middle/Expr/Typed/Set/Elt/index.html new file mode 100644 index 000000000..d016f1483 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Expr.Typed.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Expr/Typed/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Middle/Expr/Typed/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..cce4d482d --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Expr.Typed.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Expr/Typed/Set/Provide_bin_io/index.html b/stanc/Middle/Expr/Typed/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..6ab2bbee7 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Expr.Typed.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Expr/Typed/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Middle/Expr/Typed/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..c7fb79dc4 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Expr.Typed.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Middle/Expr/Typed/Set/Provide_hash/index.html b/stanc/Middle/Expr/Typed/Set/Provide_hash/index.html new file mode 100644 index 000000000..81e0335a2 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Middle.Expr.Typed.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Middle/Expr/Typed/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Middle/Expr/Typed/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..cadc923c5 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Expr.Typed.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Middle/Expr/Typed/Set/Provide_of_sexp/index.html b/stanc/Middle/Expr/Typed/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..d69ef74b5 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Expr.Typed.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Middle/Expr/Typed/Set/index.html b/stanc/Middle/Expr/Typed/Set/index.html new file mode 100644 index 000000000..0de8f6cf9 --- /dev/null +++ b/stanc/Middle/Expr/Typed/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Middle.Expr.Typed.Set)

Module Typed.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Expr/Typed/index.html b/stanc/Middle/Expr/Typed/index.html new file mode 100644 index 000000000..57cde79d3 --- /dev/null +++ b/stanc/Middle/Expr/Typed/index.html @@ -0,0 +1,9 @@ + +Typed (stanc.Middle.Expr.Typed)

Module Expr.Typed

module Meta : sig ... end
include Common.Specialized.S + with module Meta := Meta + and type t = Meta.t Fixed.t
type t = Meta.t Fixed.t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Common.Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
include Core.Comparator.S with type t := t
type comparator_witness
include Core.Comparable.S + with type t := t + and type comparator_witness := comparator_witness
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
val type_of : t -> UnsizedType.t
val loc_of : t -> Location_span.t
val adlevel_of : t -> UnsizedType.autodifftype
diff --git a/stanc/Middle/Expr/index.html b/stanc/Middle/Expr/index.html new file mode 100644 index 000000000..bcd9cbd99 --- /dev/null +++ b/stanc/Middle/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (stanc.Middle.Expr)

Module Middle.Expr

MIR types and modules corresponding to the expressions of the language

module Fixed : sig ... end
module Typed : sig ... end
module Helpers : sig ... end
diff --git a/stanc/Middle/Flag_vars/index.html b/stanc/Middle/Flag_vars/index.html new file mode 100644 index 000000000..520ae3caf --- /dev/null +++ b/stanc/Middle/Flag_vars/index.html @@ -0,0 +1,2 @@ + +Flag_vars (stanc.Middle.Flag_vars)

Module Middle.Flag_vars

type t =
  1. | EmitGeneratedQuantities
  2. | EmitTransformedParameters
val enumerate : t list
val to_string : t -> string
diff --git a/stanc/Middle/Fun_kind/index.html b/stanc/Middle/Fun_kind/index.html new file mode 100644 index 000000000..4b6c3ec70 --- /dev/null +++ b/stanc/Middle/Fun_kind/index.html @@ -0,0 +1,30 @@ + +Fun_kind (stanc.Middle.Fun_kind)

Module Middle.Fun_kind

Types for function kinds, e.g. StanLib or UserDefined, and function suffix types, e.g. foo_ldfp, bar_lp

type 'propto suffix =
  1. | FnPlain
  2. | FnRng
  3. | FnLpdf of 'propto
  4. | FnTarget
val fold_suffix : ('a -> 'b -> 'c) -> 'd -> 'e suffix -> 'f
val map_suffix : ('a -> 'b) -> 'c suffix -> 'd suffix
val compare_suffix : + 'propto. ('propto -> 'propto -> int) -> + 'propto suffix -> + 'propto suffix -> + int
val hash_fold_suffix : + 'propto. (Ppx_hash_lib.Std.Hash.state -> + 'propto -> + Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'propto suffix -> + Ppx_hash_lib.Std.Hash.state
val suffix_of_sexp : + 'propto. (Sexplib0.Sexp.t -> 'propto) -> + Sexplib0.Sexp.t -> + 'propto suffix
val sexp_of_suffix : + 'propto. ('propto -> Sexplib0.Sexp.t) -> + 'propto suffix -> + Sexplib0.Sexp.t
val equal_suffix : + 'propto. ('propto -> 'propto -> bool) -> + 'propto suffix -> + 'propto suffix -> + bool
val without_propto : bool suffix -> unit suffix
type 'e t =
  1. | StanLib of string * bool suffix * Mem_pattern.t
  2. | CompilerInternal of 'e Internal_fun.t
  3. | UserDefined of string * bool suffix
val map : ('a -> 'b) -> 'c t -> 'd t
val fold : ('a -> 'b -> 'a) -> 'c -> 'd t -> 'e
val compare : + 'e. ('e -> 'e -> Core__.Import.int) -> + 'e t -> + 'e t -> + Core__.Import.int
val t_of_sexp : 'e. (Sexplib0.Sexp.t -> 'e) -> Sexplib0.Sexp.t -> 'e t
val sexp_of_t : 'e. ('e -> Sexplib0.Sexp.t) -> 'e t -> Sexplib0.Sexp.t
val hash_fold_t : + 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e t -> + Ppx_hash_lib.Std.Hash.state
val suffix_from_name : string -> bool suffix
val with_unnormalized_suffix : string -> string option
val pp : 'a Fmt.t -> Stdlib.Format.formatter -> 'b t -> unit
val collect_exprs : 'a t -> 'b list
diff --git a/stanc/Middle/Index/index.html b/stanc/Middle/Index/index.html new file mode 100644 index 000000000..288e5ab84 --- /dev/null +++ b/stanc/Middle/Index/index.html @@ -0,0 +1,18 @@ + +Index (stanc.Middle.Index)

Module Middle.Index

Types of indexing operations

type 'a t =
  1. | All
  2. | Single of 'a
  3. | Upfrom of 'a
  4. | Between of 'a * 'a
  5. | MultiIndex of 'a
val map : ('a -> 'b) -> 'c t -> 'd t
val fold : ('a -> 'b -> 'c) -> 'd -> 'e t -> 'f
val t_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : 'a. ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val hash_fold_t : + 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'a t -> + Ppx_hash_lib.Std.Hash.state
val compare : 'a. ('a -> 'a -> int) -> 'a t -> 'a t -> int
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'b t -> + unit
val pp_indices : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'a t list -> + unit
val bounds : 'a t -> 'b list
val apply : default:'b -> merge:('c -> 'd -> 'e) -> ('a -> 'f) -> 'a0 t -> 'g

Apply an op over the Index types inner expressions.

  • parameter default

    Value to return for All

  • parameter merge

    Function taking in lhs and rhs of Between and merging their result.

  • parameter op

    a functor to run with inputs of inner exprs

  • parameter ind

    the Index.t to

val folder : + string Core.Set.Poly.t -> + (string Core.Set.Poly.t -> 'a -> string Core.Set.Poly.t) -> + 'a0 t -> + string Core.Set.Poly.t
diff --git a/stanc/Middle/Internal_fun/index.html b/stanc/Middle/Internal_fun/index.html new file mode 100644 index 000000000..c958eb937 --- /dev/null +++ b/stanc/Middle/Internal_fun/index.html @@ -0,0 +1,10 @@ + +Internal_fun (stanc.Middle.Internal_fun)

Module Middle.Internal_fun

Language functions defined internally by the compiler

type 'expr t =
  1. | FnLength
  2. | FnMakeArray
  3. | FnMakeTuple
  4. | FnMakeRowVec
  5. | FnNegInf
  6. | FnReadData
  7. | FnReadDeserializer
  8. | FnReadParam of {
    1. constrain : 'expr Transformation.t;
    2. dims : 'expr list;
    3. mem_pattern : Mem_pattern.t;
    }
  9. | FnWriteParam of {
    1. unconstrain_opt : 'expr Transformation.t option;
    2. var : 'expr;
    }
  10. | FnValidateSize
  11. | FnValidateSizeSimplex
  12. | FnValidateSizeUnitVector
  13. | FnCheck of {
    1. trans : 'expr Transformation.t;
    2. var_name : string;
    3. var : 'expr;
    }
  14. | FnPrint
  15. | FnReject
  16. | FnFatalError
  17. | FnResizeToMatch
  18. | FnNaN
  19. | FnDeepCopy
  20. | FnReadWriteEventsOpenCL of string
val map : ('a -> 'b) -> 'c t -> 'd t
val fold : ('a -> 'b -> 'a) -> 'c -> 'd t -> 'e
val t_of_sexp : 'expr. (Sexplib0.Sexp.t -> 'expr) -> Sexplib0.Sexp.t -> 'expr t
val sexp_of_t : 'expr. ('expr -> Sexplib0.Sexp.t) -> 'expr t -> Sexplib0.Sexp.t
val hash_fold_t : + 'expr. (Ppx_hash_lib.Std.Hash.state -> 'expr -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'expr t -> + Ppx_hash_lib.Std.Hash.state
val compare : + 'expr. ('expr -> 'expr -> Core__.Import.int) -> + 'expr t -> + 'expr t -> + Core__.Import.int
val to_string : ?expr_to_string:('a -> Sexplib0.Sexp.t) -> 'a t -> string
val pp : 'a Fmt.t -> Stdlib.Format.formatter -> 'a0 t -> unit
val can_side_effect : 'a t -> bool
val collect_exprs : 'a t -> 'b list
diff --git a/stanc/Middle/Location/index.html b/stanc/Middle/Location/index.html new file mode 100644 index 000000000..46b064293 --- /dev/null +++ b/stanc/Middle/Location/index.html @@ -0,0 +1,10 @@ + +Location (stanc.Middle.Location)

Module Middle.Location

Storing locations in the original source

type t = {
  1. filename : string;
  2. line_num : int;
  3. col_num : int;
  4. included_from : t option;
}

Source code locations

val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val hash_fold_t : + Ppx_hash_lib.Std.Hash.state -> + t -> + Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val pp_context_list : Stdlib.Format.formatter -> (string list * t) -> unit
val context_to_string : (unit -> string list) -> t -> string option

Turn the given location into a string holding the code of that location. Code is retrieved by calling context_cb, which may do IO. Exceptions in the callback or in the creation of the string (possible if the context is incorrectly too short for the given location) return None

val empty : t
val to_string : + ?printed_filename:string -> + ?print_file:bool -> + ?print_line:bool -> + t -> + string

Format the location for error messaging.

If printed_filename is passed, it replaces the highest-level name and leaves the filenames of included files intact.

val compare : t -> t -> int
diff --git a/stanc/Middle/Location_span/Comparator/index.html b/stanc/Middle/Location_span/Comparator/index.html new file mode 100644 index 000000000..d167390b1 --- /dev/null +++ b/stanc/Middle/Location_span/Comparator/index.html @@ -0,0 +1,2 @@ + +Comparator (stanc.Middle.Location_span.Comparator)

Module Location_span.Comparator

type comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Location_span/Map/Key/index.html b/stanc/Middle/Location_span/Map/Key/index.html new file mode 100644 index 000000000..1505b61fe --- /dev/null +++ b/stanc/Middle/Location_span/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Location_span.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = Comparator.comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Location_span/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Middle/Location_span/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..b65b3c4d9 --- /dev/null +++ b/stanc/Middle/Location_span/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Location_span.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Location_span/Map/Provide_bin_io/index.html b/stanc/Middle/Location_span/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..4af27136a --- /dev/null +++ b/stanc/Middle/Location_span/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Location_span.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Middle/Location_span/Map/Provide_hash/argument-1-Key/index.html b/stanc/Middle/Location_span/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..5ced9ac9a --- /dev/null +++ b/stanc/Middle/Location_span/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Location_span.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Middle/Location_span/Map/Provide_hash/index.html b/stanc/Middle/Location_span/Map/Provide_hash/index.html new file mode 100644 index 000000000..256bcb517 --- /dev/null +++ b/stanc/Middle/Location_span/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Middle.Location_span.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Middle/Location_span/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Middle/Location_span/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..41d5ab11d --- /dev/null +++ b/stanc/Middle/Location_span/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Location_span.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Middle/Location_span/Map/Provide_of_sexp/index.html b/stanc/Middle/Location_span/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..67e12958e --- /dev/null +++ b/stanc/Middle/Location_span/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Location_span.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Middle/Location_span/Map/index.html b/stanc/Middle/Location_span/Map/index.html new file mode 100644 index 000000000..1414d5e27 --- /dev/null +++ b/stanc/Middle/Location_span/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Middle.Location_span.Map)

Module Location_span.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Location_span/Replace_polymorphic_compare/index.html b/stanc/Middle/Location_span/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..16fd96af3 --- /dev/null +++ b/stanc/Middle/Location_span/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Middle.Location_span.Replace_polymorphic_compare)

Module Location_span.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Middle/Location_span/Set/Elt/index.html b/stanc/Middle/Location_span/Set/Elt/index.html new file mode 100644 index 000000000..ed64f84ca --- /dev/null +++ b/stanc/Middle/Location_span/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Location_span.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = Comparator.comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Location_span/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Middle/Location_span/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..9eeeb6a9b --- /dev/null +++ b/stanc/Middle/Location_span/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Location_span.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Location_span/Set/Provide_bin_io/index.html b/stanc/Middle/Location_span/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..5af1b17a4 --- /dev/null +++ b/stanc/Middle/Location_span/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Location_span.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Location_span/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Middle/Location_span/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..9ac5832e9 --- /dev/null +++ b/stanc/Middle/Location_span/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Location_span.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Middle/Location_span/Set/Provide_hash/index.html b/stanc/Middle/Location_span/Set/Provide_hash/index.html new file mode 100644 index 000000000..b187c4e75 --- /dev/null +++ b/stanc/Middle/Location_span/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Middle.Location_span.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Middle/Location_span/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Middle/Location_span/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..f994b5369 --- /dev/null +++ b/stanc/Middle/Location_span/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Location_span.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Middle/Location_span/Set/Provide_of_sexp/index.html b/stanc/Middle/Location_span/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..31d261460 --- /dev/null +++ b/stanc/Middle/Location_span/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Location_span.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Middle/Location_span/Set/index.html b/stanc/Middle/Location_span/Set/index.html new file mode 100644 index 000000000..b023c9389 --- /dev/null +++ b/stanc/Middle/Location_span/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Middle.Location_span.Set)

Module Location_span.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Location_span/index.html b/stanc/Middle/Location_span/index.html new file mode 100644 index 000000000..07b220bd2 --- /dev/null +++ b/stanc/Middle/Location_span/index.html @@ -0,0 +1,8 @@ + +Location_span (stanc.Middle.Location_span)

Module Middle.Location_span

Delimited locations in source code

type t = {
  1. begin_loc : Location.t;
  2. end_loc : Location.t;
}
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val hash_fold_t : + Ppx_hash_lib.Std.Hash.state -> + t -> + Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val empty : t
val merge : t -> t -> t
val to_string : ?printed_filename:string -> t -> string

Render a location_span as a string

module Comparator : sig ... end
include module type of struct include Comparator end
type comparator_witness = Comparator.comparator_witness
include sig ... end
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, Comparator.comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
diff --git a/stanc/Middle/Mem_pattern/index.html b/stanc/Middle/Mem_pattern/index.html new file mode 100644 index 000000000..c11fbd03a --- /dev/null +++ b/stanc/Middle/Mem_pattern/index.html @@ -0,0 +1,5 @@ + +Mem_pattern (stanc.Middle.Mem_pattern)

Module Middle.Mem_pattern

type t =
  1. | AoS
  2. | SoA

* This type represents whether or not an autodiff type can be represented * as an Array of Structs (AoS) or as a Struct of Arrays. This applies to * matrices, vectors, row vectors, and arrays of those types. * In the C++ this allows us to swap out matrix types from an * Eigen::Matrix<stan::math::var_value<double>, Rows, Cols> to an * stan::math::var_value<Eigen::Matrix<double, Rows, Cols>>. * (fyi a var in the C++ code is an alias for var_value<double>) * *

val map : t -> t
val fold : 'a -> t -> 'b
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val compare : t -> t -> int
val hash_fold_t : + Ppx_hash_lib.Std.Hash.state -> + t -> + Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val equal : t -> t -> bool
val pp : Stdlib.Format.formatter -> t -> unit
val lub_mem_pat : t list -> t
diff --git a/stanc/Middle/Operator/index.html b/stanc/Middle/Operator/index.html new file mode 100644 index 000000000..f0c82f899 --- /dev/null +++ b/stanc/Middle/Operator/index.html @@ -0,0 +1,5 @@ + +Operator (stanc.Middle.Operator)

Module Middle.Operator

Utilities for Stan's built in operators

type t =
  1. | Plus
  2. | PPlus
  3. | Minus
  4. | PMinus
  5. | Times
  6. | Divide
  7. | IntDivide
  8. | Modulo
  9. | LDivide
  10. | EltTimes
  11. | EltDivide
  12. | Pow
  13. | EltPow
  14. | Or
  15. | And
  16. | Equals
  17. | NEquals
  18. | Less
  19. | Leq
  20. | Greater
  21. | Geq
  22. | PNot
  23. | Transpose
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val hash_fold_t : + Ppx_hash_lib.Std.Hash.state -> + t -> + Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val compare : t -> t -> int
val is_cmp : t -> bool
val pp : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string
val of_string_opt : string -> t option
diff --git a/stanc/Middle/Program/Numbered/index.html b/stanc/Middle/Program/Numbered/index.html new file mode 100644 index 000000000..cb35916d5 --- /dev/null +++ b/stanc/Middle/Program/Numbered/index.html @@ -0,0 +1,9 @@ + +Numbered (stanc.Middle.Program.Numbered)

Module Program.Numbered

type nonrec t = (Expr.Typed.t, Stmt.Numbered.t, int) t
val pp : + Stdlib.Format.formatter -> + (Expr.Typed.t, Stmt.Numbered.t, 'a) t -> + unit
val sexp_of_t : + (Expr.Typed.t, Stmt.Numbered.t, Core__.Import.int) t -> + Sexplib0.Sexp.t
val t_of_sexp : + Sexplib0.Sexp.t -> + (Expr.Typed.t, Stmt.Numbered.t, Core__.Import.int) t
diff --git a/stanc/Middle/Program/Typed/index.html b/stanc/Middle/Program/Typed/index.html new file mode 100644 index 000000000..546961833 --- /dev/null +++ b/stanc/Middle/Program/Typed/index.html @@ -0,0 +1,9 @@ + +Typed (stanc.Middle.Program.Typed)

Module Program.Typed

Programs with typed expressions and locations

val pp : + Stdlib.Format.formatter -> + (Expr.Typed.t, Stmt.Located.t, 'a) t -> + unit
val sexp_of_t : + (Expr.Typed.t, Stmt.Located.t, Location_span.t) t -> + Sexplib0.Sexp.t
val t_of_sexp : + Sexplib0.Sexp.t -> + (Expr.Typed.t, Stmt.Located.t, Location_span.t) t
diff --git a/stanc/Middle/Program/index.html b/stanc/Middle/Program/index.html new file mode 100644 index 000000000..3fe65bfdf --- /dev/null +++ b/stanc/Middle/Program/index.html @@ -0,0 +1,89 @@ + +Program (stanc.Middle.Program)

Module Middle.Program

Defines the core of the MIR

type fun_arg_decl = (UnsizedType.autodifftype * string * UnsizedType.t) list
val map_fun_arg_decl : 'a -> 'b
val fun_arg_decl_of_sexp : Sexplib0.Sexp.t -> fun_arg_decl
val sexp_of_fun_arg_decl : fun_arg_decl -> Sexplib0.Sexp.t
val hash_fold_fun_arg_decl : + Ppx_hash_lib.Std.Hash.state -> + fun_arg_decl -> + Ppx_hash_lib.Std.Hash.state
val hash_fun_arg_decl : fun_arg_decl -> Ppx_hash_lib.Std.Hash.hash_value
type 'a fun_def = {
  1. fdrt : UnsizedType.returntype;
  2. fdname : string;
  3. fdsuffix : unit Fun_kind.suffix;
  4. fdargs : (UnsizedType.autodifftype * string * UnsizedType.t) list;
  5. fdbody : 'a option;
  6. fdloc : Location_span.t;
}
val map_fun_def : ('a -> 'b) -> 'a0 fun_def -> 'c fun_def
val fold_fun_def : ('a -> 'b -> 'c) -> 'd -> 'e fun_def -> 'f
val compare_fun_def : + 'a. ('a -> 'a -> Core__.Import.int) -> + 'a fun_def -> + 'a fun_def -> + Core__.Import.int
val hash_fold_fun_def : + 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'a fun_def -> + Ppx_hash_lib.Std.Hash.state
val fun_def_of_sexp : + 'a. (Sexplib0.Sexp.t -> 'a) -> + Sexplib0.Sexp.t -> + 'a fun_def
val sexp_of_fun_def : + 'a. ('a -> Sexplib0.Sexp.t) -> + 'a fun_def -> + Sexplib0.Sexp.t
type io_block =
  1. | Parameters
  2. | TransformedParameters
  3. | GeneratedQuantities
val io_block_of_sexp : Sexplib0.Sexp.t -> io_block
val sexp_of_io_block : io_block -> Sexplib0.Sexp.t
val hash_fold_io_block : + Ppx_hash_lib.Std.Hash.state -> + io_block -> + Ppx_hash_lib.Std.Hash.state
val hash_io_block : io_block -> Ppx_hash_lib.Std.Hash.hash_value
type 'e outvar = {
  1. out_unconstrained_st : 'e SizedType.t;
  2. out_constrained_st : 'e SizedType.t;
  3. out_block : io_block;
  4. out_trans : 'e Transformation.t;
}
val map_outvar : ('e -> 'a) -> 'e0 outvar -> 'b outvar
val fold_outvar : ('a -> 'b -> 'a) -> 'c -> 'd outvar -> 'e
val outvar_of_sexp : + 'e. (Sexplib0.Sexp.t -> 'e) -> + Sexplib0.Sexp.t -> + 'e outvar
val sexp_of_outvar : + 'e. ('e -> Sexplib0.Sexp.t) -> + 'e outvar -> + Sexplib0.Sexp.t
val hash_fold_outvar : + 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e outvar -> + Ppx_hash_lib.Std.Hash.state
type ('a, 'b, 'm) t = {
  1. functions_block : 'b fun_def list;
  2. input_vars : (string * 'm * 'a SizedType.t) list;
  3. prepare_data : 'b list;
  4. log_prob : 'b list;
  5. reverse_mode_log_prob : 'b list;
  6. generate_quantities : 'b list;
  7. transform_inits : 'b list;
  8. unconstrain_array : 'b list;
  9. output_vars : (string * 'm * 'a outvar) list;
  10. prog_name : string;
  11. prog_path : string;
}
val map : + ('a -> 'c) -> + ('b -> 'd) -> + ('m -> 'e) -> + ('a0, 'b0, 'm0) t -> + ('f, 'g, 'h) t
val fold : + ('a -> 'b -> 'a) -> + ('c -> 'd -> 'c) -> + ('e -> 'f -> 'g) -> + 'h -> + ('i, 'j, 'k) t -> + 'l
val t_of_sexp : + 'a 'b 'm. (Sexplib0.Sexp.t -> 'a) -> + (Sexplib0.Sexp.t -> 'b) -> + (Sexplib0.Sexp.t -> 'm) -> + Sexplib0.Sexp.t -> + ('a, 'b, 'm) t
val sexp_of_t : + 'a 'b 'm. ('a -> Sexplib0.Sexp.t) -> + ('b -> Sexplib0.Sexp.t) -> + ('m -> Sexplib0.Sexp.t) -> + ('a, 'b, 'm) t -> + Sexplib0.Sexp.t
val pp_fun_arg_decl : + Stdlib.Format.formatter -> + (UnsizedType.autodifftype * string * UnsizedType.t) -> + unit
val pp_fun_def : + (Stdlib.Format.formatter -> 'a -> unit) -> + Stdlib.Format.formatter -> + 'b fun_def -> + unit
val pp_io_block : Stdlib.Format.formatter -> io_block -> unit
val pp_block : string -> 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_functions_block : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_prepare_data : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_log_prob : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_reverse_mode_log_prob : + 'a Fmt.t -> + Stdlib.Format.formatter -> + 'a list -> + unit
val pp_generate_quantities : + 'a Fmt.t -> + Stdlib.Format.formatter -> + 'a list -> + unit
val pp_transform_inits : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_output_var : + 'a Fmt.t -> + Stdlib.Format.formatter -> + (string * 'b * 'c outvar) -> + unit
val pp_input_var : + 'a Fmt.t -> + Stdlib.Format.formatter -> + (string * 'b * 'a SizedType.t) -> + unit
val pp_input_vars : + 'a Fmt.t -> + Stdlib.Format.formatter -> + (string * 'b * 'a SizedType.t) list -> + unit
val pp_output_vars : + 'a Fmt.t -> + Stdlib.Format.formatter -> + (string * 'b * 'a outvar) list -> + unit
val pp : + 'a Fmt.t -> + 'b Fmt.t -> + Stdlib.Format.formatter -> + ('c, 'd, 'e) t -> + unit
module Typed : sig ... end

Programs with typed expressions and locations

module Numbered : sig ... end
diff --git a/stanc/Middle/SizedType/index.html b/stanc/Middle/SizedType/index.html new file mode 100644 index 000000000..8def76636 --- /dev/null +++ b/stanc/Middle/SizedType/index.html @@ -0,0 +1,14 @@ + +SizedType (stanc.Middle.SizedType)

Module Middle.SizedType

Types which have a concrete size associated, e.g. vector[n]

type 'a t =
  1. | SInt
  2. | SReal
  3. | SComplex
  4. | SVector of Mem_pattern.t * 'a
  5. | SRowVector of Mem_pattern.t * 'a
  6. | SMatrix of Mem_pattern.t * 'a * 'a
  7. | SComplexVector of 'a
  8. | SComplexRowVector of 'a
  9. | SComplexMatrix of 'a * 'a
  10. | SArray of 'a t * 'a
  11. | STuple of 'a t list
val map : ('a -> 'b) -> 'c t -> 'd t
val fold : ('a -> 'b -> 'c) -> 'd -> 'e t -> 'd
val t_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : 'a. ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val compare : + 'a. ('a -> 'a -> Core__.Import.int) -> + 'a t -> + 'a t -> + Core__.Import.int
val hash_fold_t : + 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'a t -> + Ppx_hash_lib.Std.Hash.state
val pp : 'a Fmt.t -> 'b t Fmt.t
val to_unsized : 'a t -> UnsizedType.t
val get_dims_io : + Expr.Typed.t t -> + Middle__Expr.Typed.Meta.t Middle__Expr.Fixed.t list

Get the dimensions with respect to sizes needed for IO. Note: The main difference from get_dims is complex, where this function treats the complex type as a dual number. Note: Tuples are treated as scalars by this function due to the inherent assumption of rectangularity. Carefully consider new usages and use io_size when possible.

val io_size : + Middle__Expr.Typed.Meta.t Middle__Expr.Fixed.t t -> + Middle__Expr.Typed.Meta.t Middle__Expr.Fixed.t
val get_dims : 'a t -> 'b list

Get the dimensions of an object. Note: Tuples are treated as scalars by this function due to the inherent assumption of rectangularity. Carefully consider new usages!

val is_recursive_container : 'a t -> bool

* Check whether a SizedType holds indexable SizedTypes.

val get_array_dims : 'a t -> 'a t * 'b list

Return a type's array dimensions and the type inside the (possibly nested) array

val get_scalar_and_dims : 'a t -> 'a t * 'b list

Return a type's dimensions and inner scalar. Differs from get_array_dims in that this also breaks down vectors or matrices, so a SVector d is returned as (SReal, [d]) rather than (SVector d, [])

val internal_scalar : 'a t -> 'a t
val contains_tuple : 'a t -> bool
val is_complex_type : 'a t -> bool
val get_mem_pattern : 'a t -> Mem_pattern.t

* Return the mem_pattern of the SizedType

val demote_sizedtype_mem : 'a t -> 'b t
val promote_sizedtype_mem : 'a t -> 'a t
val modify_sizedtype_mem : Mem_pattern.t -> 'a t -> 'a t
val has_mem_pattern : 'a t -> bool
val build_sarray : 'a list -> 'b t -> 'b t

The inverse of get_array_dims

val flatten_tuple_io : 'a t -> 'a t list
diff --git a/stanc/Middle/Stan_math_signatures/index.html b/stanc/Middle/Stan_math_signatures/index.html new file mode 100644 index 000000000..bcbbec4e4 --- /dev/null +++ b/stanc/Middle/Stan_math_signatures/index.html @@ -0,0 +1,6 @@ + +Stan_math_signatures (stanc.Middle.Stan_math_signatures)

Module Middle.Stan_math_signatures

This module stores a table of all signatures from the Stan math C++ library which are exposed to Stan, and some helper functions for dealing with those signatures.

Function arguments are represented by their type an autodiff type. This is AutoDiffable for everything except arguments marked with the data keyword

type signature = UnsizedType.returntype * fun_arg list * Mem_pattern.t

Signatures consist of a return type, a list of arguments, and a flag for whether or not those arguments can be Struct of Arrays objects

val stan_math_signatures : (string, signature list) Core.Hashtbl.t

Mapping from names to signature(s) of functions

val is_stan_math_function_name : string -> bool

Equivalent to Hashtbl.mem stan_math_signatures s

type variadic_signature = {
  1. return_type : UnsizedType.t;
  2. control_args : fun_arg list;
  3. required_fn_rt : UnsizedType.t;
  4. required_fn_args : fun_arg list;
}
val stan_math_variadic_signatures : (string, variadic_signature) Core.Hashtbl.t

Mapping from names to description of a variadic function.

Note that these function names cannot be overloaded, and usually require customized code-gen in the backend.

val is_stan_math_variadic_function_name : string -> bool

Equivalent to Hashtbl.mem stan_math_variadic_signatures s

Pretty printers

val pp_math_sig : signature Fmt.t
val pretty_print_all_math_sigs : unit Fmt.t
val pretty_print_all_math_distributions : unit Fmt.t
type dimensionality
type return_behavior
type fkind = private
  1. | Lpmf
  2. | Lpdf
  3. | Rng
  4. | Cdf
  5. | Ccdf
  6. | UnaryVectorized of return_behavior
val pp_fkind : + Ppx_deriving_runtime.Format.formatter -> + fkind -> + Ppx_deriving_runtime.unit
val show_fkind : fkind -> Ppx_deriving_runtime.string
val distributions : + (fkind list * string * dimensionality list * Mem_pattern.t) list

The distribution families exposed by the math library

val dist_name_suffix : (string * 'a) list -> string -> string

Helpers for dealing with operators as signatures

val operator_to_stan_math_fns : Operator.t -> string list
val string_operator_to_stan_math_fns : string -> string
val pretty_print_math_lib_operator_sigs : Operator.t -> string list
val make_assignmentoperator_stan_math_signatures : Operator.t -> signature list

Special functions for the variadic signatures exposed

val is_reduce_sum_fn : string -> bool
val reduce_sum_slice_types : UnsizedType.t list
diff --git a/stanc/Middle/Stmt/Fixed/Pattern/index.html b/stanc/Middle/Stmt/Fixed/Pattern/index.html new file mode 100644 index 000000000..86fd1829a --- /dev/null +++ b/stanc/Middle/Stmt/Fixed/Pattern/index.html @@ -0,0 +1,49 @@ + +Pattern (stanc.Middle.Stmt.Fixed.Pattern)

Module Fixed.Pattern

type ('a, 'b) t =
  1. | Assignment of 'a lvalue * UnsizedType.t * 'a
  2. | TargetPE of 'a
  3. | NRFunApp of 'a Fun_kind.t * 'a list
  4. | Break
  5. | Continue
  6. | Return of 'a option
  7. | Skip
  8. | IfElse of 'a * 'b * 'b option
  9. | While of 'a * 'b
  10. | For of {
    1. loopvar : string;
    2. lower : 'a;
    3. upper : 'a;
    4. body : 'b;
    }
  11. | Profile of string * 'b list
  12. | Block of 'b list
  13. | SList of 'b list
  14. | Decl of {
    1. decl_adtype : UnsizedType.autodifftype;
    2. decl_id : string;
    3. decl_type : 'a Type.t;
    4. initialize : bool;
    }
and 'e lvalue = 'e lbase * 'e Index.t list
and 'e lbase =
  1. | LVariable of string
  2. | LTupleProjection of 'e lvalue * int
val sexp_of_lvalue : ('e -> Sexplib0.Sexp.t) -> 'e lvalue -> Sexplib0.Sexp.t
val sexp_of_lbase : ('e -> Sexplib0.Sexp.t) -> 'e lbase -> Sexplib0.Sexp.t
val lvalue_of_sexp : (Sexplib0.Sexp.t -> 'e) -> Sexplib0.Sexp.t -> 'e lvalue
val lbase_of_sexp : (Sexplib0.Sexp.t -> 'e) -> Sexplib0.Sexp.t -> 'e lbase
val hash_fold_lvalue : + (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e lvalue -> + Ppx_hash_lib.Std.Hash.state
val hash_fold_lbase : + (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e lbase -> + Ppx_hash_lib.Std.Hash.state
val compare_lvalue : ('e -> 'e -> int) -> 'e lvalue -> 'e lvalue -> int
val compare_lbase : ('e -> 'e -> int) -> 'e lbase -> 'e lbase -> int
include Common.Pattern.S2 with type ('a, 'b) t := ('a, 'b) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Common.Foldable.S2 with type ('a, 'b) t := ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
include Common.Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
diff --git a/stanc/Middle/Stmt/Fixed/index.html b/stanc/Middle/Stmt/Fixed/index.html new file mode 100644 index 000000000..c0d0b1413 --- /dev/null +++ b/stanc/Middle/Stmt/Fixed/index.html @@ -0,0 +1,59 @@ + +Fixed (stanc.Middle.Stmt.Fixed)

Module Stmt.Fixed

module Pattern : sig ... end
include Common.Fixed.S2 + with module First = Expr.Fixed + and module Pattern := Pattern
module First = Expr.Fixed
type ('a, 'b) t = {
  1. pattern : ('a First.t, ('a, 'b) t) Pattern.t;
  2. meta : 'b;
}
val map : ('a -> 'c) -> ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
val fold : ('c -> 'a -> 'c) -> ('c -> 'b -> 'c) -> 'c -> ('a, 'b) t -> 'c
include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'b Base__Ppx_compare_lib.compare -> + ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'b Base__Ppx_hash_lib.hash_fold -> + ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : + (Sexplib0__.Sexp.t -> 'a) -> + (Sexplib0__.Sexp.t -> 'b) -> + Sexplib0__.Sexp.t -> + ('a, 'b) t
val sexp_of_t : + ('a -> Sexplib0__.Sexp.t) -> + ('b -> Sexplib0__.Sexp.t) -> + ('a, 'b) t -> + Sexplib0__.Sexp.t
include Common.Foldable.S2 with type ('a, 'b) t := ('a, 'b) t
val fold_left : + f:('c -> 'a -> 'c) -> + g:('c -> 'b -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val fold_right : + f:('a -> 'c -> 'c) -> + g:('b -> 'c -> 'c) -> + init:'c -> + ('a, 'b) t -> + 'c
val any : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
val all : + pred_first:('a -> bool) -> + pred_second:('b -> bool) -> + ?init:bool -> + ('a, 'b) t -> + bool
include Common.Pretty.S2 with type ('a, 'b) t := ('a, 'b) t
val pp : + (Stdlib.Format.formatter -> 'a -> unit) -> + (Stdlib.Format.formatter -> 'b -> unit) -> + Stdlib.Format.formatter -> + ('a, 'b) t -> + unit
val fold_pattern : + f:(('a * 'r1 First.Pattern.t) -> 'r1) -> + g:(('b * ('r1, 'r2) Pattern.t) -> 'r2) -> + ('a, 'b) t -> + 'r2

fold_pattern traverses the data structure from the bottom up replacing the original meta data of First with type 'a with some result type 'r1 and the meta data at this level withtype 'b to another result type 'r2 and combines the result values on the way back up.

val rewrite_bottom_up : + f:('a First.t -> 'a First.t) -> + g:(('a, 'b) t -> ('a, 'b) t) -> + ('a, 'b) t -> + ('a, 'b) t

rewrite_bottom_up specializes fold_pattern so that the result type 'r1 is equal to the type of the nested fixed-point type i.e. 'r1 = 'a First.t and the result type 'r2 is equal to the top-level fixed-point type i.e. 'r2 = ('a,'b) t.

This also means that the function f can be written with our nested fixed-point type 'a First.t as its argument and g can be written with ('a,'b) t as its argument.

val unfold_pattern : + f:('r1 -> 'a * 'r1 First.Pattern.t) -> + g:('r2 -> 'b * ('r1, 'r2) Pattern.t) -> + 'r2 -> + ('a, 'b) t

unfold_pattern takes a seed value of type 'r2 and uses the function g to generate a tuple of meta-data and a pattern with types 'r1 and 'r2. The functions proceeds by recursively applying g to the contained values of type 'r2 and f to values of type 'r1 finishing when the pattern contains no values of type 'r1 or 'r2.

val rewrite_top_down : + f:('a First.t -> 'a First.t) -> + g:(('a, 'b) t -> ('a, 'b) t) -> + ('a, 'b) t -> + ('a, 'b) t

rewrite_top_down specializes unfold_pattern in a manner analogous to how rewrite_bottom_up specializes fold_pattern

diff --git a/stanc/Middle/Stmt/Helpers/index.html b/stanc/Middle/Stmt/Helpers/index.html new file mode 100644 index 000000000..a524b3e98 --- /dev/null +++ b/stanc/Middle/Stmt/Helpers/index.html @@ -0,0 +1,57 @@ + +Helpers (stanc.Middle.Stmt.Helpers)

Module Stmt.Helpers

val temp_vars : + Expr.Typed.t list -> + Located.t list * Expr.Typed.t list * (unit -> unit)
val ensure_var : + (Expr.Typed.t -> 'a -> Located.t) -> + Expr.Typed.t -> + 'a -> + Located.t
val internal_nrfunapp : + 'a Fixed.First.t Internal_fun.t -> + 'a Fixed.First.t list -> + 'b -> + ('a, 'b) Fixed.t
val contains_fn_kind : + ('a Fixed.First.t Fun_kind.t -> bool) -> + ?init:bool -> + ('a, 'b) Fixed.t -> + bool
val mk_for : + Expr.Typed.t -> + (Expr.Typed.t -> Located.t) -> + Location_span.t -> + Located.t
val mk_nested_for : + Expr.Typed.t list -> + (Expr.Typed.t list -> Located.t) -> + Location_span.t -> + Located.t
val mk_for_iteratee : + Expr.Typed.t -> + (Expr.Typed.t -> Located.t) -> + Expr.Typed.t -> + Location_span.t -> + Located.t
val for_each : + (Expr.Typed.t -> Located.t) -> + Expr.Typed.t -> + Location_span.t -> + Located.t
val assign_indexed : + UnsizedType.t -> + 'b Fixed.First.t Fixed.Pattern.lvalue -> + 'a -> + ('b Expr.Fixed.t -> 'b Expr.Fixed.t) -> + 'b Expr.Fixed.t -> + ('b, 'a) Fixed.t
val get_lhs_name : 'a Fixed.Pattern.lvalue -> string

The name of the lhs. This adds "." and an index to tuple projections

val lvariable : string -> 'e Fixed.Pattern.lvalue
val lvalue_of_expr_opt : + 'e Expr.Fixed.t -> + 'e Expr.Fixed.t Fixed.Pattern.lvalue option
val expr_of_lvalue : + 'e Expr.Fixed.t Fixed.Pattern.lvalue -> + meta:'e -> + 'e Expr.Fixed.t
val map_lhs_variable : + f:(string -> string) -> + 'e Fixed.Pattern.lvalue -> + 'e Fixed.Pattern.lvalue
val lhs_indices : 'e Fixed.Pattern.lvalue -> 'e Index.t list
val lhs_variable : 'e Fixed.Pattern.lvalue -> string

This gets the innermost name of the variable. It differs from get_lhs_name in that tuple projections do not add their indices here.

val lvalue_base_reference : 'e Fixed.Pattern.lvalue -> 'e Fixed.Pattern.lvalue

Reduce an lvalue down to its "base reference", which is a variable with maximum tuple indices after it. For example:

x[1,2

3] -> x x.11,2.23.3 -> x.1 x.1.21,23.3 -> x.1.2

diff --git a/stanc/Middle/Stmt/Located/Map/Key/index.html b/stanc/Middle/Stmt/Located/Map/Key/index.html new file mode 100644 index 000000000..77d3dfba2 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Located.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Stmt/Located/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Middle/Stmt/Located/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..0820d335e --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Located.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Stmt/Located/Map/Provide_bin_io/index.html b/stanc/Middle/Stmt/Located/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..cdc43acdf --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Stmt.Located.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Middle/Stmt/Located/Map/Provide_hash/argument-1-Key/index.html b/stanc/Middle/Stmt/Located/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..a5d788e22 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Located.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Middle/Stmt/Located/Map/Provide_hash/index.html b/stanc/Middle/Stmt/Located/Map/Provide_hash/index.html new file mode 100644 index 000000000..3d755ceb0 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Middle.Stmt.Located.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Middle/Stmt/Located/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Middle/Stmt/Located/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..d7f94b1f2 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Located.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Middle/Stmt/Located/Map/Provide_of_sexp/index.html b/stanc/Middle/Stmt/Located/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..441146601 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Stmt.Located.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Middle/Stmt/Located/Map/index.html b/stanc/Middle/Stmt/Located/Map/index.html new file mode 100644 index 000000000..167c4e0ea --- /dev/null +++ b/stanc/Middle/Stmt/Located/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Middle.Stmt.Located.Map)

Module Located.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Stmt/Located/Meta/index.html b/stanc/Middle/Stmt/Located/Meta/index.html new file mode 100644 index 000000000..3eb968526 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Meta/index.html @@ -0,0 +1,2 @@ + +Meta (stanc.Middle.Stmt.Located.Meta)

Module Located.Meta

include Ppx_compare_lib.Comparable.S with type t := t
include Sexplib0.Sexpable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
include Common.Specialized.Meta with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Common.Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
diff --git a/stanc/Middle/Stmt/Located/Non_recursive/index.html b/stanc/Middle/Stmt/Located/Non_recursive/index.html new file mode 100644 index 000000000..652670a42 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Non_recursive/index.html @@ -0,0 +1,2 @@ + +Non_recursive (stanc.Middle.Stmt.Located.Non_recursive)

Module Located.Non_recursive

type t = {
  1. pattern : (Expr.Typed.t, int) Fixed.Pattern.t;
  2. meta : Meta.t;
}
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Middle/Stmt/Located/Replace_polymorphic_compare/index.html b/stanc/Middle/Stmt/Located/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..b2522db4b --- /dev/null +++ b/stanc/Middle/Stmt/Located/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Middle.Stmt.Located.Replace_polymorphic_compare)

Module Located.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Middle/Stmt/Located/Set/Elt/index.html b/stanc/Middle/Stmt/Located/Set/Elt/index.html new file mode 100644 index 000000000..fa1432e12 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Located.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Stmt/Located/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Middle/Stmt/Located/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..b44a219c8 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Located.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Stmt/Located/Set/Provide_bin_io/index.html b/stanc/Middle/Stmt/Located/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..ddf728f8f --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Stmt.Located.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Stmt/Located/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Middle/Stmt/Located/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..02e7f5de4 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Located.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Middle/Stmt/Located/Set/Provide_hash/index.html b/stanc/Middle/Stmt/Located/Set/Provide_hash/index.html new file mode 100644 index 000000000..98e54469b --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Middle.Stmt.Located.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Middle/Stmt/Located/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Middle/Stmt/Located/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..8ab499462 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Located.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Middle/Stmt/Located/Set/Provide_of_sexp/index.html b/stanc/Middle/Stmt/Located/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..253243ec1 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Stmt.Located.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Middle/Stmt/Located/Set/index.html b/stanc/Middle/Stmt/Located/Set/index.html new file mode 100644 index 000000000..a185aff75 --- /dev/null +++ b/stanc/Middle/Stmt/Located/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Middle.Stmt.Located.Set)

Module Located.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Stmt/Located/index.html b/stanc/Middle/Stmt/Located/index.html new file mode 100644 index 000000000..3c0da5c2f --- /dev/null +++ b/stanc/Middle/Stmt/Located/index.html @@ -0,0 +1,9 @@ + +Located (stanc.Middle.Stmt.Located)

Module Stmt.Located

module Meta : sig ... end
include Common.Specialized.S + with module Meta := Meta + and type t = (Expr.Typed.Meta.t, Meta.t) Fixed.t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Common.Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
include Core.Comparator.S with type t := t
type comparator_witness
include Core.Comparable.S + with type t := t + and type comparator_witness := comparator_witness
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
val loc_of : t -> Location_span.t
module Non_recursive : sig ... end
diff --git a/stanc/Middle/Stmt/Numbered/Map/Key/index.html b/stanc/Middle/Stmt/Numbered/Map/Key/index.html new file mode 100644 index 000000000..dee4cfb7d --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Numbered.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Stmt/Numbered/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Middle/Stmt/Numbered/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..a725626c6 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Numbered.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Stmt/Numbered/Map/Provide_bin_io/index.html b/stanc/Middle/Stmt/Numbered/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..a64b7e0ae --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Stmt.Numbered.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Middle/Stmt/Numbered/Map/Provide_hash/argument-1-Key/index.html b/stanc/Middle/Stmt/Numbered/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..208443ba0 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Numbered.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Middle/Stmt/Numbered/Map/Provide_hash/index.html b/stanc/Middle/Stmt/Numbered/Map/Provide_hash/index.html new file mode 100644 index 000000000..41c83c2f6 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Middle.Stmt.Numbered.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Middle/Stmt/Numbered/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Middle/Stmt/Numbered/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..b272654e4 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.Stmt.Numbered.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Middle/Stmt/Numbered/Map/Provide_of_sexp/index.html b/stanc/Middle/Stmt/Numbered/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..a28246069 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Stmt.Numbered.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Middle/Stmt/Numbered/Map/index.html b/stanc/Middle/Stmt/Numbered/Map/index.html new file mode 100644 index 000000000..864ba1701 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Middle.Stmt.Numbered.Map)

Module Numbered.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Stmt/Numbered/Meta/index.html b/stanc/Middle/Stmt/Numbered/Meta/index.html new file mode 100644 index 000000000..13e6c9828 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Meta/index.html @@ -0,0 +1,2 @@ + +Meta (stanc.Middle.Stmt.Numbered.Meta)

Module Numbered.Meta

type t = int
include Ppx_compare_lib.Comparable.S with type t := t
include Sexplib0.Sexpable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
include Common.Specialized.Meta with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Common.Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
val from_int : int -> t
diff --git a/stanc/Middle/Stmt/Numbered/Replace_polymorphic_compare/index.html b/stanc/Middle/Stmt/Numbered/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..1d8986c49 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Middle.Stmt.Numbered.Replace_polymorphic_compare)

Module Numbered.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Middle/Stmt/Numbered/Set/Elt/index.html b/stanc/Middle/Stmt/Numbered/Set/Elt/index.html new file mode 100644 index 000000000..617bb29f2 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Numbered.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/Stmt/Numbered/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Middle/Stmt/Numbered/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..a29fd8fe2 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Numbered.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Stmt/Numbered/Set/Provide_bin_io/index.html b/stanc/Middle/Stmt/Numbered/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..76e4fd871 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.Stmt.Numbered.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/Stmt/Numbered/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Middle/Stmt/Numbered/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..132f86540 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Numbered.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Middle/Stmt/Numbered/Set/Provide_hash/index.html b/stanc/Middle/Stmt/Numbered/Set/Provide_hash/index.html new file mode 100644 index 000000000..cf9eebcc0 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Middle.Stmt.Numbered.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Middle/Stmt/Numbered/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Middle/Stmt/Numbered/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..09de43b77 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.Stmt.Numbered.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Middle/Stmt/Numbered/Set/Provide_of_sexp/index.html b/stanc/Middle/Stmt/Numbered/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..01265858c --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.Stmt.Numbered.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Middle/Stmt/Numbered/Set/index.html b/stanc/Middle/Stmt/Numbered/Set/index.html new file mode 100644 index 000000000..4e4e71fe9 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Middle.Stmt.Numbered.Set)

Module Numbered.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/Stmt/Numbered/index.html b/stanc/Middle/Stmt/Numbered/index.html new file mode 100644 index 000000000..4a5e97dc5 --- /dev/null +++ b/stanc/Middle/Stmt/Numbered/index.html @@ -0,0 +1,9 @@ + +Numbered (stanc.Middle.Stmt.Numbered)

Module Stmt.Numbered

module Meta : sig ... end
include Common.Specialized.S + with module Meta := Meta + and type t = (Expr.Typed.Meta.t, Meta.t) Fixed.t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Common.Pretty.S with type t := t
val pp : Stdlib.Format.formatter -> t -> unit
include Core.Comparator.S with type t := t
type comparator_witness
include Core.Comparable.S + with type t := t + and type comparator_witness := comparator_witness
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
diff --git a/stanc/Middle/Stmt/index.html b/stanc/Middle/Stmt/index.html new file mode 100644 index 000000000..ef51c83f4 --- /dev/null +++ b/stanc/Middle/Stmt/index.html @@ -0,0 +1,2 @@ + +Stmt (stanc.Middle.Stmt)

Module Middle.Stmt

MIR types and modules corresponding to the statements of the language

module Fixed : sig ... end
module Located : sig ... end
module Numbered : sig ... end
module Helpers : sig ... end
diff --git a/stanc/Middle/Transformation/index.html b/stanc/Middle/Transformation/index.html new file mode 100644 index 000000000..06aaf60c6 --- /dev/null +++ b/stanc/Middle/Transformation/index.html @@ -0,0 +1,10 @@ + +Transformation (stanc.Middle.Transformation)

Module Middle.Transformation

Transformations (constraints) for global variable declarations

type 'e t =
  1. | Identity
  2. | Lower of 'e
  3. | Upper of 'e
  4. | LowerUpper of 'e * 'e
  5. | Offset of 'e
  6. | Multiplier of 'e
  7. | OffsetMultiplier of 'e * 'e
  8. | Ordered
  9. | PositiveOrdered
  10. | Simplex
  11. | UnitVector
  12. | CholeskyCorr
  13. | CholeskyCov
  14. | Correlation
  15. | Covariance
  16. | TupleTransformation of 'e t list

Types of transformations. Polymorphic type is filled in with an expression fixed-point, e.g. Frontend.Ast.typed_expression

val map : ('a -> 'b) -> 'c t -> 'd t
val fold : ('a -> 'b -> 'c) -> 'd -> 'e t -> 'd
val t_of_sexp : 'e. (Sexplib0.Sexp.t -> 'e) -> Sexplib0.Sexp.t -> 'e t
val sexp_of_t : 'e. ('e -> Sexplib0.Sexp.t) -> 'e t -> Sexplib0.Sexp.t
val compare : + 'e. ('e -> 'e -> Core__.Import.int) -> + 'e t -> + 'e t -> + Core__.Import.int
val hash_fold_t : + 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'e t -> + Ppx_hash_lib.Std.Hash.state
val has_check : 'a t -> bool
diff --git a/stanc/Middle/Type/index.html b/stanc/Middle/Type/index.html new file mode 100644 index 000000000..115865a4d --- /dev/null +++ b/stanc/Middle/Type/index.html @@ -0,0 +1,10 @@ + +Type (stanc.Middle.Type)

Module Middle.Type

A type which unifies SizedTypes and UnsizedTypes for declarations

type 'a t =
  1. | Sized of 'a SizedType.t
  2. | Unsized of UnsizedType.t
val map : ('a -> 'b) -> 'c t -> 'd t
val fold : ('a -> 'b -> 'a) -> 'c -> 'd t -> 'e
val t_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : 'a. ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val compare : + 'a. ('a -> 'a -> Core__.Import.int) -> + 'a t -> + 'a t -> + Core__.Import.int
val hash_fold_t : + 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> + Ppx_hash_lib.Std.Hash.state -> + 'a t -> + Ppx_hash_lib.Std.Hash.state
val pp : 'a Fmt.t -> Stdlib.Format.formatter -> 'b t -> unit
val to_unsized : 'a t -> UnsizedType.t
diff --git a/stanc/Middle/UnsizedType/Comparator/index.html b/stanc/Middle/UnsizedType/Comparator/index.html new file mode 100644 index 000000000..676b76ecd --- /dev/null +++ b/stanc/Middle/UnsizedType/Comparator/index.html @@ -0,0 +1,2 @@ + +Comparator (stanc.Middle.UnsizedType.Comparator)

Module UnsizedType.Comparator

type comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/UnsizedType/Map/Key/index.html b/stanc/Middle/UnsizedType/Map/Key/index.html new file mode 100644 index 000000000..e98f573c5 --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.UnsizedType.Map.Key)

Module Map.Key

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = Comparator.comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/UnsizedType/Map/Provide_bin_io/argument-1-Key/index.html b/stanc/Middle/UnsizedType/Map/Provide_bin_io/argument-1-Key/index.html new file mode 100644 index 000000000..d6dfbe806 --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/Provide_bin_io/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.UnsizedType.Map.Provide_bin_io.Key)

Parameter Provide_bin_io.Key

val bin_size_t : Key.t Bin_prot__.Size.sizer
val bin_write_t : Key.t Bin_prot__.Write.writer
val bin_read_t : Key.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Key.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Key.t Bin_prot__.Type_class.writer
val bin_reader_t : Key.t Bin_prot__.Type_class.reader
val bin_t : Key.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/UnsizedType/Map/Provide_bin_io/index.html b/stanc/Middle/UnsizedType/Map/Provide_bin_io/index.html new file mode 100644 index 000000000..c3393cab0 --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.UnsizedType.Map.Provide_bin_io)

Module Map.Provide_bin_io

Parameters

module Key : sig ... end

Signature

val bin_shape_t : Bin_prot__.Shape.t -> Bin_prot__.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot__.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot__.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot__.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot__.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot__.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot__.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot__.Type_class.S1.t
diff --git a/stanc/Middle/UnsizedType/Map/Provide_hash/argument-1-Key/index.html b/stanc/Middle/UnsizedType/Map/Provide_hash/argument-1-Key/index.html new file mode 100644 index 000000000..19e18f771 --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/Provide_hash/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.UnsizedType.Map.Provide_hash.Key)

Parameter Provide_hash.Key

val hash_fold_t : Base__.Hash.state -> Key.t -> Base__.Hash.state
diff --git a/stanc/Middle/UnsizedType/Map/Provide_hash/index.html b/stanc/Middle/UnsizedType/Map/Provide_hash/index.html new file mode 100644 index 000000000..f474a6f6b --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/Provide_hash/index.html @@ -0,0 +1,4 @@ + +Provide_hash (stanc.Middle.UnsizedType.Map.Provide_hash)

Module Map.Provide_hash

Parameters

module Key : sig ... end

Signature

val hash_fold_t : + 'a Base__Ppx_hash_lib.hash_fold -> + 'a t Base__Ppx_hash_lib.hash_fold
diff --git a/stanc/Middle/UnsizedType/Map/Provide_of_sexp/argument-1-Key/index.html b/stanc/Middle/UnsizedType/Map/Provide_of_sexp/argument-1-Key/index.html new file mode 100644 index 000000000..ff2e06514 --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/Provide_of_sexp/argument-1-Key/index.html @@ -0,0 +1,2 @@ + +Key (stanc.Middle.UnsizedType.Map.Provide_of_sexp.Key)

Parameter Provide_of_sexp.Key

val t_of_sexp : Sexplib0.Sexp.t -> Key.t
diff --git a/stanc/Middle/UnsizedType/Map/Provide_of_sexp/index.html b/stanc/Middle/UnsizedType/Map/Provide_of_sexp/index.html new file mode 100644 index 000000000..dc1d3930a --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.UnsizedType.Map.Provide_of_sexp)

Module Map.Provide_of_sexp

Parameters

module Key : sig ... end

Signature

val t_of_sexp : (Sexplib0.Sexp.t -> 'a__002_) -> Sexplib0.Sexp.t -> 'a__002_ t
diff --git a/stanc/Middle/UnsizedType/Map/index.html b/stanc/Middle/UnsizedType/Map/index.html new file mode 100644 index 000000000..f90cc2df4 --- /dev/null +++ b/stanc/Middle/UnsizedType/Map/index.html @@ -0,0 +1,96 @@ + +Map (stanc.Middle.UnsizedType.Map)

Module UnsizedType.Map

module Key : sig ... end
type !'a t = (Key.t, 'a, Key.comparator_witness) Core__Map_intf.Map.t
val compare : + 'a Base__Ppx_compare_lib.compare -> + 'a t Base__Ppx_compare_lib.compare
val equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equal
val empty : ('k, 'cmp, 'a t) Core__Map_intf.Without_comparator.t
val singleton : + ('k, 'cmp, Key.t -> 'v -> 'v t) Core__Map_intf.Without_comparator.t
val map_keys : + ('k2, + 'cmp2, + 'v t -> + f:(Key.t -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val map_keys_exn : + ('k2, 'cmp2, 'v t -> f:(Key.t -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val transpose_keys : + ('k1, + 'cmp1, + ('k2, 'cmp2, 'a t t -> 'a t t) Core__Map_intf.Without_comparator.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array : + ('k, 'cmp, (Key.t * 'v) array -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('k, 'cmp, (Key.t * 'v) array -> 'v t) Core__Map_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('k, 'cmp, len:int -> f:(int -> Key.t * 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_alist : + ('k, 'cmp, (Key.t * 'v) list -> [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_alist_or_error : + ('k, 'cmp, (Key.t * 'v) list -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_alist_exn : + ('k, 'cmp, (Key.t * 'v) list -> 'v t) Core__Map_intf.Without_comparator.t
val of_alist_multi : + ('k, 'cmp, (Key.t * 'v) list -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_alist_fold : + ('k, 'cmp, (Key.t * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> 'v2 t) + Core__Map_intf.Without_comparator.t
val of_alist_reduce : + ('k, 'cmp, (Key.t * 'v) list -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_increasing_sequence : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence : + ('k, + 'cmp, + (Key.t * 'v) Base__.Sequence.t -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_sequence_or_error : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_sequence_exn : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_sequence_multi : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_sequence_fold : + ('k, + 'cmp, + (Key.t * 'v1) Base__.Sequence.t -> + init:'v2 -> + f:('v2 -> 'v1 -> 'v2) -> + 'v2 t) + Core__Map_intf.Without_comparator.t
val of_sequence_reduce : + ('k, 'cmp, (Key.t * 'v) Base__.Sequence.t -> f:('v -> 'v -> 'v) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key : + ('k, + 'cmp, + 'v list -> + get_key:('v -> Key.t) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_list_with_key_or_error : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t Base__.Or_error.t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_exn : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_list_with_key_multi : + ('k, 'cmp, 'v list -> get_key:('v -> Key.t) -> 'v list t) + Core__Map_intf.Without_comparator.t
val of_iteri : + ('k, + 'cmp, + iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> + [ `Duplicate_key of Key.t | `Ok of 'v t ]) + Core__Map_intf.Without_comparator.t
val of_iteri_exn : + ('k, 'cmp, iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> 'v t) + Core__Map_intf.Without_comparator.t
val of_tree : + ('k, 'cmp, (Key.t, 'v, Key.comparator_witness) Core__Map_intf.Tree.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_hashtbl_exn : + ('k, 'cmp, (Key.t, 'v) Core__.Hashtbl.t -> 'v t) + Core__Map_intf.Without_comparator.t
val of_key_set : + (Key.t, Key.comparator_witness) Base.Set.t -> + f:(Key.t -> 'v) -> + 'v t
val quickcheck_generator : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Generator.t -> + 'v Core__.Quickcheck.Generator.t -> + 'v t Core__.Quickcheck.Generator.t) + Core__Map_intf.Without_comparator.t
val map : 'a t -> f:('a -> 'b) -> 'b t
module Provide_of_sexp (Key : sig ... end) : sig ... end
module Provide_bin_io (Key : sig ... end) : sig ... end
module Provide_hash (Key : sig ... end) : sig ... end
val quickcheck_observer : + Key.t Core__.Quickcheck.Observer.t -> + 'v Core__.Quickcheck.Observer.t -> + 'v t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + ('k, + 'cmp, + Key.t Core__.Quickcheck.Shrinker.t -> + 'v Core__.Quickcheck.Shrinker.t -> + 'v t Core__.Quickcheck.Shrinker.t) + Core__Map_intf.Without_comparator.t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/UnsizedType/Replace_polymorphic_compare/index.html b/stanc/Middle/UnsizedType/Replace_polymorphic_compare/index.html new file mode 100644 index 000000000..4d3721f59 --- /dev/null +++ b/stanc/Middle/UnsizedType/Replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Replace_polymorphic_compare (stanc.Middle.UnsizedType.Replace_polymorphic_compare)

Module UnsizedType.Replace_polymorphic_compare

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
diff --git a/stanc/Middle/UnsizedType/Set/Elt/index.html b/stanc/Middle/UnsizedType/Set/Elt/index.html new file mode 100644 index 000000000..fca01a218 --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.UnsizedType.Set.Elt)

Module Set.Elt

type t = t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
type comparator_witness = Comparator.comparator_witness
val comparator : (t, comparator_witness) Core__Comparator.comparator
diff --git a/stanc/Middle/UnsizedType/Set/Provide_bin_io/argument-1-Elt/index.html b/stanc/Middle/UnsizedType/Set/Provide_bin_io/argument-1-Elt/index.html new file mode 100644 index 000000000..1f3b04ea6 --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/Provide_bin_io/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.UnsizedType.Set.Provide_bin_io.Elt)

Parameter Provide_bin_io.Elt

val bin_size_t : Elt.t Bin_prot__.Size.sizer
val bin_write_t : Elt.t Bin_prot__.Write.writer
val bin_read_t : Elt.t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> Elt.t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : Elt.t Bin_prot__.Type_class.writer
val bin_reader_t : Elt.t Bin_prot__.Type_class.reader
val bin_t : Elt.t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/UnsizedType/Set/Provide_bin_io/index.html b/stanc/Middle/UnsizedType/Set/Provide_bin_io/index.html new file mode 100644 index 000000000..491144514 --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/Provide_bin_io/index.html @@ -0,0 +1,2 @@ + +Provide_bin_io (stanc.Middle.UnsizedType.Set.Provide_bin_io)

Module Set.Provide_bin_io

Parameters

module Elt : sig ... end

Signature

val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
diff --git a/stanc/Middle/UnsizedType/Set/Provide_hash/argument-1-Elt/index.html b/stanc/Middle/UnsizedType/Set/Provide_hash/argument-1-Elt/index.html new file mode 100644 index 000000000..1e609257e --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/Provide_hash/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.UnsizedType.Set.Provide_hash.Elt)

Parameter Provide_hash.Elt

val hash_fold_t : Base__.Hash.state -> Elt.t -> Base__.Hash.state
diff --git a/stanc/Middle/UnsizedType/Set/Provide_hash/index.html b/stanc/Middle/UnsizedType/Set/Provide_hash/index.html new file mode 100644 index 000000000..6cb5aa69b --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/Provide_hash/index.html @@ -0,0 +1,2 @@ + +Provide_hash (stanc.Middle.UnsizedType.Set.Provide_hash)

Module Set.Provide_hash

Parameters

module Elt : sig ... end

Signature

val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
diff --git a/stanc/Middle/UnsizedType/Set/Provide_of_sexp/argument-1-Elt/index.html b/stanc/Middle/UnsizedType/Set/Provide_of_sexp/argument-1-Elt/index.html new file mode 100644 index 000000000..aa28779ff --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/Provide_of_sexp/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +Elt (stanc.Middle.UnsizedType.Set.Provide_of_sexp.Elt)

Parameter Provide_of_sexp.Elt

val t_of_sexp : Sexplib0.Sexp.t -> Elt.t
diff --git a/stanc/Middle/UnsizedType/Set/Provide_of_sexp/index.html b/stanc/Middle/UnsizedType/Set/Provide_of_sexp/index.html new file mode 100644 index 000000000..d1d0265a2 --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/Provide_of_sexp/index.html @@ -0,0 +1,2 @@ + +Provide_of_sexp (stanc.Middle.UnsizedType.Set.Provide_of_sexp)

Module Set.Provide_of_sexp

Parameters

module Elt : sig ... end

Signature

val t_of_sexp : Sexplib0.Sexp.t -> t
diff --git a/stanc/Middle/UnsizedType/Set/index.html b/stanc/Middle/UnsizedType/Set/index.html new file mode 100644 index 000000000..34f522d46 --- /dev/null +++ b/stanc/Middle/UnsizedType/Set/index.html @@ -0,0 +1,27 @@ + +Set (stanc.Middle.UnsizedType.Set)

Module UnsizedType.Set

module Elt : sig ... end
type t = (Elt.t, Elt.comparator_witness) Base.Set.t
val compare : t Base__Ppx_compare_lib.compare
val equal : t Base__Ppx_compare_lib.equal
val empty : ('a, 'cmp, t) Core__Set_intf.Without_comparator.t
val singleton : ('a, 'cmp, Elt.t -> t) Core__Set_intf.Without_comparator.t
val union_list : ('a, 'cmp, t list -> t) Core__Set_intf.Without_comparator.t
val of_list : ('a, 'cmp, Elt.t list -> t) Core__Set_intf.Without_comparator.t
val of_sequence : + ('a, 'cmp, Elt.t Base__.Sequence.t -> t) Core__Set_intf.Without_comparator.t
val of_array : ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_sorted_array : + ('a, 'cmp, Elt.t array -> t Base__.Or_error.t) + Core__Set_intf.Without_comparator.t
val of_sorted_array_unchecked : + ('a, 'cmp, Elt.t array -> t) Core__Set_intf.Without_comparator.t
val of_increasing_iterator_unchecked : + ('a, 'cmp, len:int -> f:(int -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val stable_dedup_list : + ('a, 'b, Elt.t list -> Elt.t list) Core__Set_intf.Without_comparator.t
val map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t) -> t) + Core__Set_intf.Without_comparator.t
val filter_map : + ('b, 'cmp, ('a, 'c) Core__Set_intf.Set.t -> f:('a -> Elt.t option) -> t) + Core__Set_intf.Without_comparator.t
val of_tree : + ('a, 'cmp, (Elt.t, Elt.comparator_witness) Core__Set_intf.Tree.t -> t) + Core__Set_intf.Without_comparator.t
val of_hash_set : + ('a, 'cmp, Elt.t Core__.Hash_set.t -> t) Core__Set_intf.Without_comparator.t
val of_hashtbl_keys : + ('a, 'cmp, (Elt.t, 'b) Core__.Hashtbl.t -> t) + Core__Set_intf.Without_comparator.t
val of_map_keys : (Elt.t, 'a, Elt.comparator_witness) Base.Map.t -> t
val quickcheck_generator : + ('a, + 'cmp, + Elt.t Core__.Quickcheck.Generator.t -> + t Core__.Quickcheck.Generator.t) + Core__Set_intf.Without_comparator.t
module Provide_of_sexp (Elt : sig ... end) : sig ... end
module Provide_bin_io (Elt : sig ... end) : sig ... end
module Provide_hash (Elt : sig ... end) : sig ... end
val quickcheck_observer : + Elt.t Core__.Quickcheck.Observer.t -> + t Core__.Quickcheck.Observer.t
val quickcheck_shrinker : + Elt.t Core__.Quickcheck.Shrinker.t -> + t Core__.Quickcheck.Shrinker.t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
diff --git a/stanc/Middle/UnsizedType/index.html b/stanc/Middle/UnsizedType/index.html new file mode 100644 index 000000000..90b7e6db2 --- /dev/null +++ b/stanc/Middle/UnsizedType/index.html @@ -0,0 +1,17 @@ + +UnsizedType (stanc.Middle.UnsizedType)

Module Middle.UnsizedType

Types which have dimensionalities but not sizes, e.g. array[,,]

type t =
  1. | UInt
  2. | UReal
  3. | UVector
  4. | UComplex
  5. | URowVector
  6. | UMatrix
  7. | UComplexVector
  8. | UComplexRowVector
  9. | UComplexMatrix
  10. | UArray of t
  11. | UTuple of t list
  12. | UFun of argumentlist * returntype * bool Fun_kind.suffix * Mem_pattern.t
  13. | UMathLibraryFunction
and autodifftype =
  1. | DataOnly
  2. | AutoDiffable
  3. | TupleAD of autodifftype list
and argumentlist = (autodifftype * t) list
and returntype =
  1. | Void
  2. | ReturnType of t
val compare_autodifftype : autodifftype -> autodifftype -> Core__.Import.int
val compare_argumentlist : argumentlist -> argumentlist -> Core__.Import.int
val compare_returntype : returntype -> returntype -> Core__.Import.int
val hash_fold_t : + Ppx_hash_lib.Std.Hash.state -> + t -> + Ppx_hash_lib.Std.Hash.state
val hash_fold_autodifftype : + Ppx_hash_lib.Std.Hash.state -> + autodifftype -> + Ppx_hash_lib.Std.Hash.state
val hash_fold_argumentlist : + Ppx_hash_lib.Std.Hash.state -> + argumentlist -> + Ppx_hash_lib.Std.Hash.state
val hash_fold_returntype : + Ppx_hash_lib.Std.Hash.state -> + returntype -> + Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val hash_autodifftype : autodifftype -> Ppx_hash_lib.Std.Hash.hash_value
val hash_argumentlist : argumentlist -> Ppx_hash_lib.Std.Hash.hash_value
val hash_returntype : returntype -> Ppx_hash_lib.Std.Hash.hash_value
val t_of_sexp : Sexplib0.Sexp.t -> t
val autodifftype_of_sexp : Sexplib0.Sexp.t -> autodifftype
val argumentlist_of_sexp : Sexplib0.Sexp.t -> argumentlist
val returntype_of_sexp : Sexplib0.Sexp.t -> returntype
val sexp_of_t : t -> Sexplib0.Sexp.t
val sexp_of_autodifftype : autodifftype -> Sexplib0.Sexp.t
val sexp_of_argumentlist : argumentlist -> Sexplib0.Sexp.t
val sexp_of_returntype : returntype -> Sexplib0.Sexp.t
val equal_autodifftype : autodifftype -> autodifftype -> Core__.Import.bool
val equal_argumentlist : argumentlist -> argumentlist -> bool
val equal_returntype : returntype -> returntype -> bool
val pp_tuple_autodifftype : autodifftype Fmt.t
val returntype_to_type_opt : returntype -> t option
val pp_autodifftype : Stdlib.Format.formatter -> autodifftype -> unit
val unsized_array_depth : t -> t * int
val count_dims : t -> int
val contains_tuple : t -> bool
val unwind_array_type : t -> t * int
val wind_array_type : (t * int) -> t
val pp : t Fmt.t
val pp_fun_arg : (autodifftype * t) Fmt.t
val pp_returntype : Stdlib.Format.formatter -> returntype -> unit
val autodifftype_can_convert : autodifftype -> autodifftype -> bool
val has_autodiff : autodifftype -> bool
val any_autodiff : autodifftype list -> bool
val lub_ad_type : autodifftype list -> autodifftype option
val common_type : (t * t) -> t option

Given two types find the minimal type both can convert to

val is_autodiffable : t -> bool
val is_autodifftype : autodifftype -> bool
val is_dataonlytype : autodifftype -> bool
val is_scalar_type : t -> bool
val promote_container : t -> t -> t
val is_discrete_type : t -> bool

Used to determine valid covariates for _lpmf functions

val is_int_type : t -> bool

Used in code generation and other places, does _not_ include tuples of ints

val is_complex_type : t -> bool
val internal_scalar : t -> t
val is_eigen_type : t -> bool
val is_fun_type : t -> bool
val contains_int : t -> bool

Detect if type contains an integer

val contains_eigen_type : t -> bool
val is_container : t -> bool
val is_array : t -> bool
val is_indexing_matrix : (t * 'a list) -> bool
val fill_adtype_for_type : autodifftype -> t -> autodifftype

In some places (e.g. code generation) we need to instantiate an AD type. Previously we would just say DataOnly or AutoDiffable, however this breaks the invariant that a Tuple always has TupleAD as it's autodifftype

val enumerate_tuple_names_io : string -> t -> string list

List all possible tuple sub-names for IO purposes. E.g, the decl array[2] (int, real) foo; should yield the list ["foo.1";"foo.2"].

module Comparator : sig ... end
include module type of struct include Comparator end
type comparator_witness = Comparator.comparator_witness
include sig ... end
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, Comparator.comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : + min:t Core__.Maybe_bound.t -> + max:t Core__.Maybe_bound.t -> + t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
diff --git a/stanc/Middle/Utils/index.html b/stanc/Middle/Utils/index.html new file mode 100644 index 000000000..b519da4c5 --- /dev/null +++ b/stanc/Middle/Utils/index.html @@ -0,0 +1,10 @@ + +Utils (stanc.Middle.Utils)

Module Middle.Utils

Utilities, primarily surrounding distribution names and suffixes

val option_or_else : if_none:'a option -> 'a option -> 'a option
val unnormalized_suffices : string list

Name mangling helper functions for distributions

val distribution_suffices : string list
val conditioning_suffices : string list
val cumulative_distribution_suffices : string list
val cumulative_distribution_suffices_w_rng : string Base__List.t
val is_user_ident : string -> bool
val unnormalized_suffix : string -> string
val split_distribution_suffix : string -> (string * string) option
val is_distribution_name : string -> bool
val is_unnormalized_distribution : string -> bool
val replace_unnormalized_suffix : string -> name:string -> string option
val stdlib_distribution_name : string -> string
val normalized_name : string -> string
val all_but_last_n : 'a list -> Core__Int.t -> 'b list
val zip_stuple_trans_exn : + 'a SizedType.t -> + 'b list -> + ('a SizedType.t * 'b) list
val zip_utuple_trans_exn : + UnsizedType.t -> + 'a list -> + (UnsizedType.t * 'a) list
diff --git a/stanc/Middle/index.html b/stanc/Middle/index.html new file mode 100644 index 000000000..4f5c1e4b4 --- /dev/null +++ b/stanc/Middle/index.html @@ -0,0 +1,2 @@ + +Middle (stanc.Middle)

Module Middle

module Expr : sig ... end

MIR types and modules corresponding to the expressions of the language

module Flag_vars : sig ... end
module Fun_kind : sig ... end

Types for function kinds, e.g. StanLib or UserDefined, and function suffix types, e.g. foo_ldfp, bar_lp

module Index : sig ... end

Types of indexing operations

module Internal_fun : sig ... end

Language functions defined internally by the compiler

module Location : sig ... end

Storing locations in the original source

module Location_span : sig ... end

Delimited locations in source code

module Mem_pattern : sig ... end
module Operator : sig ... end

Utilities for Stan's built in operators

module Program : sig ... end

Defines the core of the MIR

module SizedType : sig ... end

Types which have a concrete size associated, e.g. vector[n]

module Stan_math_signatures : sig ... end

This module stores a table of all signatures from the Stan math C++ library which are exposed to Stan, and some helper functions for dealing with those signatures.

module Stmt : sig ... end

MIR types and modules corresponding to the statements of the language

module Transformation : sig ... end
module Type : sig ... end

A type which unifies SizedTypes and UnsizedTypes for declarations

module UnsizedType : sig ... end

Types which have dimensionalities but not sizes, e.g. array[,,]

module Utils : sig ... end

Utilities, primarily surrounding distribution names and suffixes

diff --git a/stanc/Stan_math_backend/Cpp/Decls/index.html b/stanc/Stan_math_backend/Cpp/Decls/index.html new file mode 100644 index 000000000..5333980dd --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/Decls/index.html @@ -0,0 +1,2 @@ + +Decls (stanc.Stan_math_backend.Cpp.Decls)

Module Cpp.Decls

Declarations which get re-used often in the generated model

val current_statement : stmt list
val dummy_var : stmt list
val serializer_in : stmt
val serializer_out : stmt
val lp_accum : type_ -> stmt
diff --git a/stanc/Stan_math_backend/Cpp/Expression_syntax/index.html b/stanc/Stan_math_backend/Cpp/Expression_syntax/index.html new file mode 100644 index 000000000..e8e011a69 --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/Expression_syntax/index.html @@ -0,0 +1,2 @@ + +Expression_syntax (stanc.Stan_math_backend.Cpp.Expression_syntax)

Module Cpp.Expression_syntax

Some operators to make streams and method calls look more like the resultant C++

include module type of struct include Exprs end
val method_call : expr -> identifier -> type_ list -> expr list -> expr

Call a method on object, wrapping it in parentheses if it is not a variable

val to_var : identifier -> expr
val literal_string : string -> expr

Turn an OCaml string into a quoted and escaped C++ string

val std_vector_init_expr : type_ -> expr list -> expr

Equivalent to std::vector<t>{e1,...,en}

val fun_call : identifier -> expr list -> expr
val templated_fun_call : identifier -> type_ list -> expr list -> expr
val quiet_NaN : expr

Helper for std::numeric_limits<double>::quiet_NaN()

val int_min : expr

Helper for std::numeric_limits<int>::min()

val static_cast : type_ -> expr -> expr
val (<<) : expr -> expr list -> expr

A pun for the C++ operator<<

val (.@!()) : expr -> identifier -> expr

Method call: Call a no-argument method

E.g. foo.bar()

val (.@?()) : expr -> (identifier * expr list) -> expr

Method call: Call the named method with args

E.g. foo.bar(A1,...An)

val (.@<>()) : expr -> (identifier * type_ list * expr list) -> expr

Method call: Call the named method with template types and args

E.g. foo.bar<T1,...,Tn>(A1,...An)

val (|::!) : type_ -> identifier -> expr

Static method call: Call the named method with no arguments.

E.g. Foo::bar()

val (|::?) : type_ -> (identifier * expr list) -> expr

Static method call: Call the named method with args

E.g. Foo::bar(A1,...An)

val (|::<>) : type_ -> (identifier * type_ list * expr list) -> expr

Static method call: Call the named method with template types and args

E.g. Foo::bar<T1,...,Tn>(A1,...An)

val (+) : expr -> expr -> expr

Pun for C++ operator+(a,b)

val (-) : expr -> expr -> expr

Pun for C++ operator-(a,b)

val (*) : expr -> expr -> expr

Pun for C++ operator*(a,b)

diff --git a/stanc/Stan_math_backend/Cpp/Exprs/index.html b/stanc/Stan_math_backend/Cpp/Exprs/index.html new file mode 100644 index 000000000..2739a881e --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/Exprs/index.html @@ -0,0 +1,2 @@ + +Exprs (stanc.Stan_math_backend.Cpp.Exprs)

Module Cpp.Exprs

Some helper values and functions

val method_call : expr -> identifier -> type_ list -> expr list -> expr

Call a method on object, wrapping it in parentheses if it is not a variable

val to_var : identifier -> expr
val literal_string : string -> expr

Turn an OCaml string into a quoted and escaped C++ string

val std_vector_init_expr : type_ -> expr list -> expr

Equivalent to std::vector<t>{e1,...,en}

val fun_call : identifier -> expr list -> expr
val templated_fun_call : identifier -> type_ list -> expr list -> expr
val quiet_NaN : expr

Helper for std::numeric_limits<double>::quiet_NaN()

val int_min : expr

Helper for std::numeric_limits<int>::min()

val static_cast : type_ -> expr -> expr
diff --git a/stanc/Stan_math_backend/Cpp/Printing/index.html b/stanc/Stan_math_backend/Cpp/Printing/index.html new file mode 100644 index 000000000..cdf97e008 --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/Printing/index.html @@ -0,0 +1,15 @@ + +Printing (stanc.Stan_math_backend.Cpp.Printing)

Module Cpp.Printing

Pretty-printing of the C++ type

val trailing_space : 'a Fmt.t -> 'a0 Fmt.t
val pp_identifier : Stdlib.Format.formatter -> string -> unit
val pp_type_ : type_ Fmt.t
val pp_requires : + default:bool -> + Stdlib.Format.formatter -> + ([< `Exact of string | `OneOf of string list ] * type_) list -> + unit
val pp_template : + default:bool -> + Stdlib.Format.formatter -> + template_parameter list -> + unit

Pretty print a list of templates as template <parameter-list>.name This function pools together RequireAllCondition nodes into a require_all_t

val pp_operator : Stdlib.Format.formatter -> operator -> unit
val pp_expr : expr Fmt.t
val pp_variable_defn : Stdlib.Format.formatter -> variable_defn -> unit
val pp_stmt : stmt Fmt.t
val pp_with_block : + ?indent:int -> + unit Fmt.t -> + Stdlib.Format.formatter -> + stmt -> + unit

When we know a block is here, we can do better pretty-printing

  • parameter indent:

    How much to indent the enclosing vbox. Usually 2, but set to zero for the else branch of an if-else to prevent over-indenting

val pp_cv : Stdlib.Format.formatter -> cv_qualifiers -> unit
val pp_fun_defn : Stdlib.Format.formatter -> fun_defn -> unit
val pp_destructor : Stdlib.Format.formatter -> (string * stmt list) -> unit
val pp_constructor : Stdlib.Format.formatter -> (string * constructor) -> unit
val pp_directive : Stdlib.Format.formatter -> directive -> unit
val pp_class_defn : Stdlib.Format.formatter -> class_defn -> unit
val pp_struct_defn : Stdlib.Format.formatter -> struct_defn -> unit
val pp_defn : defn Fmt.t
val pp_program : defn list Fmt.t
diff --git a/stanc/Stan_math_backend/Cpp/Stmts/index.html b/stanc/Stan_math_backend/Cpp/Stmts/index.html new file mode 100644 index 000000000..a51ca80e6 --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/Stmts/index.html @@ -0,0 +1,2 @@ + +Stmts (stanc.Stan_math_backend.Cpp.Stmts)

Module Cpp.Stmts

Helpers for common statement constructs

val block : stmt list -> stmt

Wrap the list of statements in a block if it isn't a singleton block already

val unblock : stmt list -> stmt list
val rethrow_located : stmt list -> stmt list

Set up the try/catch logic for throwing an exception with its location set to the Stan program location.

val fori : identifier -> expr -> expr -> stmt -> stmt
val if_block : expr -> stmt list -> stmt
val unused : identifier -> stmt list

Suppress warnings for a variable which may not be used.

diff --git a/stanc/Stan_math_backend/Cpp/Tests/index.html b/stanc/Stan_math_backend/Cpp/Tests/index.html new file mode 100644 index 000000000..fb78b373e --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/Tests/index.html @@ -0,0 +1,2 @@ + +Tests (stanc.Stan_math_backend.Cpp.Tests)

Module Cpp.Tests

diff --git a/stanc/Stan_math_backend/Cpp/Types/index.html b/stanc/Stan_math_backend/Cpp/Types/index.html new file mode 100644 index 000000000..516d982d4 --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/Types/index.html @@ -0,0 +1,2 @@ + +Types (stanc.Stan_math_backend.Cpp.Types)

Module Cpp.Types

Helpers for constructing types

val local_scalar : type_
val std_vector : ?dims:Core__Int.t -> type_ -> type_

A std::vector<t>

val bool : type_
val complex : type_ -> type_
val vector : ?mem_pattern:Middle.Mem_pattern.t -> type_ -> type_

An Eigen::Matrix<s, -1, 1>

val row_vector : ?mem_pattern:Middle.Mem_pattern.t -> type_ -> type_

An Eigen::Matrix<s, 1, -1>

val matrix : ?mem_pattern:Middle.Mem_pattern.t -> type_ -> type_

An Eigen::Matrix<s, -1, -1>

val string : type_

A std::string

val size_t : type_
val const_ref : type_ -> type_
val const_char_array : int -> type_
val eigen_map : type_ -> type_
diff --git a/stanc/Stan_math_backend/Cpp/index.html b/stanc/Stan_math_backend/Cpp/index.html new file mode 100644 index 000000000..ef4440a13 --- /dev/null +++ b/stanc/Stan_math_backend/Cpp/index.html @@ -0,0 +1,37 @@ + +Cpp (stanc.Stan_math_backend.Cpp)

Module Stan_math_backend.Cpp

A set of data types representing the C++ we generate

type identifier = string
val identifier_of_sexp : Sexplib0.Sexp.t -> identifier
val sexp_of_identifier : identifier -> Sexplib0.Sexp.t
type type_ =
  1. | Auto
  2. | Void
  3. | Int
  4. | Double
  5. | Complex of type_
  6. | TemplateType of identifier
  7. | StdVector of type_
    (*

    A std::vector. For Eigen Vectors, use Matrix with a row or column size of 1

    *)
  8. | Array of type_ * int
  9. | Tuple of type_ list
  10. | TypeLiteral of identifier
    (*

    Used for things like Eigen::Index

    *)
  11. | Matrix of type_ * int * int * Middle.Mem_pattern.t
  12. | Ref of type_
  13. | Const of type_
  14. | Pointer of type_
  15. | TypeTrait of identifier * type_ list
    (*

    e.g. stan::promote_scalar, stan:base_type

    *)

C++ types

val type__of_sexp : Sexplib0.Sexp.t -> type_
val sexp_of_type_ : type_ -> Sexplib0.Sexp.t
module Types : sig ... end

Helpers for constructing types

type operator =
  1. | Multiply
  2. | Divide
  3. | Add
  4. | Subtract
  5. | Eq
  6. | LEq
  7. | GEq
  8. | Lthn
  9. | Gthn
  10. | And
  11. | Or
val operator_of_sexp : Sexplib0.Sexp.t -> operator
val sexp_of_operator : operator -> Sexplib0.Sexp.t
type expr =
  1. | Literal of string
    (*

    printed as-is

    *)
  2. | Var of identifier
  3. | VarRef of identifier
  4. | Parens of expr
  5. | FunCall of identifier * type_ list * expr list
  6. | MethodCall of expr * identifier * type_ list * expr list
  7. | StaticMethodCall of type_ * identifier * type_ list * expr list
  8. | Constructor of type_ * expr list
    (*

    printed as type(expr1, expr2, ...)

    *)
  9. | InitializerExpr of type_ * expr list
    (*

    printed as type{expr1, expr2, ...}

    *)
  10. | ArrayLiteral of expr list
  11. | TernaryIf of expr * expr * expr
  12. | Cast of type_ * expr
  13. | Index of expr * expr
  14. | Deref of expr
  15. | AllocNew of type_ * expr list
  16. | OperatorNew of identifier * type_ * expr list
    (*

    See operator new for distinctions between allocating and placing news

    *)
  17. | Assign of expr * expr
    (*

    NB: Not all exprs are valid lvalues!

    *)
  18. | StreamInsertion of expr * expr list
    (*

    Corresponds to operator<<

    *)
  19. | BinOp of expr * operator * expr
  20. | PMinus of expr
  21. | Increment of expr
val expr_of_sexp : Sexplib0.Sexp.t -> expr
val sexp_of_expr : expr -> Sexplib0.Sexp.t
module Exprs : sig ... end

Some helper values and functions

module Expression_syntax : sig ... end

Some operators to make streams and method calls look more like the resultant C++

type init =
  1. | Assignment of expr
  2. | Construction of expr list
  3. | InitializerList of expr list
  4. | Uninitialized
val init_of_sexp : Sexplib0.Sexp.t -> init
val sexp_of_init : init -> Sexplib0.Sexp.t
type variable_defn = {
  1. static : bool;
  2. constexpr : bool;
  3. type_ : type_;
  4. name : identifier;
  5. init : init;
}
val make_variable_defn : + ?static:bool -> + ?constexpr:bool -> + type_:type_ -> + name:identifier -> + ?init:init -> + unit -> + variable_defn
val variable_defn_of_sexp : Sexplib0.Sexp.t -> variable_defn
val sexp_of_variable_defn : variable_defn -> Sexplib0.Sexp.t
type stmt =
  1. | Expression of expr
  2. | VariableDefn of variable_defn
  3. | For of variable_defn * expr * expr * stmt
  4. | ForEach of type_ * identifier * expr * stmt
  5. | While of expr * stmt
  6. | IfElse of expr * stmt * stmt option
  7. | TryCatch of stmt list * type_ * identifier * stmt list
  8. | Block of stmt list
  9. | Return of expr option
  10. | Throw of expr
  11. | Break
  12. | Continue
  13. | Using of string * type_ option
  14. | Comment of string
val stmt_of_sexp : Sexplib0.Sexp.t -> stmt
val sexp_of_stmt : stmt -> Sexplib0.Sexp.t
module Stmts : sig ... end

Helpers for common statement constructs

module Decls : sig ... end

Declarations which get re-used often in the generated model

type template_parameter =
  1. | Typename of string
    (*

    The name of a template typename

    *)
  2. | RequireAllCondition of [ `Exact of string | `OneOf of string list ] * type_
    (*

    A C++ type trait (e.g. is_arithmetic) and the template name which needs to satisfy that. These are collated into one require_all_t<>

    *)
  3. | Require of string * string list
  4. | Bool of string
    (*

    A named boolean template type

    *)
val template_parameter_of_sexp : Sexplib0.Sexp.t -> template_parameter
val sexp_of_template_parameter : template_parameter -> Sexplib0.Sexp.t
type cv_qualifiers =
  1. | Const
  2. | Final
  3. | NoExcept
val cv_qualifiers_of_sexp : Sexplib0.Sexp.t -> cv_qualifiers
val sexp_of_cv_qualifiers : cv_qualifiers -> Sexplib0.Sexp.t
type fun_defn = {
  1. templates_init : template_parameter list list * bool;
    (*

    Double list since some functions (mainly reduce_sum functors) need two sets of templates

    *)
  2. inline : bool;
  3. return_type : type_;
  4. name : identifier;
  5. args : (type_ * string) list;
  6. cv_qualifiers : cv_qualifiers list;
  7. body : stmt list option;
}
val make_fun_defn : + ?templates_init:(template_parameter list list * bool) -> + ?inline:bool -> + return_type:type_ -> + name:identifier -> + ?args:(type_ * string) list -> + ?cv_qualifiers:cv_qualifiers list -> + ?body:stmt list -> + unit -> + fun_defn
val fun_defn_of_sexp : Sexplib0.Sexp.t -> fun_defn
val sexp_of_fun_defn : fun_defn -> Sexplib0.Sexp.t
val split_fun_decl_defn : fun_defn -> fun_defn * fun_defn
type constructor = {
  1. args : (type_ * string) list;
  2. init_list : (identifier * expr list) list;
  3. body : stmt list;
}
val make_constructor : + ?args:(type_ * string) list -> + ?init_list:(identifier * expr list) list -> + ?body:stmt list -> + unit -> + constructor
val constructor_of_sexp : Sexplib0.Sexp.t -> constructor
val sexp_of_constructor : constructor -> Sexplib0.Sexp.t
type directive =
  1. | Include of string
  2. | IfNDef of string * defn list
  3. | MacroApply of string * string list

Incomplete list of C++ preprocessor directives

and class_defn = {
  1. class_name : identifier;
  2. final : bool;
  3. public_base : type_;
  4. private_members : defn list;
  5. public_members : defn list;
  6. constructor : constructor;
  7. destructor_body : stmt list;
}

The Stan model class always has a non-default constructor and destructor

and struct_defn = {
  1. param : template_parameter option;
  2. struct_name : identifier;
  3. body : defn list;
}
and defn =
  1. | FunDef of fun_defn
  2. | Class of class_defn
  3. | Struct of struct_defn
  4. | GlobalVariableDefn of variable_defn
  5. | GlobalComment of string
  6. | GlobalUsing of string * type_ option
  7. | Namespace of identifier * defn list
  8. | Preprocessor of directive
val directive_of_sexp : Sexplib0.Sexp.t -> directive
val class_defn_of_sexp : Sexplib0.Sexp.t -> class_defn
val struct_defn_of_sexp : Sexplib0.Sexp.t -> struct_defn
val defn_of_sexp : Sexplib0.Sexp.t -> defn
val sexp_of_directive : directive -> Sexplib0.Sexp.t
val sexp_of_class_defn : class_defn -> Sexplib0.Sexp.t
val sexp_of_struct_defn : struct_defn -> Sexplib0.Sexp.t
val sexp_of_defn : defn -> Sexplib0.Sexp.t
val make_class_defn : + name:identifier -> + public_base:type_ -> + ?final:bool -> + private_members:defn list -> + public_members:defn list -> + constructor:constructor -> + ?destructor_body:stmt list -> + unit -> + class_defn
val make_struct_defn : + param:template_parameter option -> + name:identifier -> + body:defn list -> + unit -> + struct_defn
type program = defn list

Much like in C++, we define a translation unit as a list of definitions

val program_of_sexp : Sexplib0.Sexp.t -> program
val sexp_of_program : program -> Sexplib0.Sexp.t
module Printing : sig ... end

Pretty-printing of the C++ type

module Tests : sig ... end
diff --git a/stanc/Stan_math_backend/Cpp_Json/index.html b/stanc/Stan_math_backend/Cpp_Json/index.html new file mode 100644 index 000000000..9f3a55775 --- /dev/null +++ b/stanc/Stan_math_backend/Cpp_Json/index.html @@ -0,0 +1,5 @@ + +Cpp_Json (stanc.Stan_math_backend.Cpp_Json)

Module Stan_math_backend.Cpp_Json

val out_var_interpolated_json_str : + (string * Middle.Expr.Typed.t Middle.SizedType.t * Middle.Program.io_block) + list -> + string
diff --git a/stanc/Stan_math_backend/Cpp_str/index.html b/stanc/Stan_math_backend/Cpp_str/index.html new file mode 100644 index 000000000..c9cd47de4 --- /dev/null +++ b/stanc/Stan_math_backend/Cpp_str/index.html @@ -0,0 +1,2 @@ + +Cpp_str (stanc.Stan_math_backend.Cpp_str)

Module Stan_math_backend.Cpp_str

Utilities for converting OCaml strings into C++ strings

val escaped : string -> string

A version of stdlib Bytes.escaped but uses octal output, rather than default decimal, for escapes like \123. This allows cpp to read them as literals

diff --git a/stanc/Stan_math_backend/Lower_expr/Testing/index.html b/stanc/Stan_math_backend/Lower_expr/Testing/index.html new file mode 100644 index 000000000..3a4afdc54 --- /dev/null +++ b/stanc/Stan_math_backend/Lower_expr/Testing/index.html @@ -0,0 +1,6 @@ + +Testing (stanc.Stan_math_backend.Lower_expr.Testing)

Module Lower_expr.Testing

diff --git a/stanc/Stan_math_backend/Lower_expr/index.html b/stanc/Stan_math_backend/Lower_expr/index.html new file mode 100644 index 000000000..4003ce2a9 --- /dev/null +++ b/stanc/Stan_math_backend/Lower_expr/index.html @@ -0,0 +1,83 @@ + +Lower_expr (stanc.Stan_math_backend.Lower_expr)

Module Stan_math_backend.Lower_expr

Lowering of Stan expressions to C++

val stan_namespace_qualify : string -> string
val fn_renames : string Core.String.Map.t
val constraint_to_string : 'a Middle.Transformation.t -> string option
val functor_suffix : string
val reduce_sum_functor_suffix : string
val variadic_functor_suffix : int -> string
type variadic =
  1. | FixedArgs
  2. | ReduceSum
  3. | VariadicHOF of int
val compare_variadic : variadic -> variadic -> int
val hash_fold_variadic : + Ppx_hash_lib.Std.Hash.state -> + variadic -> + Ppx_hash_lib.Std.Hash.state
val hash_variadic : variadic -> Ppx_hash_lib.Std.Hash.hash_value
val functor_type : string Core.Hashtbl.key -> variadic
val functor_suffix_select : variadic -> string
val is_scalar : Middle.Expr.Typed.t -> bool
val is_matrix : Middle.Expr.Typed.t -> bool

Used to determine if operator/ should be mdivide_right() or divide()

val is_row_vector : Middle.Expr.Typed.t -> bool
val first : 'a list -> 'b
val second : 'a list -> 'b
val default_multiplier : int
val default_offset : int
val transform_args : + Middle__Expr.Typed.Meta.t Middle__Expr.Fixed.t Middle.Transformation.t -> + Middle__Expr.Typed.Meta.t Middle__Expr.Fixed.t Base__List.t
val is_single_index : 'a Middle.Index.t -> bool
val dont_need_range_check : 'a Middle.Expr.Fixed.t Middle.Index.t -> bool
val promote_adtype : + Middle.Expr.Typed.t list -> + Middle.UnsizedType.autodifftype
val suffix_args : 'a Middle.Fun_kind.suffix -> string list
val stantype_prim : Middle.UnsizedType.t -> Cpp.type_
val templates : bool -> bool Middle.Fun_kind.suffix -> Cpp.type_ list
val deserializer : Cpp.expr
val minus_one : Stan_math_backend__Cpp.expr -> Cpp.expr
val plus_one : Stan_math_backend__Cpp.expr -> Cpp.expr
val lower_type : + ?mem_pattern:Middle.Mem_pattern.t -> + Middle.UnsizedType.t -> + Cpp.type_ -> + Cpp.type_
val lower_unsizedtype_local : + ?mem_pattern:Middle.Mem_pattern.t -> + Middle.UnsizedType.autodifftype -> + Middle.UnsizedType.t -> + Cpp.type_
val lower_logical_op : + Cpp.operator -> + Middle.Expr.Typed.t -> + Middle.Expr.Typed.t -> + Cpp.expr
val lower_binary_fun : + string -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr
val vector_literal : + ?column:bool -> + Cpp.type_ -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr
val lower_binary_op : + Cpp.operator -> + string -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr
val lower_operator_app : + Middle.Operator.t -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr
val lower_misc_special_math_app : + Core.String.Map.Key.t -> + Middle.Mem_pattern.t -> + Middle.UnsizedType.returntype option -> + (Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr) + option
val lower_functionals : + string Core.Hashtbl.key Core.Hashtbl.key -> + bool Middle.Fun_kind.suffix -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Middle.Mem_pattern.t -> + (Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr) + option
val lower_fun_app : + bool Middle.Fun_kind.suffix -> + Core.String.Map.Key.t -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Middle.Mem_pattern.t -> + Middle.UnsizedType.returntype option -> + Cpp.expr
val lower_user_defined_fun : + string -> + bool Middle.Fun_kind.suffix -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr
val lower_indexed : + Middle.Expr.Typed.t -> + Middle.Expr.Typed.t Middle.Index.t list -> + string -> + Cpp.expr
val lower_indexed_simple : + Cpp.expr -> + Middle.Expr.Typed.t Middle.Index.t Core__.Import.list -> + Cpp.expr
val lower_expr : ?promote_reals:bool -> Middle.Expr.Typed.t -> Cpp.expr
val lower_exprs : + ?promote_reals:bool -> + Middle.Expr.Typed.Meta.t Middle.Expr.Fixed.t Base__List.t -> + Cpp.expr Base__List.t
module Testing : sig ... end
diff --git a/stanc/Stan_math_backend/Lower_functions/index.html b/stanc/Stan_math_backend/Lower_functions/index.html new file mode 100644 index 000000000..827208b61 --- /dev/null +++ b/stanc/Stan_math_backend/Lower_functions/index.html @@ -0,0 +1,5 @@ + +Lower_functions (stanc.Stan_math_backend.Lower_functions)

Module Stan_math_backend.Lower_functions

Responsible for turning the Stan function's block into forward decls, functions, and functors in C++

val collect_functors_functions : Middle.Program.Numbered.t -> Cpp.defn list
val lower_standalone_fun_def : + string -> + 'a Middle.Program.fun_def -> + Cpp.defn list
diff --git a/stanc/Stan_math_backend/Lower_program/index.html b/stanc/Stan_math_backend/Lower_program/index.html new file mode 100644 index 000000000..96c9d0ba9 --- /dev/null +++ b/stanc/Stan_math_backend/Lower_program/index.html @@ -0,0 +1,5 @@ + +Lower_program (stanc.Stan_math_backend.Lower_program)

Module Stan_math_backend.Lower_program

Stan-program-specific C++ generation

val standalone_functions : bool Stdlib.ref
val stanc_args_to_print : string Stdlib.ref
val lower_program : + ?printed_filename:string -> + Middle.Program.Typed.t -> + Cpp.program
diff --git a/stanc/Stan_math_backend/Lower_stmt/Testing/index.html b/stanc/Stan_math_backend/Lower_stmt/Testing/index.html new file mode 100644 index 000000000..3a1603757 --- /dev/null +++ b/stanc/Stan_math_backend/Lower_stmt/Testing/index.html @@ -0,0 +1,2 @@ + +Testing (stanc.Stan_math_backend.Lower_stmt.Testing)

Module Lower_stmt.Testing

diff --git a/stanc/Stan_math_backend/Lower_stmt/index.html b/stanc/Stan_math_backend/Lower_stmt/index.html new file mode 100644 index 000000000..2ce335dd1 --- /dev/null +++ b/stanc/Stan_math_backend/Lower_stmt/index.html @@ -0,0 +1,48 @@ + +Lower_stmt (stanc.Stan_math_backend.Lower_stmt)

Module Stan_math_backend.Lower_stmt

Lowering of Stan statements to C++

val check_to_string : 'a Middle.Transformation.t -> string option
val math_fn_translations : 'a Middle.Internal_fun.t -> string option
val trans_math_fn : 'a Middle.Internal_fun.t -> string
val lower_assign_sized : + Middle.Expr.Typed.t Middle.SizedType.t -> + Middle.UnsizedType.autodifftype -> + bool -> + Cpp.expr option
val lower_possibly_opencl_decl : + string -> + 'a Middle.SizedType.t -> + Middle.UnsizedType.autodifftype -> + Cpp.type_
val lower_profile : + Cpp.identifier -> + Cpp.stmt list -> + Stan_math_backend__Cpp.stmt
val lower_bool_expr : Middle.Expr.Typed.t -> Cpp.expr
val expr_overlaps_lhs_ref : + 'a Middle.Expr.Fixed.t Middle.Stmt.Fixed.Pattern.lvalue -> + 'a0 Middle.Expr.Fixed.t -> + bool
val throw_exn : + string -> + Middle.Expr.Typed.t list -> + Stan_math_backend__Cpp.stmt
val lower_statements : + (Middle.Expr.Typed.Meta.t, Middle.Stmt.Numbered.Meta.t) Middle.Stmt.Fixed.t + list -> + Cpp.stmt Base__List.t
module Testing : sig ... end
diff --git a/stanc/Stan_math_backend/Mangle/index.html b/stanc/Stan_math_backend/Mangle/index.html new file mode 100644 index 000000000..ac06cfc2a --- /dev/null +++ b/stanc/Stan_math_backend/Mangle/index.html @@ -0,0 +1,2 @@ + +Mangle (stanc.Stan_math_backend.Mangle)

Module Stan_math_backend.Mangle

Mangle variables which are C++ reserved words into valid C++ identifiers.

This is done in Transform_Mir. When one of these names is emitted as a string, we use remove_prefix such that this mangling is opaque to the user - e.g., a cmdstan output file would still have a column called "public", even if internally we called this "_stan_public"

NB: the use of a leading _ is essential, because the lexer won't allow this in a user-created variable.

val remove_prefix : string -> string

Used in code generation so that this mangling is opaque to the interfaces (e.g. cmdstan)

val add_prefix_to_kwrds : string -> string
diff --git a/stanc/Stan_math_backend/Numbering/index.html b/stanc/Stan_math_backend/Numbering/index.html new file mode 100644 index 000000000..efa1d9be6 --- /dev/null +++ b/stanc/Stan_math_backend/Numbering/index.html @@ -0,0 +1,7 @@ + +Numbering (stanc.Stan_math_backend.Numbering)

Module Stan_math_backend.Numbering

This module translates the locations of statements into an array of messages used in the C++ for providing locations in the Stan code when an error occurs, and replaces the locations in the MIR tree with indices into said array.

It also numbers calls to map_rect for registration.

type state_t
type map_rect_registration_t
val no_span_num : Middle.Stmt.Numbered.Meta.t
val gen_globals : ?printed_filename:string -> state_t -> Cpp.defn list
val assign_loc : Middle.Stmt.Numbered.Meta.t -> Cpp.stmt list
val register_map_rect_functors : + string -> + map_rect_registration_t -> + Cpp.defn list

Register functiors used for map_rect.

diff --git a/stanc/Stan_math_backend/Transform_Mir/index.html b/stanc/Stan_math_backend/Transform_Mir/index.html new file mode 100644 index 000000000..a03edb20b --- /dev/null +++ b/stanc/Stan_math_backend/Transform_Mir/index.html @@ -0,0 +1,2 @@ + +Transform_Mir (stanc.Stan_math_backend.Transform_Mir)

Module Stan_math_backend.Transform_Mir

Perform backend-specific transformations of the MIR such as mangling or renaming of functions which differ in the library implementation

val is_opencl_var : string -> bool
val use_opencl : bool Stdlib.ref
diff --git a/stanc/Stan_math_backend/index.html b/stanc/Stan_math_backend/index.html new file mode 100644 index 000000000..5ad4ac7c7 --- /dev/null +++ b/stanc/Stan_math_backend/index.html @@ -0,0 +1,2 @@ + +Stan_math_backend (stanc.Stan_math_backend)

Module Stan_math_backend

module Cpp : sig ... end

A set of data types representing the C++ we generate

module Cpp_Json : sig ... end
module Cpp_str : sig ... end

Utilities for converting OCaml strings into C++ strings

module Lower_expr : sig ... end

Lowering of Stan expressions to C++

module Lower_functions : sig ... end

Responsible for turning the Stan function's block into forward decls, functions, and functors in C++

module Lower_program : sig ... end

Stan-program-specific C++ generation

module Lower_stmt : sig ... end

Lowering of Stan statements to C++

module Mangle : sig ... end

Mangle variables which are C++ reserved words into valid C++ identifiers.

module Numbering : sig ... end

This module translates the locations of statements into an array of messages used in the C++ for providing locations in the Stan code when an error occurs, and replaces the locations in the MIR tree with indices into said array.

module Transform_Mir : sig ... end

Perform backend-specific transformations of the MIR such as mangling or renaming of functions which differ in the library implementation

diff --git a/stanc/core_ideas.html b/stanc/core_ideas.html new file mode 100644 index 000000000..8ae3fb8a0 --- /dev/null +++ b/stanc/core_ideas.html @@ -0,0 +1,3 @@ + +core_ideas (stanc.core_ideas)

Core Ideas

This is not meant to be tutorial on the OCaml language itself, but rather on some of the features and libraries of Stanc3 which may not be familiar to developers who do have some OCaml exposure.

The Jane Street standard library

We use Jane Street's Core standard library. There are a few differences from the OCaml standard library which are instantly noticeable:

  • Most higher-order functions such as List.map take a named function argument.

    This means a call like List.map square [1;2;3] will look like List.map ~f:square [1;2;3].

  • Core defaults to safe operations which return options rather than possibly erring.

    In "normal" OCaml, List.hd has type 'a list -> 'a. A call List.hd [] will throw an exception. By contrast, in the Jane Street libraries, the same function has type 'a list -> 'a option.

    Usually, a function with the suffix _exn recovers the original signature, e.g. List.hd_exn : 'a list -> 'a .

If for some reason you need functionality from the OCaml standard library that is not available in Jane Street (be sure to triple check), you can use the modules Stdlib and Caml to access the built-in versions. Currently there is only one such usage in the compiler, to use the standard definition of != in the Menhir parser.

There are a few other things we gain from these libraries. The most important idea to understand is deriving.

Deriving functions

If you look at a type declaration of something like Ast.typed_expression, you'll notice something curious after the declaration:

type typed_expression = (typed_expr_meta, fun_kind) expr_with
+[@@deriving sexp, compare, map, hash, fold]

When using an editor that supports code completion, you may notice that the Ast module suggests functions which are not defined in the actual source text. This is because these functions are created at compile time by ppx_deriving.The above syntax [@@deriving ...] indicates which functions we would like to be generated.

These are very helpful - if a type derives hash, it can automatically be used as keys in Jane Street's hash tables, and a type which derives sexp can be serialized to Lisp-style S-Expressions. Most of our major types derive at least one function.

"Two Level Types"

The other curious thing about the types we define in our AST and MIR is that they use a trick known as "two level types". This allows re-using the same type structure with different amounts of metadata attached (e.g., before type checking we have an untyped_program which only has nodes and their source locations, after type checking we have typed_program which features nodes, locations, and types, in the same basic tree structure.

The way that this is implemented is a bit non-obvious at first. Essentially, many of the tree variant types are parameterized by something that ends up being a placeholder not for just metadata but for the recursive type including metadata, sometimes called the fixed point. So instead of recursively referencing expression, you would instead reference type parameter 'e, which will later be filled in with something like type expr_with_meta = metadata expression.

This takes some getting used to, and also can lead to some unhelpful type signatures in editors such as VSCode, because abbreviations are not always used in hover-over text. For example, Expr.Typed.t, the MIR's typed expression type, actually has a signature of Expr.Typed.Meta.t Expr.Fixed.t.

The Fmt library and pretty-printing

We extensively use the Fmt library for our pretty-printing and code generation. We have an existing guide on the wiki which covers the core ideas.

diff --git a/stanc/cpp_ir.html b/stanc/cpp_ir.html new file mode 100644 index 000000000..a531e8079 --- /dev/null +++ b/stanc/cpp_ir.html @@ -0,0 +1,6 @@ + +cpp_ir (stanc.cpp_ir)

C++ Code Generation

The main backend of the compiler is the "Stan Math" (C++) backend. We represent C++ code with a data types and functions found in Stan_math_backend.Cpp.

We also define a sort of miniature embedded domain specific language (DSL) for using these types. These helper functions and operators are all in sub-modules of Stan_math_backend.Cpp, for example Stan_math_backend.Cpp.Expression_syntax.

These allow writing OCaml code which looks or feels more like the C++ it will generate. These constructs should be used when they improve clarity, and avoided when they make the code harder to read. When combined with good variable names, this can lead to code like lp_accum__.@?(("add", [Var "lp__"])) , which hopefully reads quite clearly as equivalent to the C++ lp_accum__.add(lp__).

After a Stan program is lowered to this type, it can be printed to C++ using Stan_math_backend.Cpp.Printing. This module uses Fmt, but keeps the question of how C++ should be formatted separate from the question of what the generated C++ is.

DSL Example

For example, lets say one wanted to generate the expression

(Eigen::Matrix<double,1,-1>(3) << 1, a, 3).finished()

This could be written down as the literal OCaml type it is:

(MethodCall (Parens (StreamInsertion (Constructor (Matrix (Double, 1, -1), [Literal "3"]), [Literal "1"; Var "a"; Literal "3"]), "finished", [], [])

Or, using the DSL constructs, the same expression could be written

let open Expression_syntax in
+let open Types in
+let vector = Constructor (row_vector Double, [Literal "3"]) in
+let values = [Literal "1"; Var "a"; Literal "3"] in
+(vector << values).@!("finished")
diff --git a/stanc/dependencies.html b/stanc/dependencies.html new file mode 100644 index 000000000..dd8be510f --- /dev/null +++ b/stanc/dependencies.html @@ -0,0 +1,2 @@ + +dependencies (stanc.dependencies)

Dependencies

Stanc3 is programmed in OCaml and built with dune.

Build Dependencies

We rely on the following packages. Note that because of the requirements for Cross Compilation for Windows, these versions are exactly pinned.

These are automatically installed through the scripts/install_ocaml.sh and scripts/install_build_deps.sh scripts provided in the stanc3 repository.

  • OCaml 4.14.1
  • Dune 2.8+
  • Core v0.16.1 (a standard library replacement)
  • Menhir 20230608 (a parser generator and parsing library)
  • ppx_deriving 5.2.1 (a tool for generating boilerplate code)
  • fmt 0.9.0 (a library for pretty-printing of formatted text)
  • yojson 2.1.0 (a library for producing JSON files)

For the JavaScript interface to stanc3 we also use the following, installed via scripts/install_js_deps.sh

  • js_of_ocaml 5.4.0

The stancjs executable can be built with

dune build src/stancjs

Development Dependencies

There are several packages which are useful for development but not required for building stanc3. These can be installed with scripts/install_dev_deps.sh, or (alongside the above build requirements) with scripts/setup_dev_env.sh. Versioning of these dependencies is less strict, though some (like ocamlformat) are used to ensure a standard format across developers and must use the same version.

  • ocamlformat 0.26.1
  • merlin
  • ocaml-lsp-server
  • utop
  • ocp-indent
  • patdiff
  • odoc
  • bisect_ppx

Cross Compilation for Windows

To support Windows binaries, we use versions of OCaml and all our dependencies which are available on opam-cross-windows. This allows us to build Windows-compatible versions on non-Windows machines.

For more information on cross-compilation, see the dune docs.

To build Windows binaries, the above build requirements must have their opam-cross-windows equivalents installed. This can be done by executing scripts/install_build_deps_windows.sh.

Then, the command

dune build -x windows

will build a Windows binary.

diff --git a/stanc/exposing_new_functions.html b/stanc/exposing_new_functions.html new file mode 100644 index 000000000..74ea6aa4e --- /dev/null +++ b/stanc/exposing_new_functions.html @@ -0,0 +1,8 @@ + +exposing_new_functions (stanc.exposing_new_functions)

Exposing New Functions to stanc3

Background

For a function to be built into Stan, it has to be included in the Stan Math library and its signature has to be exposed to the compiler.

To do the latter, we have to add a corresponding line in src/middle/Stan_math_signatures.ml. The compiler uses the signatures defined there to do type checking.

Adding a distribution function

To add a distribution, we have to find the line containing let distributions =. The existing distributions can be used for reference. The first argument defines the kind of function we want to add. The second argument is the base function name without the _... suffixes. The third argument specifies the argument types of the function. The last argument describes the memory pattern supported by this function, either an Array of Structs (AoS) or a Struct of Arrays (SoA). The following line exposes a function foo_lpdf which takes in a (non-vectorizable) real number and a (non-vectorizable) integer :

; ([Lpdf], "foo", [DReal; DInt], SoA)

To see the exact signatures created, we can recompile stanc using make all and display the signatures using stanc --dump-stan-math-signatures. By filtering for foo (for example by using grep), we get the following output:

$ stanc --dump-stan-math-signatures | grep foo
+foo_lpdf(real, int) => real

If we want to allow the first parameter to be vectorizable, we can change the signature to

; ([Lpdf], "foo", [DVReal; DReal], SoA)

This produces the following signatures:

$ stanc --dump-stan-math-signatures | grep foo
+foo_lpdf(real, int) => real
+foo_lpdf(vector, int) => real
+foo_lpdf(row_vector, int) => real
+foo_lpdf(array[] real, int) => real

As we can see, allowing a parameter to be vectorized automatically produces signatures where the parameter is either base type, vector, row_vector or array[].

Available parameter types

The following parameter types are available:

  • DInt: Scalar integer -> int
  • DReal: Scalar real number -> real
  • DVector: Vector -> vector
  • DMatrix: Matrix -> matrix
  • DIntArray: Integer array -> array[] int
  • DVInt: Vectorizable integer -> int; array[] int
  • DVReal: Vectorizable real number -> real; vector; row_vector; array[] real
  • DVectors: Vectorizable vectors (for multivariate functions) -> vector, row_vector, array[] vector, array[] row_vector
  • (DDeepVectorized: all base types with up to 8 levels of nested containers)

Available types of distribution functions

As we have seen above, specifying our function as [Lpdf] added the suffix _lpdf to our base function name. There are several types available which specify the suffixes that will be added:

  • Lpmf: _lpmf
  • Lpdf: _lpdf
  • Rng: _rng
  • Cdf: _cdf, _lcdf
  • Ccdf: _lccdf

Additionally, full_lpdf combines all suffixes of Lpdf, Rng, Ccdf and Cdf. full_lpmf does the same, but using the suffixes of Lpmf instead of Lpdf. Note that these two have to be used without brackets. This means we would write

; ([Cdf], "foo", [DReal; DInt], SoA)

but

; (full_lpdf, "foo", [DReal; DInt], SoA)

which corresponds to

; ([Lpdf; Rng; Ccdf; Cdf], "foo", [DReal; DInt], SoA)

Adding a normal function

Standard functions (e.g., not distributions or variadic functions) are added to a list in the same file. This list begins near the bottom of the file with the line

(* -- Start populating stan_math_signaturess -- *)
+let () =

The statements in this list use several helper functions, such as add_unqualified, add_qualified, add_binary, etc.

The core function of these is add_qualified, which registers a function based on:

  1. The name of the function
  2. The return type (an UnsizedType.returntype)
  3. A list of argument types (A list of UnsizedType.autodifftype * UnsizedType.t tuples)
  4. The memory pattern supported by this function, Array of Structs (AoS) or Struct of Arrays (SoA)

All other functions are simply helpers for calling this one. For example, if a function does not have any arguments it requires to be of type data, then add_unqualified is provided for convience. It does the same thing as add_qualfied, but the third argument is just a list of UnsizedType.ts. Other helpers, such as add_binary, exist for common cases such as a function with a signature (real, real) => real

If a function has multiple signatures, it will generally need multiple calls to these functions. Some helpers, such as add_binary_vec add multiple signatures at once for vectorized functions.

For example, the following line defines the signature add(real, matrix) => matrix

add_unqualified ("add", ReturnType UMatrix, [UReal; UMatrix], SoA) ;

Higher-Order Variadic functions

Functions such as the ODE integrators or reduce_sum, which take in user-functions and a variable-length list of arguments, are NOT added to this list.

"Nice" variadic functions are added to the hashtable Stan_math_signatures.stan_math_variadic_signatures. This is probably sufficient for most variadic functions, e.g. all the ODE solvers and DAE solvers are done via this method. reduce_sum is not "nice", since it is both variadic and polymorphic, requiring certain arguments to have the same (but not predetermined) type. Therefore, reduce_sum is treated as special case in the Typechecker module in the frontend folder.

Note that higher-order functions also usually require changes to the C++ code generation to work properly. It is best to consult an existing example of how these are done before proceeding.

Testing

Functions exposed from the Stan Math Library are tested for all declared signatures. These tests live in the folder test/integration/good/function-signatures. They consist of a basic Stan program (or multiple programs for functions with a large number of overloads) which call the new function on each possible combination of arguments.

These tests confirm both that the typechecker accepts these signatures and that the C++ generated for them compiles against the Math Library implementations.

Documentation

Finally, before a function can be exposed in the Stan compiler it needs to be added to the Stan Functions Reference, which is stored at stan-dev/docs. New PRs to stanc3 will prompt you to link to the accompanying documentation PR.

diff --git a/stanc/getting_started.html b/stanc/getting_started.html new file mode 100644 index 000000000..79960520c --- /dev/null +++ b/stanc/getting_started.html @@ -0,0 +1,25 @@ + +getting_started (stanc.getting_started)

Getting development on stanc3 up and running locally

Setup

Using Opam and Dune

The recommended way to develop stanc3 is using opam and dune on a Unix-like system (MacOS or Linux). See Windows development for tips on developing on Windows.

This requires you have make, git, curl, and m4 installed via apt, homebrew, or your system's package manager.

  1. Download the repository (or your fork of it) from Github
  2. Install the necessary dependencies by running

    cd scripts; bash -x ./setup_dev_env.sh.

    If you already have opam installed, you can instead run

    opam update; opam install --deps-only --with-test .

    If you wish to install stanc on your system, you can run the above opam command without --deps-only.

  3. You can now build a stanc binary by running make. If this succeeds, you have the required software.

Windows development

We recommend using Windows Subsystem for Linux (WSL) for development on Windows. While this will not produce native-Windows binaries by default (though they can be cross-compiled), it is far easier to use and set up than the other options for Windows development.

Once you have installed and configured WSL, you can proceed through the steps above through the WSL shell.

Alternative: Using Nix

Nix is a declarative package manager with a focus on reproducible builds. We provide the ability to use Nix to build, test and run Stanc3. We recommend trying the opam instructions first if you are not an existing Nix user, with these as a backup.

If you have nix installed, you can build Stanc3 by running the following command in the stanc3 directory:

nix-build

The binary will be in result/bin/stanc. It may take a minute the first time you run it. Alternatively, the following is sometimes a faster way to build:

nix-shell --command "dune build"

To run the test suite, run:

nix-shell --command "dune build --profile release @runtest"

To install Stanc3 to your system, run:

nix-env -i -f default.nix

To drop into a sandboxed development shell with all of the build dependencies of Stanc3 plus packages for an OCaml development environment (dune, ocp-indent, ocamlformat, merlin and utop), run:

nix-shell

Development

Useful commands

Testing

Once you have the necessary software, you can make your edits to the source files in src/ and tests in test/. Running the command dune runtest (or make test) will show any test output which is different from the expected output. In our continuous integration, this results in test failures. If you are knowingly changing the output, and the differences highlighted by dune runtest look correct, you can run dune promote to change the expected output to match your current tests.

Test coverage

We have support for computing test coverage using the bisect_ppx library. To generate a coverage report, run make testcoverage. This will print a summary of the coverage to the terminal, and generate a detailed HTML report in the _coverage directory. This report can be opened in a web browser.

Code coverage of the master branch is available on codecov.io.

Code formatting

We recommend setting up your editor to use OCamlformat automatically. This will differ by editor, but is possible in most popular editors such as Emacs, VSCode, etc. See Editor advice for more specific tips.

If you would like to manually run the auto-formatter on all OCaml code in the repository, run make format. Similar to the above, you will need to run dune promote to accept these changes into the code.

If you would like to run the formatter before each commit (recommended), run

scripts/hooks/install_hooks.sh

Note: ocamlformat does not support .mly or .mll files used in the frontend.

Updating the parser error messages

If the parser has been edited, the command dune build @update_messages will add any new error states to the parser.messages file. These will say

TODO: PARSER MESSAGE NEEDED HERE.

See adding or changing the syntax error messages for more information.

Note that python3 is required to run this command.

Building these docs

Docs can be built with make doc. This will generate a _build/default/_doc/_html/index.html file which can be opened in a web browser.

Developing with stanc3 and CmdStan

In order to use the locally built development version of stanc3 with CmdStan, you need to set the STANC3 makefile variable in the make/local file in CmdStan. Example:

STANC3=relative/or/absolute/path/to/the/cloned/stanc3/folder

This will automatically rebuild the stanc3 binary used in CmdStan if a change was made to the stanc3 source files.

Editor advice

For working on this project, we recommend using either VSCode or Emacs as an editor, due to their good OCaml support through Merlin: syntax highlighting, auto-completion, type inference, automatic case splitting, and more. For people who prefer a GUI and have not memorized all Emacs or Vim keystrokes, VSCode might have the less steep learning curve. Anything with Merlin support is fine.

Setting up VSCode

Install instructions for VSCode can be found here.

For Windows users: We recommend using Remote - WSL to program within WSL from a native Windows installation of VSCode. This extension allows you to connect to the WSL instance as if it is a remote machine, removing the need for an X11 server or other method of running a Linux GUI app directly.

Once in VSCode (on any platform), simply install the OCaml extension and you should be ready to go.

Setting up Emacs

The best way to edit OCaml in Emacs is through Tuareg mode.

To get full Merlin support, you will need to run opam user-setup install after installing Merlin in our dev dependencies.

If you use use-package.el, this snippet should set up Tuareg+Merlin+OCamlformat

(use-package tuareg
+  :config
+  (electric-indent-mode 0)
+  (face-spec-set
+   'tuareg-font-lock-constructor-face
+   '((((class color) (background light)) (:foreground "SaddleBrown"))
+     (((class color) (background dark)) (:foreground "burlywood1"))))
+  (add-hook 'tuareg-mode-hook
+            (lambda ()
+              (prettify-symbols-mode 0))))
+(use-package merlin
+  :config
+  (add-hook 'tuareg-mode-hook 'merlin-mode t)
+  (with-eval-after-load 'company
+    (add-to-list 'company-backends 'merlin-company-backend)))
+
+(require 'ocamlformat)
+(add-hook 'tuareg-mode-hook
+          (lambda ()
+            (define-key tuareg-mode-map (kbd "C-M-<tab>") #'ocamlformat)
+            (add-hook 'before-save-hook #'ocamlformat-before-save)))

Finding your way around the code

Even to an experienced OCaml developer, there are certain practices in the stanc3 codebase which might be unfamiliar. We have tried to document those on our Core ideas page.

Advanced development

Fuzzing

OCaml has support for building binaries instrumented for use with theAFL++ fuzzing tool. This requires a new opam switch which includes the ocaml-option-afl base package.

opam switch create "stanc-fuzz" --packages "ocaml-option-afl,ocaml.4.14.1"
+eval $(opam env)
+./scripts/install_build_deps.sh

After this, the normal build process will produce a binary ready for fuzzing.

Profiling

Profiling support is not directly provided in the stanc3 repository, but you can use the Landmarks library to profile the code.

This requires editing the dune files in the src/ directory to include the landmarks library, similar to how the bisect_ppx library is instrumented by default.

(instrumentation
+  (backend landmarks --auto))

You can then build a profiled version of the code by running dune build src/stanc/stanc.exe --instrument-with landmarks --force.

To configure the profiler at runtime, consult the Landmarks documentation. A good starting command is

OCAML_LANDMARKS="on,output=prof.txt" stanc.exe mymodel.stan
diff --git a/stanc/index.html b/stanc/index.html new file mode 100644 index 000000000..93d1d289d --- /dev/null +++ b/stanc/index.html @@ -0,0 +1,2 @@ + +index (stanc.index)

stanc3 Developer Documentation

This document provides the documentation for the internals of the stanc3 compiler intended for developers.

If you are looking for the user-facing documentation, see this section of the Stan User's Guide.

Getting Started

See the Getting Started page for information on setting up a stanc3 development environment.

Resources

Here are some resources (internal and external) which may be useful to a new developer.

  • Real World OCaml, a free introduction to the OCaml language which features some of the libraries we use.

Getting Involved

  • Here are some good issues to tackle - make sure to comment on them first to see if they are still relevant.
  • We also always appreciated more documentation - either this documentation, which uses odoc, or the Stan user-facing documentation at stan-dev/docs.

Modules

The major code sections of the compiler are as follows (these are links):

These are related in the following architecture diagram

We additionally use several outside dependencies.

diff --git a/stanc/parser_messages.html b/stanc/parser_messages.html new file mode 100644 index 000000000..ea2e77d76 --- /dev/null +++ b/stanc/parser_messages.html @@ -0,0 +1,19 @@ + +parser_messages (stanc.parser_messages)

Adding or changing the syntax error messages

Background

Stanc3 uses Menhir's Incremental API to provide custom error messages for when the parser detects an error. Menhir and the Incremental API are documented in the reference manual. We write the custom error messages in src/frontend/parser.messages file, which follows Menhir's messages format (documented here. Those messages are automatically integrated into the parser by the build rules defined in src/frontend/dune.

This process is less obvious than it seems and has some important to understand caveats. Please read the above section of the Menhir manual before making changes to the parser or syntax errors.

Each rule in parser.messages indicates the error state it corresponds to by specifying any stack of tokens which result in that error state.

There may be many such stacks of tokens which could correspond to the same error. Menhir will point out if there are two rules defined for the same error, but it will only show you one of them.

Modifying an existing message

  1. Find the existing error message for the parser error in question by either:

    • Searching the message file for the current error message test,
    • Compiling a stan program which throws the error message with the `--debug-parse` flag, then search for the error state number
    • OR a new rule to parser.messages corresponding to *any* stack of tokens which could trigger the error you're interested in, then let Menhir tell you the line number of the existing rule the new rule collides with
  2. Update the message of the existing rule

Example

Suppose I want to change the error message for when the program is missing a { after the model keyword.

I write an example Stan program that has the error:

parameters {
+  real x;
+}
+model
+  x ~ normal(0, 1);
+}

Now I compile this program with stanc3 using the --debug-parse option. The result:

...
+Expected "{" after "model".
+(Parse error state 685)

The parse error state I'm looking for is 685. I search the parser.messages file for "685" (perhaps with the command `grep -n 685 src/frontend/parser.messages`), and I find:

program: MODELBLOCK WHILE
+##
+## Ends in an error in state: 685.
+##
+## model_block -> MODELBLOCK . LBRACE list(vardecl_or_statement) RBRACE [ GENERATEDQUANTITIESBLOCK EOF ]
+##
+## The known suffix of the stack is as follows:
+## MODELBLOCK
+##
+
+Expected "{" after "model".

I can now replace this message with my new version

Adding new messages after the parser has been changed

Often a new language feature will need new syntax messages. The command dune build @update_messages will add dummy error messages to parser.messages that you can replace. This sub-command requires Python 3 to be installed.

It is crucial to understand that the example programs Menhir provides in this file may not represent all possible programs leading to this state. See this section of the Menhir manual for specific advice.

Adding new parser states

Sometimes it is desirable to give a more specific error message than is possible with the default construction of the parser. One way around this is to add an additional state to the parser which matches the desired structure, followed by a token which cannot ever be reached. We define UNREACHABLE for this purpose.

Suppose I actually wanted to add a new message that would only show when a more specific error is made; maybe I want a special message for when model followed by a declaration. To do this I need to change the parser grammar in src/frontent/parser.mly to split off a new error state for the situation I want to catch. It is important to make sure not to change the behavior of the parser, so I should guarantee that he new rule will never successfully be built by terminating it with a token that can never occur. For example, I could change model = MODELBLOCK LBRACE ... to model = MODELBLOCK LBRACE ... | MODELBLOCK REAL UNREACHABLE.

This is enough to create a new parser state with a different error message.

Much like after a change to the parser for a new feature, after creating a new parser state, you should run dune build @update_messsages to check the new entry and generate a error template in parser.messages.