Skip to content

Potentially untypable program #28

@Mathnerd314

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").

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