diff --git a/docs/ProgrammingCryptol.pdf b/docs/ProgrammingCryptol.pdf index 46f607f03..3e4a73a02 100644 Binary files a/docs/ProgrammingCryptol.pdf and b/docs/ProgrammingCryptol.pdf differ diff --git a/docs/Semantics.pdf b/docs/Semantics.pdf index ff1215679..b898fad01 100644 Binary files a/docs/Semantics.pdf and b/docs/Semantics.pdf differ diff --git a/src/Cryptol/Eval/Reference.lhs b/src/Cryptol/Eval/Reference.lhs index 279cce4ac..022a1e663 100644 --- a/src/Cryptol/Eval/Reference.lhs +++ b/src/Cryptol/Eval/Reference.lhs @@ -251,7 +251,7 @@ and type variables that are in scope at any point. > instance Semigroup Env where > l <> r = Env > { envVars = envVars l <> envVars r -> , envTypes = envTypes l <> envTypes r +> , envTypes = envTypes l <> envTypes r > } > > instance Monoid Env where @@ -523,7 +523,7 @@ newtypes is thus basically just an identity function that consumes and ignores its type arguments. > evalNewtypeDecl :: Env -> Newtype -> Env -> evalNewtypeDecl env nt = bindVar (ntName nt, pure val) env +> evalNewtypeDecl env nt = bindVar (ntName nt, pure val) env > where > val = foldr tabs con (ntParams nt) > con = VFun (\x -> x) @@ -1732,7 +1732,7 @@ running the reference evaluator on an expression. > evaluate expr minp = return (Right (val, modEnv), []) > where > modEnv = M.minpModuleEnv minp -> extDgs = concatMap mDecls (M.loadedModules modEnv) +> extDgs = concatMap mDecls (M.loadedModules modEnv) ++ M.deDecls (M.meDynEnv modEnv) > nts = Map.elems (M.loadedNewtypes modEnv) > env = foldl evalDeclGroup (foldl evalNewtypeDecl mempty nts) extDgs > val = evalExpr env expr diff --git a/tests/issues/issue1133.icry b/tests/issues/issue1133.icry new file mode 100644 index 000000000..1a4415fb1 --- /dev/null +++ b/tests/issues/issue1133.icry @@ -0,0 +1,3 @@ +let x = zero:[8] +x@0 +:eval x@0 diff --git a/tests/issues/issue1133.icry.stdout b/tests/issues/issue1133.icry.stdout new file mode 100644 index 000000000..9824643c0 --- /dev/null +++ b/tests/issues/issue1133.icry.stdout @@ -0,0 +1,3 @@ +Loading module Cryptol +False +False