[project @ 2005-02-24 09:58:23 by simonmar]
authorsimonmar <unknown>
Thu, 24 Feb 2005 09:58:24 +0000 (09:58 +0000)
committersimonmar <unknown>
Thu, 24 Feb 2005 09:58:24 +0000 (09:58 +0000)
nDoc fixes from Sven Panne.  Generally fixing of Haddock links, adding
some signatures, and in some cases exporting type constructors that
are mentioned in the types of exported identifiers.

Control/Parallel/Strategies.hs
Text/Printf.hs

index 294239b..ce3f7b0 100644 (file)
@@ -362,8 +362,8 @@ parListN 0 strat xs     = ()
 parListN n strat (x:xs) = strat x `par` (parListN (n-1) strat xs)
 
 -- | Evaluates N elements of the spine of the argument list and applies
--- `strat' to the Nth element (if there is one) in parallel with the
--- result. e.g. parListNth 2 [e1, e2, e3] evaluates e2
+-- the given strategy to the Nth element (if there is one) in parallel with
+-- the result. e.g. parListNth 2 [e1, e2, e3] evaluates e2
 parListNth :: Int -> Strategy a -> Strategy [a]
 parListNth n strat xs 
   | null rest = ()
@@ -379,13 +379,14 @@ parListChunk n strat xs = seqListN n strat xs `par`
                            parListChunk n strat (drop n xs)
 
 -- | 'parMap' applies a function to each element of the argument list in
--- parallel.  The result of the function is evaluated using `strat'
+-- parallel.  The result of the function is evaluated using the given
+-- strategy.
 parMap :: Strategy b -> (a -> b) -> [a] -> [b]
 parMap strat f xs      = map f xs `using` parList strat
 
 -- | 'parFlatMap' uses 'parMap' to apply a list-valued function to each
 -- element of the argument list in parallel.  The result of the function
--- is evaluated using `strat'
+-- is evaluated using the given strategy.
 parFlatMap :: Strategy [b] -> (a -> [b]) -> [a] -> [b]
 parFlatMap strat f xs = concat (parMap strat f xs)
 
@@ -420,7 +421,7 @@ seqListNth n strat xs
     rest = drop n xs
 
 -- | Parallel n-buffer function added for the revised version of the strategies
--- paper. 'parBuffer' supersedes the older 'fringeList'. It has the same
+-- paper. 'parBuffer' supersedes the older @fringeList@. It has the same
 -- semantics.
 parBuffer :: Int -> Strategy a -> [a] -> [a]
 parBuffer n s xs = 
index 69bc7cd..ee0b51c 100644 (file)
 --
 -----------------------------------------------------------------------------
 
-module Text.Printf(printf, hPrintf) where
+module Text.Printf(
+   printf, hPrintf,
+   PrintfType, HPrintfType, PrintfArg, IsChar
+) where
 
 import Prelude
 import Data.Array
@@ -23,7 +26,7 @@ import System.IO
 -------------------
 
 -- | Format a variable number of arguments with the C-style formatting string.
--- The return value is either 'String' or @(IO a)@.
+-- The return value is either 'String' or @('IO' a)@.
 --
 -- The format string consists of ordinary characters and /conversion
 -- specifications/, which specify how to format one of the arguments
@@ -54,13 +57,6 @@ import System.IO
 -- >    e      exponent format float   Float, Double
 -- >    s      string                  String
 --
--- The @PrintfType@ class provides the variable argument magic for
--- 'printf'.  Its implementation is intentionally not visible from
--- this module.  The following argument types are supported: Char, String, 
--- Int, Integer, Float, Double.  If you attempt to pass an argument of a
--- different type to 'printf', then the compiler will report it as a
--- missing instance of @PrintfArg@.
---
 -- Mismatch between the argument types and the format string will cause
 -- an exception to be thrown at runtime.
 --
@@ -77,14 +73,19 @@ printf :: (PrintfType r) => String -> r
 printf fmt = spr fmt []
 
 -- | Similar to 'printf', except that output is via the specified
--- 'Handle'.  The return type is restricted to @(IO a)@.
+-- 'Handle'.  The return type is restricted to @('IO' a)@.
 hPrintf :: (HPrintfType r) => Handle -> String -> r
 hPrintf hdl fmt = hspr hdl fmt []
 
+-- |The 'PrintfType' class provides the variable argument magic for
+-- 'printf'.  Its implementation is intentionally not visible from
+-- this module. If you attempt to pass an argument of a type which
+-- is not an instance of this class to 'printf' or 'hPrintf', then
+-- the compiler will report it as a missing instance of 'PrintfArg'.
 class PrintfType t where
     spr :: String -> [UPrintf] -> t
 
--- | The @HPrintfType@ class provides the variable argument magic for
+-- | The 'HPrintfType' class provides the variable argument magic for
 -- 'hPrintf'.  Its implementation is intentionally not visible from
 -- this module.
 class HPrintfType t where