Skip to content

Commit

Permalink
Panic on recursive foreign decl group
Browse files Browse the repository at this point in the history
  • Loading branch information
qsctr committed Jul 6, 2022
1 parent c5ebac4 commit 20403c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Cryptol/Eval/FFI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ evalForeignDecls :: ModulePath -> Module -> EvalEnv ->
Eval (Either [FFILoadError] EvalEnv)
evalForeignDecls path m env = do
foreignSrc <- liftIO $ newIORef Nothing
let evalForeignDeclGroup e (Recursive ds) = foldlM evalForeignDecl e ds
evalForeignDeclGroup e (NonRecursive d) = evalForeignDecl e d
let evalForeignDeclGroup e (NonRecursive d) = evalForeignDecl e d
evalForeignDeclGroup _ (Recursive _) = panic "evalForeignDecls"
["Recursive foreign declaration group"]
evalForeignDecl e d = case dDefinition d of
DForeign -> do
fsrc <- liftIO (readIORef foreignSrc) >>= \case
Expand Down

0 comments on commit 20403c2

Please sign in to comment.