Skip to content

Implicit (type) variables inconsistent resolution #2412

@jonaprieto

Description

@jonaprieto

Consider the following program.

module Example;

f {A} : A -> A
 | a :=  a; -- OK

Here, we have a function that takes in a type A (implicitly)
and spits out a function of type A -> A. All good. Notice we
did not type A, i.e., skip {A : Type}.

After learning this, one may attempt the following
to find out that it does not type check.

g : {A} -> A -> A -- Fail
 | a := a;

The error says

Symbol not in scope: A
Perhaps you meant f
                   g

In other words, what I expect is g to be interpreted as:

g : {A : Type} -> A -> A
 | a := a;

PS. Feel free to change the title, I couldn't find a better one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions