-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support autogenerated documentation for method results, in addition t…
…o parameters (#161) Currently, the `DescribedParams` class allows for declaring the documentation for the _parameters_ of methods, but not the _results_. This makes it insufficient for generating the sorts of documentation like what is written [here](https://github.com/GaloisInc/saw-script/blob/7bb93c9b5c08422a49017e49772d8d2db3ff8fb0/saw-remote-api/docs/old-Saw.rst#running-proof-scripts) in the handwritten SAW remote API docs. This is an attempt at augmenting the `DescribedParams` class to allow documenting result values in addition to parameters. Some of the highlights are: * The class has now been renamed to `DescribedMethod` to reflect its more general purpose. * `DescribedMethod` now has two type parameters: `params` (which existed before) and `result`. There is a `params -> result` functional dependency since the `params` type is almost always a custom data type, whereas `result` can often be off-the-shelf data types like `Value` and `()`. * In addition to the `parameterFieldDescription` method, there is now a `resultFieldDescription` method. It has a default implementation of `[]` in the common case where `result` is `()` (i.e., nothing is returned). * There has been some reorganization of the autogenerated documentation so that there is a more clear separation of the parameters and results.
- Loading branch information
1 parent
594a040
commit b9b3edd
Showing
5 changed files
with
198 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.