Skip to content

Commit

Permalink
🐛 Fix tutorials on older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
lsrcz committed Aug 14, 2024
1 parent 14976b5 commit 6230e72
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 11 additions & 3 deletions tutorials/2_union.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@
"synthesisRewriteTarget expr sketch = do\n",
" let lhs = eval expr\n",
" let rhs = eval .# sketch\n",
" r <- cegisForAll (precise z3) expr $ cegisPostCond $ lhs .== rhs\n",
" r <- cegisForAll z3 expr $ cegisPostCond $ lhs .== rhs\n",
" case r of\n",
" (_, CEGISSuccess model) -> do\n",
" putStrLn \"Successfully synthesized RHS:\"\n",
Expand Down Expand Up @@ -917,7 +917,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 19,
"id": "1b96410a-87c1-4437-8533-d191b8b3910b",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -959,6 +959,7 @@
".hoogle-class {\n",
"font-weight: bold;\n",
"}\n",
"\n",
".get-type {\n",
"color: green;\n",
"font-weight: bold;\n",
Expand Down Expand Up @@ -990,10 +991,12 @@
".err-msg.in.collapse {\n",
"padding-top: 0.7em;\n",
"}\n",
"\n",
".highlight-code {\n",
"white-space: pre;\n",
"font-family: monospace;\n",
"}\n",
"\n",
".suggestion-warning { \n",
"font-weight: bold;\n",
"color: rgb(200, 130, 0);\n",
Expand All @@ -1005,6 +1008,7 @@
".suggestion-name {\n",
"font-weight: bold;\n",
"}\n",
"\n",
"</style><span class='get-type'>return :: forall (m :: * -> *) a. Monad m => a -> m a</span>"
],
"text/plain": [
Expand Down Expand Up @@ -1052,6 +1056,7 @@
".hoogle-class {\n",
"font-weight: bold;\n",
"}\n",
"\n",
".get-type {\n",
"color: green;\n",
"font-weight: bold;\n",
Expand Down Expand Up @@ -1083,10 +1088,12 @@
".err-msg.in.collapse {\n",
"padding-top: 0.7em;\n",
"}\n",
"\n",
".highlight-code {\n",
"white-space: pre;\n",
"font-family: monospace;\n",
"}\n",
"\n",
".suggestion-warning { \n",
"font-weight: bold;\n",
"color: rgb(200, 130, 0);\n",
Expand All @@ -1098,6 +1105,7 @@
".suggestion-name {\n",
"font-weight: bold;\n",
"}\n",
"\n",
"</style><span class='get-type'>mrgReturn :: forall (u :: * -> *) a. (MonadTryMerge u, Mergeable a) => a -> u a</span>"
],
"text/plain": [
Expand Down Expand Up @@ -1196,7 +1204,7 @@
"mimetype": "text/x-haskell",
"name": "haskell",
"pygments_lexer": "Haskell",
"version": "9.6.5"
"version": "9.8.2"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions tutorials/3_monad_transformer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@
" Assign \"res\" (mrgDiv (mrgI \"b\") (mrgVar \"a\"))\n",
" ]\n",
"\n",
"solve (precise z3) $ simpleMerge $ do\n",
"solve z3 $ simpleMerge $ do\n",
" res <- runExceptT $ runProg [] prog\n",
" case res of\n",
" Left DivisionError -> mrgReturn $ con True\n",
Expand Down Expand Up @@ -948,7 +948,7 @@
" Assign \"res\" (mrgDiv (mrgI \"b\") (mrgVar \"a\"))\n",
" ]\n",
"\n",
"solveExcept (precise z3) expectedPath $ runProg [] prog1"
"solveExcept z3 expectedPath $ runProg [] prog1"
]
},
{
Expand Down Expand Up @@ -985,7 +985,7 @@
"mimetype": "text/x-haskell",
"name": "haskell",
"pygments_lexer": "Haskell",
"version": "9.6.5"
"version": "9.8.2"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 6230e72

Please sign in to comment.