awslabs / awslabs/AutoCorrode

Notation mechanism does not work for constructors with parameters

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Isabelle
Stars
105
Forks
27
Avg merge
12h 45m
Merged PRs (30d)
7

Description

If we have

```isabelle
datatype 'a foo = Foo 'a | Goo
notation_nano_rust_function foo.Foo ("Foo::Foo")
notation_nano_rust foo.Goo ("Foo::Goo")
```

then the notation for `foo.Foo` does not get registered properly and leads to type errors when trying to use the pattern `Foo::Foo(x)` in the arm of a match. Instead, we have to do the following dance:

```isabelle
notation_nano_rust foo.Foo ("Foo::FooM")
notation_nano_rust foo.Goo ("Foo::Goo")

abbreviation ‹foo_foo_urust ≡ lift_fun1 Foo›
notation_nano_rust_function foo_foo_urust ("Foo::Foo")
```

to make this work.

Contributor guide

Open the contributing guide

Research direction

Reproduce the Isabelle datatype and notation examples given in the issue, then inspect the notation_nano_rust_function and notation_nano_rust mechanisms. Done means Foo::Foo(x) works in a match arm for a parameterized constructor without the FooM and lift_fun1 workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.