summaryrefslogtreecommitdiff
path: root/lib/isabelle/Prompt_monad_lemmas.thy
diff options
context:
space:
mode:
authorThomas Bauereiss2018-03-21 19:54:28 +0000
committerThomas Bauereiss2018-03-22 13:48:29 +0000
commit5c1754d3a8170167c58c876be36d451c7607fb2c (patch)
tree4883fc0d8fda864cf9ddd3bf50699b55ec270e5f /lib/isabelle/Prompt_monad_lemmas.thy
parent2dcd2d7b77c2c0759791d92114a844b9990d0820 (diff)
Tune Lem pretty-printing
In particular, improve indentation of if-expressions, and provide infix syntax for monadic binds in Isabelle, allowing Lem to preserve source whitespace.
Diffstat (limited to 'lib/isabelle/Prompt_monad_lemmas.thy')
-rw-r--r--lib/isabelle/Prompt_monad_lemmas.thy5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/isabelle/Prompt_monad_lemmas.thy b/lib/isabelle/Prompt_monad_lemmas.thy
index 56aa6e87..84f3333e 100644
--- a/lib/isabelle/Prompt_monad_lemmas.thy
+++ b/lib/isabelle/Prompt_monad_lemmas.thy
@@ -4,6 +4,11 @@ theory Prompt_monad_lemmas
Sail_values_lemmas
begin
+notation bind (infixr "\<bind>" 54)
+
+abbreviation seq :: "('rv,unit,'e)monad \<Rightarrow> ('rv,'b,'e)monad \<Rightarrow>('rv,'b,'e)monad" (infixr "\<then>" 54) where
+ "m \<then> n \<equiv> m \<bind> (\<lambda>_. n)"
+
lemma All_bind_dom: "bind_dom (m, f)"
by (induction m) (auto intro: bind.domintros)