Skip to content

Apply resugarings also to pre- and postconditions #1945

@abentkamp

Description

@abentkamp

Consider the following example:

#[hax_lib::requires(a[0]==0)]
fn first(a: &mut [i32; 10]) -> i32 {
  a[0]
}

Open this code snippet in the playground

The Lean backend produces a[(0 : usize)]_? for the occurrence of a[0] in the function body but core_models.ops.index.Index.index a (0 : usize) for the occurrence of a[0] in the requires-clause.

The reason for this is that:

Maybe we can apply the resugarings earlier?

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendIssue in one of the backends (i.e. F*, Coq, EC...)leanRelated to the Lean backend or library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions