objectionary / eo

EOLANG, an Experimental Pure Object-Oriented Programming Language Based on 𝜑-calculus
https://www.eolang.org
MIT License
1.01k stars 126 forks source link

Fix: no top-level lamdba package in generated PHI programs #3129

Open deemp opened 4 months ago

deemp commented 4 months ago

Problem

When a formation has a λ ⤍ Package, the normalizer dataizes formations in sibling bindings. Otherwise, the normalizer doesn't dataize formations in sibling bindings. However, there's no top-level λ ⤍ Package binding in generated PHI programs.

pipeline/phi/as-phi-tests.phi (see this artefact):

{
  ⟦
    org ↦ ⟦
      eolang ↦ ⟦
         ...
      ⟧,
      λ ⤍ Package
    ⟧
  ⟧
}

Suggestion

Make eoc optionally keep the information about tests. That is, both eoc phi and eoc unphi should have a --tests flag.

For eoc phi --tests, write a λ ⤍ Test binding in the top-level formation.

{
  ⟦
    org ↦ ⟦
      eolang ↦ ⟦
         ...
      ⟧,
      λ ⤍ Package
    ⟧,
    λ ⤍ Test
  ⟧
}

For eoc unphi --tests, handle this binding too.

github-actions[bot] commented 4 months ago

@deemp thanks for the report, here is a feedback:

Problems

Please fix the bug report in order it to get resolved faster. Analyzed with gpt-4

maxonfjvipon commented 4 months ago

@yegor256 @deemp why do we need this? Does not this help?

deemp commented 4 months ago

@maxonfjvipon, I updated the issue description

yegor256 commented 4 months ago

@deemp in general, it's better to submit a new issue instead of editing description/title of existing one -- this will help us keep discussions more concise.

deemp commented 4 months ago

@yegor256, sure. However, there's no discussion in this issue apart from the current meta-discussion.