Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion KLR/Trace/Term.lean
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,9 @@ nki builtin.access.ap
| .simple t =>
let pattern := pattern.map fun (s,c) => Core.APPair.mk s c 0
let scalarOffset <- scalar_offset.mapM fun
| .inl a => pure (.acc a)
| .inl a => do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind this triggers the bug in Walrus if we merge
I have a similar PR https://github.com/leanprover/KLR/pull/576/changes. Yours looks better

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. Thanks for pointing out.

let ap <- a.toAP
pure (.acc $ .birPattern $ Core.BirAccessPattern.fromAccessPattern ap)
| .inr r => match r with
| .scalar s => pure (.reg s.toString)
| _ => throw s!"scalar_offset requires scalar argument, got {r.kindStr}"
Expand Down
Loading