Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump argo submodule to include docs for method results #1207

Merged
merged 2 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ test_rpc() {
./cry rpc-test
}

check_rpc_docs() {
./cry rpc-docs
}

bundle_files() {
doc=dist/share/doc/cryptol
lib=dist/share/cryptol
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ jobs:
- shell: bash
run: .github/ci.sh test_rpc
if: runner.os != 'Windows'
- shell: bash
run: .github/ci.sh check_rpc_docs
if: runner.os != 'Windows'

- if: matrix.ghc == '8.8.4'
uses: actions/upload-artifact@v2
Expand Down
7 changes: 7 additions & 0 deletions cry
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Available commands:
test Run some tests (may take a while)
quick-test Like "test" but run fewer tests by default
rpc-test Run RPC server tests
rpc-docs Check that the RPC documentation is up-to-date
exe-path Print the location of the local executable
EOM
}
Expand Down Expand Up @@ -90,6 +91,12 @@ case $COMMAND in
$DIR/cryptol-remote-api/run_rpc_tests.sh
;;

rpc-docs)
echo "Checking cryptol-remote-api docs (Cryptol.rst) are up-to-date with server"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
$DIR/cryptol-remote-api/check_docs.sh
;;


help) show_usage && exit 0 ;;

Expand Down
14 changes: 14 additions & 0 deletions cryptol-remote-api/check_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

cd $DIR/docs

export CRYPTOL_SERVER=$(cabal v2-exec which cryptol-remote-api)
if [[ ! -x "$CRYPTOL_SERVER" ]]; then
echo "could not locate cryptol-remote-api executable - try executing with cabal v2-exec"
exit 1
fi

$CRYPTOL_SERVER doc > TEMP.rst
diff Cryptol.rst TEMP.rst
8 changes: 7 additions & 1 deletion cryptol-remote-api/cryptol-eval-server/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import qualified Argo.Doc as Doc
import CryptolServer
( ServerState, moduleEnv, tcSolver, initialState, extendSearchPath, command, notification )
import CryptolServer.Call ( call )
import CryptolServer.Data.Expression ( Expression )
import CryptolServer.Data.Type ( JSONSchema )
import CryptolServer.EvalExpr
( evalExpressionDescr, evalExpression )
import CryptolServer.ExtendSearchPath
Expand Down Expand Up @@ -90,7 +92,11 @@ evalServerDocs =
[ Doc.Section "Summary" $ [ Doc.Paragraph
[Doc.Text "A remote server for ",
Doc.Link (Doc.URL "https://https://cryptol.net/") "Cryptol",
Doc.Text " that supports only type checking and evaluation of Cryptol code."]]]
Doc.Text " that supports only type checking and evaluation of Cryptol code."]]
, Doc.Section "Terms and Types"
[Doc.datatype @Expression,
Doc.datatype @JSONSchema]
]

description :: String
description =
Expand Down
8 changes: 7 additions & 1 deletion cryptol-remote-api/cryptol-remote-api/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import CryptolServer.Call ( call, callDescr )
import CryptolServer.Check ( check, checkDescr )
import CryptolServer.ClearState
( clearState, clearStateDescr, clearAllStates, clearAllStatesDescr )
import CryptolServer.Data.Expression ( Expression )
import CryptolServer.Data.Type ( JSONSchema )
import CryptolServer.EvalExpr
( evalExpression, evalExpressionDescr )
import CryptolServer.ExtendSearchPath
Expand Down Expand Up @@ -47,7 +49,11 @@ serverDocs =
[ Doc.Section "Summary" $ [ Doc.Paragraph
[Doc.Text "An RCP server for ",
Doc.Link (Doc.URL "https://https://cryptol.net/") "Cryptol",
Doc.Text " that supports type checking and evaluation of Cryptol code via the methods documented below."]]]
Doc.Text " that supports type checking and evaluation of Cryptol code via the methods documented below."]]
, Doc.Section "Terms and Types"
[Doc.datatype @Expression,
Doc.datatype @JSONSchema]
]

description :: String
description =
Expand Down
1 change: 1 addition & 0 deletions cryptol-remote-api/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
_build/
TEMP.rst
Loading