ct-gradual-typing / Papers

The Combination of Dynamic and Static Typing from a Categorical Perspective
10 stars 0 forks source link

Pretty printer bugs #41

Closed heades closed 7 years ago

heades commented 7 years ago

We need to go over the pretty printer and add more parens in places. For example,

Grady> :t \(X<:*)->\(x:X)->x
forall (X<:*).X -> X

The output type should actually be:

forall (X<:*).(X -> X)
michaelto20 commented 7 years ago

Fixed. Here are working examples: Example 1:

:t \(X<:*)->\(x:X)->x
forall (X<:*).(X -> X)

Example 2:

:t \(X<:*)->\(x:X)->\(Y<:*)->\(y:X->Y)->\(z:Y->Y)->z (y x)
forall (X<:*).(X -> forall (Y<:*).((X -> Y) -> (Y -> Y) -> Y))