Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

No description provided.

@lukaszcz lukaszcz requested review from Copilot and janmasrovira July 11, 2025 14:27
@lukaszcz lukaszcz self-assigned this Jul 11, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors TypeRep instances to use Rep.composite for parameterised types instead of embedding parameters in the atomic name, and updates related mapping syntax in intent translation.

  • Extend the doc comment for Rep.atomic to mention encoding parameter values in the name.
  • Change hasTypeRep instances in AVM.Object, AVM.Object.Consumable, and AVM.Class.AppData to use Rep.composite.
  • Update list‐mapping calls in AVM.Intent.Translation to use the .map method and pipeline syntax.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Prelude/TypeRep.lean Clarify Rep.atomic comment
AVM/Object/Consumable.lean Switch from Rep.atomic with name suffix to Rep.composite
AVM/Object.lean Switch from Rep.atomic with name suffix to Rep.composite
AVM/Class/AppData.lean Switch from Rep.atomic with name suffix to Rep.composite
AVM/Intent/Translation.lean Replace List.map calls with .map and pipeline (`
Comments suppressed due to low confidence (3)

Prelude/TypeRep.lean:9

  • [nitpick] The doc for Rep.atomic is a bit ambiguous about its intended use for parameterised types. Consider clarifying that atomic is primarily for parameterless types and only encodes parameters in the name when absolutely necessary, with composite preferred for structured parameters.
    identified by the type name) or parameter values (stored in the name). -/

Prelude/TypeRep.lean:11

  • [nitpick] It may help to expand this comment to note that Rep.composite stores each parameter in the params list, contrasting it with atomic’s name‐based encoding.
  /-- `Rep.composite` is used for parameterised data types -/

AVM/Intent/Translation.lean:37

  • [nitpick] There's a mix of free‐function List.map and the .map method style in this file and others. For consistency and readability, consider standardizing on one mapping style project-wide.
  match provided.map (fun p => p.toConsumable false key |>.consume) |>.getSome with

@janmasrovira janmasrovira merged commit 7ae673f into main Jul 11, 2025
2 checks passed
@janmasrovira janmasrovira deleted the refactor-typerep branch July 11, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants