PLQ #12Done on:   Tuesday, December 3rd

Question 1 @ 2024-12-03 18:28

What would the picky typechecker (extended with division) do with the following code:

{with {half : {Num -> Num}
      {fun {x : Num} : Num
        {/ x 3}}}
  {call half 10}}

(Assume the first version: the explicitly-typed one.)


Question 2 @ 2024-12-03 18:30

When the third version of Picky (the ones without explicit type annotations and with ?T box types) is given the following:

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

it returns some long type error which can be simplified into:

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

What causes this error?


Question 3 @ 2024-12-03 18:36

What is the purpose of the “gamma” (Γ) in the Picky language’s typing judgments?


Question 4 @ 2024-12-03 18:38

Which of the following best describes a sound type system?