# HG changeset patch # User haftmann # Date 1205481171 -3600 # Node ID 35ae83ca190a792606118b6d1809e9ade3ef26cc # Parent 4b63b9e9b10dbf1efb0f20a553b5c64121a039ce tuned diff -r 4b63b9e9b10d -r 35ae83ca190a src/HOL/Library/State_Monad.thy --- a/src/HOL/Library/State_Monad.thy Wed Mar 12 19:38:14 2008 +0100 +++ b/src/HOL/Library/State_Monad.thy Fri Mar 14 08:52:51 2008 +0100 @@ -29,37 +29,29 @@ subsection {* State transformations and combinators *} -(*<*) -typedecl \ -typedecl \ -typedecl \ -typedecl \ -typedecl \' -(*>*) - text {* We classify functions operating on states into two categories: \begin{description} \item[transformations] - with type signature @{typ "\ \ \'"}, + with type signature @{text "\ \ \'"}, transforming a state. \item[``yielding'' transformations] - with type signature @{typ "\ \ \ \ \'"}, + with type signature @{text "\ \ \ \ \'"}, ``yielding'' a side result while transforming a state. \item[queries] - with type signature @{typ "\ \ \"}, + with type signature @{text "\ \ \"}, computing a result dependent on a state. \end{description} - By convention we write @{typ "\"} for types representing states - and @{typ "\"}, @{typ "\"}, @{typ "\"}, @{text "\"} + By convention we write @{text "\"} for types representing states + and @{text "\"}, @{text "\"}, @{text "\"}, @{text "\"} for types representing side results. Type changes due to transformations are not excluded in our scenario. - We aim to assert that values of any state type @{typ "\"} + We aim to assert that values of any state type @{text "\"} are used in a single-threaded way: after application - of a transformation on a value of type @{typ "\"}, the + of a transformation on a value of type @{text "\"}, the former value should not be used again. To achieve this, we use a set of monad combinators: *}