[project @ 2005-02-01 13:02:37 by simonmar]
[ghc-base.git] / Control / Monad.hs
index 734aae4..07b4d3b 100644 (file)
@@ -1,4 +1,4 @@
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -fno-implicit-prelude #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.Monad
@@ -173,7 +173,9 @@ function' are not commutative.
 
 
 >      foldM f a1 [x1, x2, ..., xm ]
+
 ==  
+
 >      do
 >        a2 <- f a1 x1
 >        a3 <- f a2 x2
@@ -252,20 +254,20 @@ ap                =  liftM2 id
 
 The functions in this library use the following naming conventions: 
 
-* A postfix `M' always stands for a function in the Kleisli category:
+* A postfix \`M\' always stands for a function in the Kleisli category:
   @m@ is added to function results (modulo currying) and nowhere else.
   So, for example, 
 
 >  filter  ::              (a ->   Bool) -> [a] ->   [a]
 >  filterM :: (Monad m) => (a -> m Bool) -> [a] -> m [a]
 
-* A postfix `_' changes the result type from @(m a)@ to @(m ())@.
+* A postfix \`_\' changes the result type from @(m a)@ to @(m ())@.
   Thus (in the "Prelude"): 
 
 >  sequence  :: Monad m => [m a] -> m [a] 
 >  sequence_ :: Monad m => [m a] -> m () 
 
-* A prefix `m' generalises an existing function to a monadic form.
+* A prefix \`m\' generalises an existing function to a monadic form.
   Thus, for example: 
 
 >  sum  :: Num a       => [a]   -> a