typing: add inference rules for static records

This commit is contained in:
regnat 2017-04-04 09:37:29 +02:00
parent 185a8a5736
commit 70dd7ff090

View File

@ -9,6 +9,7 @@
}
\usepackage{mathtools}
\usepackage{mathpartir}
\usepackage{xfrac}
\newcommand{\ty}[1]{\texttt{#1}}
@ -18,6 +19,9 @@
\DeclareMathOperator\dom{dom}
\newcommand{\orthsum}{\oplus^\bot}
\newcommand{}{\Gamma}
\newcommand{}{\tau}
\title{Typing of records in nix}
\author{Théophane Hufschmitt}
\date{}
@ -136,8 +140,23 @@ is syntactic sugar for
{ x1 = e1; } (*$\orthsum_\undef$*) ... (*$\orthsum_\undef$*) { xn = en; }
\end{lstlisting}
\section{Typing}
\subsection{Static labels}
\begin{mathpar}
\inferrule{%
\vdash e :
}{%
\vdash \{ l = e \} : \{ l: \}
}
\and
\inferrule{%
\vdash e_1 : _1 \\ \vdash e_2 : _2 \\ _1 \orthsum_\undef _2
}{%
\vdash e_1 \orthsum_\undef e_2 : _1 \orthsum_\undef _2
}
\end{mathpar}
\bibliographystyle{alpha}
\bibliography{../references}
\end{document}