Browse Source

Simplify example 4.1

master
Daniel Hillerström 6 years ago
parent
commit
bbbc6bc2da
  1. 10
      thesis.tex

10
thesis.tex

@ -1243,7 +1243,7 @@ operation in order to type check.
% %
We will now show that this suspended computation fails to type check We will now show that this suspended computation fails to type check
with the above type signature. Let with the above type signature. Let
$\Gamma_0 = \{\dec{fac} : \Int \to \Int \eff
$\Gamma = \{\dec{fac} : \Int \to \Int \eff
\{\dec{Div}:\Zero\}\}$. The following typing derivation shows that \{\dec{Div}:\Zero\}\}$. The following typing derivation shows that
the application of $\dec{fac}$ causes its effect row to be the application of $\dec{fac}$ causes its effect row to be
propagated outwards. propagated outwards.
@ -1251,12 +1251,12 @@ operation in order to type check.
\begin{mathpar} \begin{mathpar}
\inferrule*[Right={\tylab{Lam}}] \inferrule*[Right={\tylab{Lam}}]
{\inferrule*[Right={\tylab{App}}] {\inferrule*[Right={\tylab{App}}]
{\typ{\emptyset;\Gamma_0,\Unit:\Record{}}{\dec{fac} : \Int \to \Int \eff \{\dec{Div}:\Zero\}}\\
\typ{\emptyset;\Gamma_0,\Unit:\Record{}}{3 : \Int}
{\typ{\emptyset;\Gamma,\Unit:\Record{}}{\dec{fac} : \Int \to \Int \eff \{\dec{Div}:\Zero\}}\\
\typ{\emptyset;\Gamma,\Unit:\Record{}}{3 : \Int}
} }
{\typ{\emptyset;\Gamma_0,\Unit:\Record{}}{\dec{fac}~3 : \Int \eff \{\dec{Div}:\Zero\}}}
{\typ{\emptyset;\Gamma,\Unit:\Record{}}{\dec{fac}~3 : \Int \eff \{\dec{Div}:\Zero\}}}
} }
{\typ{\emptyset;\Gamma_0}{\lambda\Unit.\dec{fac}~3} : \Unit \to \Int \eff \{\dec{Div}:\Zero\}}
{\typ{\emptyset;\Gamma}{\lambda\Unit.\dec{fac}~3} : \Unit \to \Int \eff \{\dec{Div}:\Zero\}}
\end{mathpar} \end{mathpar}
% %
It follows from the typing derivation that the effect row on It follows from the typing derivation that the effect row on

Loading…
Cancel
Save