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

Fix: Implement better lambda normalization #498

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

asr2003
Copy link

@asr2003 asr2003 commented Dec 8, 2024

/claim #379
CLoses #379

@asr2003
Copy link
Author

asr2003 commented Dec 17, 2024

@pshirshov @neko-kai Any reviews on it?

@pshirshov
Copy link
Member

Will do.

@pshirshov
Copy link
Member

pshirshov commented Dec 17, 2024

If I modify Lambda this way:

  final case class Lambda(input: List[SymName.LambdaParamName], output: AbstractReference) extends AbstractReference {
    println(s"$input => $this")

And run a test like

    "xxx" in {
      ///println(`LTT[_]`[List])
      println(LTT[IT1[List]])
    }

It will print List(LambdaParamName(0,1,1)) => λ %1:0 → List[+1:0]. The inversion didn't happen, the innermost lambda has 1 as depth index, while it should be 0.

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

Successfully merging this pull request may close these issues.

Better lambda normal form
2 participants