Skip to content
This repository was archived by the owner on Sep 28, 2026. It is now read-only.
This repository was archived by the owner on Sep 28, 2026. It is now read-only.

Allow using qualified symbols from the current module #1332

Description

@jonaprieto

Consider the following program:

module example;

axiom A : Type;
inductive T (A : Type) {
c : A -> T A;
};

end;

Inside the constructor c the first occurrence of A is a reference to the type parameter. To check out this, run the scoper:

$ juvix scope example.juvix --show-name-ids
module example@0;
  axiom A@1 : Type;

  inductive T@3 (A@2 : Type) {
    c@4 : A@2 → T@3 A@2;
  };
end;

At the moment, there is no way to refer to A@1, i.e., the axiom A. I'd expect to be able to write a program like the following.

module example;

axiom A : Type;
inductive T (A : Type) {
c : example.A -> T A;
};

end;
$ juvix microjuvix typecheck example.juvix
/home/jonaprieto/example.juvix:5:5-14: error:
Qualified symbol not in scope: example.A

Activity

  1. janmasrovira commented on Jul 11, 2022

    @janmasrovira
    Collaborator

    I don't think this qualifies as a bug. I would argue that this is the desirable behaviour

  2. jonaprieto commented on Jul 11, 2022

    @jonaprieto
    CollaboratorAuthor

    That's true. I thought I pressed the feature request button. The labels are part of the issue template.

  3. transferred this issue fromanoma/minijuvixon Jul 13, 2022
  4. locked and limited conversation to collaborators on Jul 14, 2022
  5. converted this issue into a discussion #1372 on Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions