@@ -15,28 +15,29 @@ struct ∂☆new{N}; end
1515function (:: ∂☆new{1 })(B:: Type , xs:: AbstractTangentBundle{1} ...)
1616 primal_args = map (primal, xs)
1717 the_primal = _construct (B, primal_args)
18-
18+ @info " ∂☆new{1} "
1919 tangent_tup = map (first_partial, xs)
2020 the_partial = if B<: Tuple
2121 Tangent {B, typeof(tangent_tup)} (tangent_tup)
2222 else
2323 names = fieldnames (B)
2424 tangent_nt = NamedTuple {names} (tangent_tup)
25- Tangent {B, typeof(tangent_nt) } (tangent_nt)
25+ StructuralTangent {B } (tangent_nt)
2626 end
2727 return TaylorBundle {1, B} (the_primal, (the_partial,))
2828end
2929
3030function (:: ∂☆new{N})(B:: Type , xs:: AbstractTangentBundle{N} ...) where {N}
3131 primal_args = map (primal, xs)
3232 the_primal = _construct (B, primal_args)
33-
33+ @info " ∂☆new{N} "
3434 the_partials = ntuple (Val {N} ()) do ii
3535 iith_order_type = ii== 1 ? B : Any # the type of the higher order tangents isn't worth tracking
3636 tangent_tup = map (x-> partial (x, ii), xs)
3737 tangent = if B<: Tuple
3838 Tangent {iith_order_type, typeof(tangent_tup)} (tangent_tup)
3939 else
40+ # TODO support mutation
4041 names = fieldnames (B)
4142 tangent_nt = NamedTuple {names} (tangent_tup)
4243 Tangent {iith_order_type, typeof(tangent_nt)} (tangent_nt)
0 commit comments