I noticed that in many Unions, the Fail is somewhat hidden. E.g.
> diag $ group $ "x" <> hardline
Union
( Cat ( Char 'x' ) Fail )
( Cat ( Char 'x' ) Line )
To detect that the first alternative fails, the layout algorithm has to traverse everything that comes before the Fail.
I wonder whether group could simply produce this instead:
> diag $ group $ "x" <> hardline
Union
Fail
( Cat ( Char 'x' ) Line )
This could save a lot of work for the layouters!
Is there any reason why group shouldn't do this?
(#99 is somewhat related)
I noticed that in many
Unions, theFailis somewhat hidden. E.g.To detect that the first alternative fails, the layout algorithm has to traverse everything that comes before the
Fail.I wonder whether
groupcould simply produce this instead:This could save a lot of work for the layouters!
Is there any reason why
groupshouldn't do this?(#99 is somewhat related)