This commit introduces a DecoratedSDoc type which replaces the old ErrDoc, and hopefully better reflects the intent.