Skip to content

Potentially untypable program #28

Description

@Mathnerd314

I guess HM with infinite types can type the example I gave at CCC today, but what about this?

I = {x->x};  
K = {x->{y->x}};  
W = {x->(x x)};  
term = {z->{y ->((y (z I))(z K))}};
test = (term W);
(test {x -> {y -> (pair (x 3) (((y "a") "b") "c")) } })

This uses test at a non-lambda value so should be incompatible with the deduced HM type you gave, { {A:{A->A} -> {A->B} } -> B }, that forces everything to be a lambda.
But of course it runs fine and produces (3,"b").

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions