# HG changeset patch # User huffman # Date 1131233724 -3600 # Node ID 574aa0487069dcf342163f0134f5ffc1ade5b657 # Parent 4328356ab7e67e53a72483dce320ccf3f6da98d2 use consts for infix syntax diff -r 4328356ab7e6 -r 574aa0487069 src/HOLCF/Fixrec.thy --- a/src/HOLCF/Fixrec.thy Sun Nov 06 00:22:03 2005 +0100 +++ b/src/HOLCF/Fixrec.thy Sun Nov 06 00:35:24 2005 +0100 @@ -33,15 +33,10 @@ subsection {* Monadic bind operator *} -constdefs - bind :: "'a maybe \ ('a \ 'b maybe) \ 'b maybe" - "bind \ \ m f. sscase\sinl\(fup\f)\m" - -syntax - "_bind" :: "'a maybe \ ('a \ 'b maybe) \ 'b maybe" - ("(_ >>= _)" [50, 51] 50) - -translations "m >>= k" == "bind\m\k" +consts + bind :: "'a maybe \ ('a \ 'b maybe) \ 'b maybe" (infixl ">>=" 50) +defs + bind_def: "bind \ \ m f. sscase\sinl\(fup\f)\m" nonterminals maybebind maybebinds @@ -95,12 +90,10 @@ subsection {* Monad plus operator *} -constdefs - mplus :: "'a maybe \ 'a maybe \ 'a maybe" - "mplus \ \ m1 m2. sscase\(\ x. m2)\(fup\return)\m1" - -syntax "+++" :: "'a maybe \ 'a maybe \ 'a maybe" (infixr 65) -translations "x +++ y" == "mplus\x\y" +consts + mplus :: "'a maybe \ 'a maybe \ 'a maybe" (infixr "+++" 65) +defs + mplus_def: "mplus \ \ m1 m2. sscase\(\ x. m2)\(fup\return)\m1" text {* rewrite rules for mplus *}