Skip to content

Commit 0ce4c50

Browse files
committed
Add missing Haddock documentation.
1 parent 7468ff0 commit 0ce4c50

File tree

11 files changed

+28
-0
lines changed

11 files changed

+28
-0
lines changed

src/Stack/BuildInfo.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import Stack.Prelude
3737
import Stack.Types.Version ( showStackVersion )
3838
#endif
3939

40+
-- | The output of @stack --version@.
4041
versionString' :: String
4142
#ifdef USE_GIT_INFO
4243
versionString' = concat $ concat

src/Stack/Config/ConfigureScript.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import Stack.DefaultColorWhen ( defaultColorWhen )
1717
import Stack.Prelude
1818
import RIO.Process ( HasProcessContext, withWorkingDir )
1919

20+
-- | For the given directory, yields an action that trys to generate a
21+
-- @configure@ script with @autoreconf@, if one does not exist in the directory.
2022
ensureConfigureScript ::
2123
(HasProcessContext env, HasTerm env)
2224
=> Path b Dir

src/Stack/PackageFile.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ getPackageFile pkg cabalFP =
166166
moreBuildFiles <> packageComponentFile.packageExtraFile
167167
}
168168

169+
-- | For the given contents of a Cabal file, yields the information from it that
170+
-- Stack needs to track files.
169171
stackPackageFileFromCabal :: Cabal.PackageDescription -> StackPackageFile
170172
stackPackageFileFromCabal cabalPkg =
171173
StackPackageFile

src/Stack/Types/AddCommand.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ import Stack.Prelude
1616
import Stack.Types.GlobalOptsMonoid ( GlobalOptsMonoid )
1717
import Stack.Types.Runner ( Runner )
1818

19+
-- | A type synonym for the monad used to add command line commands to Stack.
20+
-- The monad is a stack of an 'ExceptT' @(@t'RIO' 'Runner' @())@ monad on top of
21+
-- a 'Writer' @f@ monad, where @f@ is
22+
-- 'Options.Applicative.Mod' 'Options.Applicative.CommandFields' @(@t'RIO' 'Runner' @(),@ 'GlobalOptsMonoid'@)@ - that
23+
-- is, an option modifier for command options that have return type
24+
-- @(@t'RIO' 'Runner' @(),@ 'GlobalOptsMonoid'@)@.
1925
type AddCommand =
2026
ExceptT (RIO Runner ())
2127
(Writer (OA.Mod OA.CommandFields (RIO Runner (), GlobalOptsMonoid)))

src/Stack/Types/Cache.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ instance PersistField ConfigCacheType where
5454
instance PersistFieldSql ConfigCacheType where
5555
sqlType _ = SqlString
5656

57+
-- | Type representing actions for which the last time the action was performed
58+
-- should be cached.
5759
data Action
5860
= UpgradeCheck
5961
deriving (Eq, Ord, Show)

src/Stack/Types/Config/Exception.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ instance Pretty ConfigPrettyException where
255255

256256
instance Exception ConfigPrettyException
257257

258+
-- | Type representing an exception thrown by functions exported by the
259+
-- "Stack.Config" module.
258260
data ParseAbsolutePathException
259261
= ParseAbsolutePathException String String
260262
deriving (Show, Typeable)

src/Stack/Types/DotConfig.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import Stack.Types.Platform ( HasPlatform (..) )
2424
import Stack.Types.Runner ( HasRunner (..) )
2525
import Stack.Types.SourceMap ( SourceMap (..) )
2626

27+
-- | Type representing configurations for the creation of a dependency graph.
2728
data DotConfig = DotConfig
2829
{ buildConfig :: !BuildConfig
2930
, sourceMap :: !SourceMap

src/Stack/Types/GhcOptionKey.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ import Data.Aeson.Types ( FromJSONKey (..), FromJSONKeyFunction (..) )
1414
import qualified Data.Text as T
1515
import Stack.Prelude
1616

17+
-- | Type representing scopes of the application by Stack of GHC options.
1718
data GhcOptionKey
1819
= GOKOldEverything
20+
-- ^ All packages, project packages or otherwise (specified with legacy
21+
-- syntax).
1922
| GOKEverything
23+
-- ^ All packages, project packages or otherwise.
2024
| GOKLocals
25+
-- ^ All project packages, targets or otherwise.
2126
| GOKTargets
27+
-- ^ All project packages that are targets.
2228
| GOKPackage !PackageName
29+
-- ^ A named package.
2330
deriving (Eq, Ord)
2431

2532
instance FromJSONKey GhcOptionKey where

src/Stack/Types/GhcOptions.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Data.Attoparsec.Args ( EscapingMode (Escaping), parseArgs )
1515
import qualified Data.Text as T
1616
import Stack.Prelude
1717

18+
-- | Type representing lists of GHC options.
1819
newtype GhcOptions = GhcOptions { ghcOptions :: [Text] }
1920

2021
instance FromJSON GhcOptions where

src/Stack/Types/GlobalOpts.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ data GlobalOpts = GlobalOpts
5151
-- available.
5252
}
5353

54+
-- | View or set the @buildOpts@ field of the @configMonoid@ field of a
55+
-- v'GlobalOpts'.
5456
globalOptsBuildOptsMonoidL :: Lens' GlobalOpts BuildOptsMonoid
5557
globalOptsBuildOptsMonoidL =
5658
lens (.configMonoid) (\x y -> x { configMonoid = y })

0 commit comments

Comments
 (0)