Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Add annotations to rewrite rules and simpsets #204

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions cryptol-saw-core/src/Verifier/SAW/Cryptol.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1611,9 +1611,9 @@ scCryptolType sc t =
scCryptolEq :: SharedContext -> Term -> Term -> IO Term
scCryptolEq sc x y =
do rules <- concat <$> traverse defRewrites defs
let ss = addConvs natConversions (addRules rules emptySimpset)
tx <- scTypeOf sc x >>= rewriteSharedTerm sc ss >>= scCryptolType sc
ty <- scTypeOf sc y >>= rewriteSharedTerm sc ss >>= scCryptolType sc
let ss = addConvs natConversions (addRules rules emptySimpset :: Simpset ())
tx <- scTypeOf sc x >>= rewriteSharedTerm sc ss >>= scCryptolType sc . snd
ty <- scTypeOf sc y >>= rewriteSharedTerm sc ss >>= scCryptolType sc . snd
unless (tx == ty) $
panic "scCryptolEq"
[ "scCryptolEq: type mismatch between"
Expand Down
2 changes: 1 addition & 1 deletion cryptol-saw-core/src/Verifier/SAW/Cryptol/Simpset.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Verifier.SAW.Rewriter
import Verifier.SAW.SharedTerm
import Verifier.SAW.Term.Functor

mkCryptolSimpset :: SharedContext -> IO Simpset
mkCryptolSimpset :: SharedContext -> IO (Simpset a)
mkCryptolSimpset sc =
do m <- scFindModule sc cryptolModuleName
scSimpset sc (cryptolDefs m) [] []
Expand Down
2 changes: 1 addition & 1 deletion saw-core/src/Verifier/SAW/Constant.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ import Verifier.SAW.Conversion
scConst :: SharedContext -> String -> Term -> IO Term
scConst sc name t = do
ty <- scTypeOf sc t
ty' <- rewriteSharedTerm sc (addConvs natConversions emptySimpset) ty
(_,ty') <- rewriteSharedTerm sc (addConvs natConversions emptySimpset :: Simpset ()) ty
scConstant sc name t ty'
Loading