Open aryairani opened 9 months ago
Restated: Review the current respondNumbered
design, and decide if it's worth it to make it better? And/or make a plan to convert to whatever consistent thing.
I think NumberedOutput
is the right direction, but could go farther with sharing logic between the pretty output and the numbered args.
Here are some thoughts:
Output
as well – outputs without numbered results can just return the empty list of numbered args (which no longer causes the previous numbered args to be cleared) andnotifyNumbered :: NumberedOutput -> (Pretty, [StructuredArgument])
, the type should be something more like notifyNumbered :: NumberedOutput -> ([(Section, [a])], forall f. (Functor f) => [(Section, f a)] -> Pretty, forall f. (Functor f) => f a -> f StructuredArgument)
, which would help ensure that the Pretty
and numberedArgs are built from the same list of results.
We have
Output
(the original) andNumberedOutput
(meant for numbered args, but especially for generating and numbering output at the same time), and evidently (as seen in #4601, #4603) started to diverge in how we create numbered args.Let's discuss whether we want to continue to have two kinds of output, two ways of setting numbered args, or whether there's something we can do to consolidate and facilitate their use.