Skip to content

Conversation

tpapp
Copy link
Owner

@tpapp tpapp commented Oct 8, 2025

No description provided.

@tpapp
Copy link
Owner Author

tpapp commented Oct 8, 2025

CI error is EnzymeAD/Enzyme.jl#2653, unrelated.

Comment on lines +7 to +8
const LENSES = Union{IndexLens,PropertyLens}

Copy link
Collaborator

Choose a reason for hiding this comment

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

LENSES is not used below:

Suggested change
const LENSES = Union{IndexLens,PropertyLens}

(; transformations) = transformation
repr1 = (transformations isa NamedTuple ? "NamedTuple" : "Tuple" ) * " of transformations"
inner = _inner(transformation)
repr1 = (inner isa NamedTuple ? "NamedTuple" : "Tuple" ) * " of transformations"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could be simplified to something like

Suggested change
repr1 = (inner isa NamedTuple ? "NamedTuple" : "Tuple" ) * " of transformations"
repr1 = string(nameof(typeof(inner)), " of transformations")

Helper function for accessing the `inner` field, as we define `getproperty` which masks
this. Internal.
"""
@inline _inner(t) = getfield(t, :inner)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are the @inline annotations actually needed?


const LENSES = Union{IndexLens,PropertyLens}

set(t::TransformTuple, ::typeof(_inner), inner) = TransformTuple(inner)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should/could we here and in the following definitions restrict the third argument to suitable types?

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.

2 participants