<commit_before>% Don't ask me
% https://tex.stackexchange.com/questions/445691/spacing-issue-with-literate-in-listings
\makeatletter
\def\lst@Literate#1#2#3{%
    \ifx\relax#2\@empty\else
        \lst@CArgX #1\relax\lst@CDef
            {}
            {\let\lst@next\@empty
             \lst@ifxliterate
                \lst@ifmode \let\lst@next\lst@CArgEmpty \fi
             \fi
             \ifx\lst@next\@empty
                 \ifx\lst@OutputBox\@gobble\else
                   \lst@XPrintToken \let\lst@scanmode\lst@scan@m
                   \lst@token{#2}\lst@length#3\relax
                   \lst@XPrintToken
                   \lst@whitespacefalse %!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                 \fi
                 \let\lst@next\lst@CArgEmptyGobble
             \fi
             \lst@next}%
            \@empty
        \expandafter\lst@Literate
    \fi}
\makeatother

\lstdefinestyle{rule}{
  language=Caml,
  showstringspaces=false,
  basicstyle=\small\normalfont,
  keywordstyle=\textbf,
  columns=[c]fullflexible,
  flexiblecolumns,
  % If you want to keep a monospace code-like style:
  % basicstyle=\ttfamily,
  % columns=[c]spaceflexible,
  % flexiblecolumns=false,
  aboveskip=0pt,
  belowskip=0pt,
  lineskip=-1pt,
  showlines=false,
  numbers=none,
  alsoletter={*?},
  morekeywords=[1]{let*,let*?},
  includerangemarker=false,
  literate=
  {->}{{{$\tarr{}$}}}2
  {-->}{{{$\rightarrow$}}}2
  {./\{}{$\{$}1
  {\}}{$\}$}1
  {_1}{{$_1$}}1
  {_2}{{$_2$}}1
  {_3}{{$_3$}}1
  {.!}{}0
  {.*}{}0
  {.+}{}0
  {-:>}{$\mapsto$}1
  {<+>}{$+$}1
  {<->}{$-$}1
  {<.>}{$.$}1
  {<|=}{$\in$}1
  {!$}{}0
  {ell}{{{$\ell$}}}1
  {pi}{{$\pi$}}1
  {delta}{{{$\delta$}}}1
  {rho}{{{$\rho$}}}1
  {\\Store}{{$\delta$ }}2
  {\\Perm}{$\pi$ }2
  {\\VEnv}{$\gamma$ }2
  {\\TimeOut}{$\TimeOut$}7
  {gamma}{{{$\gamma$}}}1
  {kappa}{{{$\kvar$}}}1
  {deltas}{{{$\overline{\delta}$}}}1
  {gammas}{{{$\overline{\gamma}$}}}1
  {kappas}{{{$\overline\kvar$}}}1
  {ks}{{$\Multi{k}$}}1
  {tys}{{$\Multi{\tau}$}}1
  {cstr}{{$C$}}1
  {<=}{$\lk$}1
  {<=>}{$\equivC$}1
  {KUNR\ None}{$\kun$}1
  {RADDR}{}0
  ,
}

\newcommand\lstsemrule[1]{%
  \lstinputlisting
  [style=rule,linerange=rule\ #1-(**)]
  {syntax/semanticsannotated.ml}
}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
<commit_msg>typesetting<commit_after>% Don't ask me
% https://tex.stackexchange.com/questions/445691/spacing-issue-with-literate-in-listings
\makeatletter
\def\lst@Literate#1#2#3{%
    \ifx\relax#2\@empty\else
        \lst@CArgX #1\relax\lst@CDef
            {}
            {\let\lst@next\@empty
             \lst@ifxliterate
                \lst@ifmode \let\lst@next\lst@CArgEmpty \fi
             \fi
             \ifx\lst@next\@empty
                 \ifx\lst@OutputBox\@gobble\else
                   \lst@XPrintToken \let\lst@scanmode\lst@scan@m
                   \lst@token{#2}\lst@length#3\relax
                   \lst@XPrintToken
                   \lst@whitespacefalse %!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                 \fi
                 \let\lst@next\lst@CArgEmptyGobble
             \fi
             \lst@next}%
            \@empty
        \expandafter\lst@Literate
    \fi}
\makeatother

\lstdefinestyle{rule}{
  language=Caml,
  showstringspaces=false,
  basicstyle=\small\normalfont,
  keywordstyle=\textbf,
  columns=[c]fullflexible,
  flexiblecolumns,
  % If you want to keep a monospace code-like style:
  % basicstyle=\ttfamily,
  % columns=[c]spaceflexible,
  % flexiblecolumns=false,
  aboveskip=0pt,
  belowskip=0pt,
  lineskip=-1pt,
  showlines=false,
  numbers=none,
  alsoletter={*?},
  morekeywords=[1]{let*,let*?},
  includerangemarker=false,
  literate=
  {->}{{{$\tarr{}$}}}2
  {-->}{{{$\rightarrow$}}}2
  {./\{}{$\{$}1
  {\}}{$\}$}1
  {_1}{{$_1$}}1
  {_2}{{$_2$}}1
  {_3}{{$_3$}}1
  {.!}{}0
  {.*}{}0
  {.+}{}0
  {-:>}{$\mapsto$}1
  {<+>}{$+$}1
  {<->}{$-$}1
  {<.>}{$.$}1
  {<?>}{$?$}1
  {<|=}{$\in$}1
  {!$}{}0
  {ell}{{{$\ell$}}}1
  {pi}{{$\pi$}}1
  {delta}{{{$\delta$}}}1
  {rho}{{{$\rho$}}}1
  {\\Store}{{$\delta$ }}2
  {\\Perm}{$\pi$ }2
  {\\VEnv}{$\gamma$ }2
  {\\TimeOut}{$\TimeOut$}7
  {gamma}{{{$\gamma$}}}1
  {kappa}{{{$\kvar$}}}1
  {deltas}{{{$\overline{\delta}$}}}1
  {gammas}{{{$\overline{\gamma}$}}}1
  {kappas}{{{$\overline\kvar$}}}1
  {ks}{{$\Multi{k}$}}1
  {tys}{{$\Multi{\tau}$}}1
  {cstr}{{$C$}}1
  {<=}{$\lk$}1
  {<=>}{$\equivC$}1
  {KUNR\ None}{$\kun$}1
  {RADDR}{}0
  ,
}

\newcommand\lstsemrule[1]{%
  \lstinputlisting
  [style=rule,linerange=rule\ #1-(**)]
  {syntax/semanticsannotated.ml}
}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:

{'fraction_non_alphanumeric': 0.265625, 'fraction_numerical': 0.026692708333333332, 'mean_word_length': 2.589563862928349, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4850296', 'n_tokens_mistral': 1978, 'n_tokens_neox': 1881, 'n_words': 223}