Skip to content

Macro are not accumulated and yet they are #416

Description

@MysaaJava

Take the following two files:
a.elpi

macro @mcro X :- X = 12.

b.elpi

accumulate "a".

pred test o:int.
test X :- @mcro X.

Running test predicate on file b gives error:
Unknown macro @mcro. Known macros:

If we add macro @mcro X :- X = 12. to b.elpi, this works again.

But if we add a different macro with the same name, like for example macro @mcro X :- X = 13., it will fail with

Macro @mcro declared twice.
File "./a.elpi", line 1, column 0, characters 0-23: 
  X: int \ X = 12
File "./b.elpi", line 3, column 0, characters 17-40: 
  X: int \ X = 13

So the data of the macro seems to be available to the typechecker somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions