From 819adca5f17b40ee129e4a30edf685f817febbf9 Mon Sep 17 00:00:00 2001 From: ross Date: Sat, 5 Feb 2005 00:41:37 +0000 Subject: [PATCH] [project @ 2005-02-05 00:41:35 by ross] more Haddock fixes. Now the only dangling links are in System.Directory, referring to the hidden module GHC.IOBase for constructors of IOException. --- Control/Exception.hs | 17 ----------------- Data/Version.hs | 4 ++-- GHC/Base.lhs | 13 ++++++++++++- System/Directory.hs | 2 +- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/Control/Exception.hs b/Control/Exception.hs index 7551e25..cb4ba3e 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -467,23 +467,6 @@ Similar arguments apply for other interruptible operations like 'System.IO.openFile'. -} --- ----------------------------------------------------------------------------- --- Assert - -#ifdef __HADDOCK__ --- | If the first argument evaluates to 'True', then the result is the --- second argument. Otherwise an 'AssertionFailed' exception is raised, --- containing a 'String' with the source file and line number of the --- call to assert. --- --- Assertions can normally be turned on or off with a compiler flag --- (for GHC, assertions are normally on unless the @-fignore-asserts@ --- option is give). When assertions are turned off, the first --- argument to 'assert' is ignored, and the second argument is --- returned as the result. -assert :: Bool -> a -> a -#endif - #ifndef __GLASGOW_HASKELL__ assert :: Bool -> a -> a assert True x = x diff --git a/Data/Version.hs b/Data/Version.hs index 8aa5bb1..c52d21c 100644 --- a/Data/Version.hs +++ b/Data/Version.hs @@ -66,7 +66,7 @@ ordering on the 'versionBranch' fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases -which have tags @"pre1"@, @"pre2"@, and so on, and these would need to +which have tags @\"pre1\"@, @\"pre2\"@, and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for @date@ tags in the 'versionTags' field and compare those. @@ -131,7 +131,7 @@ instance Ord Version where -- | Provides one possible concrete representation for 'Version'. For -- a version with 'versionBranch' @= [1,2,3]@ and 'versionTags' --- @= ["tag1","tag2"]@, the output will be @1.2.3-tag1-tag2@. +-- @= [\"tag1\",\"tag2\"]@, the output will be @1.2.3-tag1-tag2@. -- showVersion :: Version -> String showVersion (Version branch tags) diff --git a/GHC/Base.lhs b/GHC/Base.lhs index bf37476..e07e210 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -672,9 +672,20 @@ id x = x lazy :: a -> a lazy x = x --- | Assertion function. This simply ignores its boolean argument. +-- Assertion function. This simply ignores its boolean argument. -- The compiler may rewrite it to @('assertError' line)@. +-- | If the first argument evaluates to 'True', then the result is the +-- second argument. Otherwise an 'AssertionFailed' exception is raised, +-- containing a 'String' with the source file and line number of the +-- call to 'assert'. +-- +-- Assertions can normally be turned on or off with a compiler flag +-- (for GHC, assertions are normally on unless the @-fignore-asserts@ +-- option is given). When assertions are turned off, the first +-- argument to 'assert' is ignored, and the second argument is +-- returned as the result. + -- SLPJ: in 5.04 etc 'assert' is in GHC.Prim, -- but from Template Haskell onwards it's simply -- defined here in Base.lhs diff --git a/System/Directory.hs b/System/Directory.hs index a7839ea..295d3a5 100644 --- a/System/Directory.hs +++ b/System/Directory.hs @@ -519,7 +519,7 @@ copyFile fromFPath toFPath = -- canonicalized path, with the intent that two paths referring -- to the same file\/directory will map to the same canonicalized -- path. Note that it is impossible to guarantee that the --- implication (same file\/dir <=> same canonicalizedPath) holds +-- implication (same file\/dir \<=\> same canonicalizedPath) holds -- in either direction: this function can make only a best-effort -- attempt. canonicalizePath :: FilePath -> IO FilePath -- 1.7.10.4