Skip to content

Instantly share code, notes, and snippets.

@pscollins
Created July 31, 2014 02:39
Show Gist options
  • Save pscollins/bd821617b3596849623b to your computer and use it in GitHub Desktop.
Save pscollins/bd821617b3596849623b to your computer and use it in GitHub Desktop.
\local{
\newcommand\recel{\nonterm{recaccess}}
}{
Let
\[
\ntHash\ntPosInt (\ntSExp) := \recel
\]
in the definitions that follow.
\local{
\newcommand\recty{\indexedTerms}
\newcommand\posval{l}
\newcommand\resty{\term_{\posval}}
}{
\[
\typeRule{
\curr \says \ntSExp \is \recty
}{
\curr \says \ntHash\posval (\ntSExp) \is \resty
}
\]
}
\local{
\newcommand\elty{\term}
\newcommand\inputty{\elty}
\newcommand\returnty{()}
}{
\[
\typeRule{
\curr \says \recel \is \elty \andAlso
\curr \says \ntSExp \is \inputty
}{
\curr \says \recel := \ntSExp \is \returnty
}
\]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment