PLQ #13Done on:   Tuesday, April 16th

Question 1 @ 2024-04-16 18:09

When Picky3 (the one without explicit type annotations and with the ?T box types) is used with the following program:

{with {f {fun {x} x}}
  {call f {< 1 2}}}

it refuses to run and throws a verbose type error that boils down to something like:

typecheck: type error for f: expecting `BoolT -> NumT`,
got `BoolT -> BoolT`

What causes this error?


Question 2 @ 2024-04-16 18:12

A language with a sound type system…


Question 3 @ 2024-04-16 18:14

Alice wants to add typechecking to a language where + can work with any two values via coercion. She takes the Picky language (assume Picky2, though it doesn’t matter), and adds coercion from any kind of value to a number when needed. Then, she adds the following two judgments instead of the single one:

  Γ ⊢ A : Number          Γ ⊢ B : Number
————————————————————    ————————————————————
Γ ⊢ {+ A B} : Number    Γ ⊢ {+ A B} : Number

Bob notes that there is a major flaw in this suggestion. What is it?


Question 4 @ 2024-04-16 21:21

The underlying theme of continuations is fundamentally about:


Question 5 @ 2024-04-16 21:23

What can we say about the CPS process?