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

Commit

Permalink
Adapt to GaloisInc/cryptol#993 "Refactor evopts".
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Huffman committed Jan 28, 2021
1 parent 0616203 commit de21a45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cryptol-saw-core/css/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cssMain css [inputModule,name] | cssMode css == NormalMode = do
else (output css)

modEnv <- CM.initialModuleEnv
let minp = CM.ModuleInput True defaultEvalOpts BS.readFile modEnv
let minp = CM.ModuleInput True (pure defaultEvalOpts) BS.readFile modEnv
(e,warn) <- CM.loadModuleByPath inputModule minp
mapM_ (print . pp) warn
case e of
Expand Down Expand Up @@ -128,7 +128,7 @@ extractCryptol sc modEnv input = do
case P.parseExpr (pack input) of
Left err -> fail (show (P.ppError err))
Right x -> return x
let minp = CM.ModuleInput True defaultEvalOpts BS.readFile modEnv
let minp = CM.ModuleInput True (pure defaultEvalOpts) BS.readFile modEnv
(exprResult, exprWarnings) <- CM.checkExpr pexpr minp
mapM_ (print . pp) exprWarnings
((_, expr, schema), _modEnv') <-
Expand Down
4 changes: 2 additions & 2 deletions cryptol-saw-core/src/Verifier/SAW/CryptolEnv.hs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ resolveIdentifier env nm =
nameEnv = getNamingEnv env

doResolve pnm =
do let minp = MM.ModuleInput True defaultEvalOpts ?fileReader modEnv
do let minp = MM.ModuleInput True (pure defaultEvalOpts) ?fileReader modEnv
(res, _ws) <- MM.runModuleM minp $
MM.interactive (MB.rename interactiveName nameEnv (MR.renameVar pnm))
case res of
Expand Down Expand Up @@ -642,7 +642,7 @@ liftModuleM ::
(?fileReader :: FilePath -> IO ByteString) =>
ME.ModuleEnv -> MM.ModuleM a -> IO (a, ME.ModuleEnv)
liftModuleM env m =
do let minp = MM.ModuleInput True defaultEvalOpts ?fileReader env
do let minp = MM.ModuleInput True (pure defaultEvalOpts) ?fileReader env
MM.runModuleM minp m >>= moduleCmdResult

defaultEvalOpts :: E.EvalOpts
Expand Down

0 comments on commit de21a45

Please sign in to comment.