CS 6520 Homework 14
Exercise 14.1
Derive a type for
fst
(
snd
<1, <
false
, 10>>)
in the typed lambda calculus extended with pairs.
Exercise 14.2
Derive a type for
(
g
:
Bool
+
Num
.
M
_{Bool+Num->Num}
g
(
x
:
Bool
. 0) (
x
:
Num
.
x
)) (
R
_{Bool+Num}
7)
in the typed lambda calculus extended with variants.
Also, show how the expression reduces to a value.
Exercise 14.3
Show that
fix
(
x
:
T
.
x
)
has a type for any
T
.
How is it possible that the expression produces a value of that type?
Last update: Tuesday, March 7th, 2000
mflatt@cs.utah.edu