Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axiom without corresponding "compile" block results in an exception #1388

Closed
lukaszcz opened this issue Jul 15, 2022 · 1 comment · Fixed by #1418
Closed

Axiom without corresponding "compile" block results in an exception #1388

lukaszcz opened this issue Jul 15, 2022 · 1 comment · Fixed by #1418

Comments

@lukaszcz
Copy link
Collaborator

Compiling:

module loneaxiom;

inductive Unit{
  unit : Unit;
};

axiom ignore : Unit -> Unit;

end;

results in:

juvix: Name {_nameText = "ignore", _nameId = NameId {_unNameId = 3}, _nameKind = KNameAxiom, _nameLoc = Interval {_intervalFile = "/Users/heliax/Documents/progs/juvix/loneaxiom.juvix", _intervalStart = FileLoc {_locLine = Pos {_unPos = 7}, _locCol = Pos {_unPos = 7}, _locOffset = Pos {_unPos = 60}}, _intervalEnd = FileLoc {_locLine = Pos {_unPos = 7}, _locCol = Pos {_unPos = 13}, _locOffset = Pos {_unPos = 66}}}}
CallStack (from HasCallStack):
  error, called at src/Juvix/Prelude/Base.hs:264:9 in juvix-0.2.1-CZT06Rzh5GNEZIQRWHpfSc:Juvix.Prelude.Base
  error, called at src/Juvix/Translation/MonoJuvixToMiniC.hs:439:80 in juvix-0.2.1-CZT06Rzh5GNEZIQRWHpfSc:Juvix.Translation.MonoJuvixToMiniC

PR #1386 doesn't fix this.

@paulcadman
Copy link
Collaborator

I have a fix for this in the work I'm doing for name exporting (will need work to integrate with the changes) de2eb43

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

Successfully merging a pull request may close this issue.

3 participants