Skip to content

Commit ef8fab5

Browse files
author
Philipp Middendorf
committed
💡 Finish haddock
1 parent a58f31f commit ef8fab5

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

src/NixManager/Admin/ValidRebuildModes.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import Data.Text ( Text )
2929
descriptionForValidRebuildMode :: NixRebuildMode -> Maybe Text
3030
descriptionForValidRebuildMode m = lookup m validRebuildModesWithDescription
3131

32+
-- | List of all valid rebuild modes with a description
3233
validRebuildModesWithDescription :: [(NixRebuildMode, Text)]
3334
validRebuildModesWithDescription =
3435
[ ( NixRebuildSwitch

src/NixManager/NixPackageMeta.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ import Data.Aeson ( FromJSON
2020
, (.:)
2121
)
2222

23+
-- | Metadata for a Nix package. This is a companion module to "NixManager.NixPackage"
2324
data NixPackageMeta = NixPackageMeta {
24-
_npmName :: Text
25-
, _npmVersion :: Text
26-
, _npmDescription :: Text
25+
_npmName :: Text -- ^ Package name
26+
, _npmVersion :: Text -- ^ Package version
27+
, _npmDescription :: Text -- ^ Package description
2728
} deriving(Eq,Show)
2829

2930
makeLenses ''NixPackageMeta

src/NixManager/PosixTools.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
{-|
2+
Description: Bash expressions for some POSIX tools
3+
4+
Bash expressions for some POSIX tools
5+
-}
16
{-# LANGUAGE OverloadedStrings #-}
27
module NixManager.PosixTools
38
( mkdir
@@ -23,16 +28,20 @@ import Data.Text ( Text
2328
)
2429
import Data.List.NonEmpty ( NonEmpty )
2530

31+
-- | Wrapper for @mkdir@ (first parameter specifies recursion)
2632
mkdir :: Bool -> NonEmpty FilePath -> Expr
2733
mkdir recursive paths = Command
2834
"mkdir"
2935
(mwhen recursive ["-p"] <> toList (LiteralArg . pack <$> paths))
3036

37+
-- | Wrapper for @cp@
3138
cp :: FilePath -> FilePath -> Expr
3239
cp from to = Command "cp" (LiteralArg <$> [pack from, pack to])
3340

41+
-- | Wrapper for @mv@
3442
mv :: FilePath -> FilePath -> Expr
3543
mv from to = Command "mv" (LiteralArg <$> [pack from, pack to])
3644

45+
-- | Wrapper for @kill@ (currently only @-9@)
3746
kill :: Pid -> Expr
3847
kill pid = Command "kill" ["-9", RawArg (showText pid)]

src/NixManager/Util.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import qualified Data.Text.Encoding as Encoding
4444
-- | Since we’re working with 'Text' as much as possible, we’re using a text based error type instead of the customary 'Either String'
4545
type TextualError = Either Text
4646

47-
-- | Convert something showable to 'Text'. Notably 'String' and 'Exception' types.
47+
-- | Convert something showable to 'Text'. Notably 'String' and @Exception@ types.
4848
fromShowableError :: Show ex => Either ex e -> TextualError e
4949
fromShowableError = first showText
5050

src/NixManager/View/ComboBox.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ data ComboBoxProperties = ComboBoxProperties {
5353

5454
makeLenses ''ComboBoxProperties
5555

56-
-- ^ Triggered when the combobox changes its value to a new index
56+
-- | Triggered when the combobox changes its value to a new index
5757
newtype ComboBoxChangeEvent = ComboBoxChangeEvent Int
5858

59-
-- ^ Build a Combobox from Gtk attributes and some user-defined ones
59+
-- | Build a Combobox from Gtk attributes and some user-defined ones
6060
comboBox
6161
:: Vector (Attribute Gtk.ComboBoxText ComboBoxChangeEvent)
6262
-> ComboBoxProperties

src/NixManager/View/Css.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Data.ByteString ( ByteString )
1010
import qualified GI.Gdk as Gdk
1111
import qualified GI.Gtk as Gtk
1212

13-
13+
-- | Global app Stylesheet
1414
styles :: ByteString
1515
styles = mconcat
1616
[ ".package-row-installed { background-color: #cdffcd; }"
@@ -30,6 +30,7 @@ styles = mconcat
3030
, ".nixos-manager-grey-background { background-color: #eeeeee; }"
3131
]
3232

33+
-- | Initialize CSS stylesheets
3334
initCss :: IO ()
3435
initCss = do
3536
cssProvider <- Gtk.cssProviderNew

0 commit comments

Comments
 (0)