Commit 57f3b043 authored by Oleg Grenrus's avatar Oleg Grenrus

Add since 3.4.0.0 annotations

parent 5ee43c8f
......@@ -32,6 +32,7 @@ runDList (DList run) = run []
singleton :: a -> DList a
singleton a = DList (a:)
-- | @since 3.4.0.0
empty :: DList a
empty = DList id
......
......@@ -39,6 +39,7 @@ import Control.Applicative (empty)
import Control.Monad (fail)
#endif
-- | @since 3.4.0.0
newtype NonEmptySet a = NES (Set.Set a)
deriving (Eq, Ord, Typeable, Data, Read)
......
......@@ -364,6 +364,8 @@ toPackageIndex verbosity pkgss progdb = do
ghcProg = fromMaybe (error "GHC.toPackageIndex: no ghc program") $ lookupProgram ghcProgram progdb
-- | Return the 'FilePath' to the GHC application data directory.
--
-- @since 3.4.0.0
getGhcAppDir :: IO FilePath
getGhcAppDir = getAppUserDataDirectory "ghc"
......
......@@ -166,6 +166,8 @@ versionGuardMultilibs = do
]
-- | Library set with main library.
--
-- @since 3.4.0.0
mainLibSet :: NonEmptySet LibraryName
mainLibSet = NES.singleton LMainLibName
......
......@@ -79,6 +79,8 @@ versionGuardMultilibs = do
]
-- | Smart constructor of 'Mixin', enforces invariant.
--
-- @since 3.4.0.0
mkMixin :: PackageName -> LibraryName -> IncludeRenaming -> Mixin
mkMixin pn (LSubLibName uqn) incl
| packageNameToUnqualComponentName pn == uqn
......
......@@ -63,11 +63,12 @@ instance Parsec PackageVersionConstraint where
else
pure (PackageVersionConstraint name (thisVersion ver))
-- | @since 3.4.0.0
thisPackageVersionConstraint :: PackageIdentifier -> PackageVersionConstraint
thisPackageVersionConstraint (PackageIdentifier pn vr) =
PackageVersionConstraint pn (thisVersion vr)
-- | @since 3.4.0.0
simplifyPackageVersionConstraint :: PackageVersionConstraint -> PackageVersionConstraint
simplifyPackageVersionConstraint (PackageVersionConstraint pn vr) =
PackageVersionConstraint pn (simplifyVersionRange vr)
......@@ -125,7 +125,8 @@ instance NFData RepoKind where rnf = genericRnf
-- obtain and track the repo depend on the repo type.
--
data KnownRepoType = Darcs | Git | SVN | CVS
| Mercurial | GnuArch | Bazaar | Monotone | Pijul
| Mercurial | GnuArch | Bazaar | Monotone
| Pijul -- ^ @since 3.4.0.0
deriving (Eq, Generic, Ord, Read, Show, Typeable, Data, Enum, Bounded)
instance Binary KnownRepoType
......
......@@ -279,10 +279,14 @@ verboseNoTimestamp :: Verbosity -> Verbosity
verboseNoTimestamp = verboseNoFlag VTimestamp
-- | Turn on timestamps for log messages.
--
-- @since 3.4.0.0
verboseStderr :: Verbosity -> Verbosity
verboseStderr = verboseFlag VStderr
-- | Turn off timestamps for log messages.
--
-- @since 3.4.0.0
verboseNoStderr :: Verbosity -> Verbosity
verboseNoStderr = verboseNoFlag VStderr
......@@ -326,6 +330,8 @@ isVerboseTimestamp :: Verbosity -> Bool
isVerboseTimestamp = isVerboseFlag VTimestamp
-- | Test if we should output to stderr when we log.
--
-- @since 3.4.0.0
isVerboseStderr :: Verbosity -> Bool
isVerboseStderr = isVerboseFlag VStderr
......
......@@ -20,7 +20,7 @@ data VerbosityFlag
| VNoWrap
| VMarkOutput
| VTimestamp
| VStderr
| VStderr -- ^ @since 3.4.0.0
deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable)
instance Binary VerbosityFlag
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment