Commit 417ab39c authored by Iustin Pop's avatar Iustin Pop
Browse files

A few more hlint fixes



I'm ignoring the use of Control.Arrow.*** since it's a non-obvious
function, and we're not widely using Arrows in the code base, so I
think switching to it would make the code less readable to most
people.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 5ef4fbb1
......@@ -197,7 +197,7 @@ genNodeNames = resize maxNodes (listOf getFQDN)
-- | Generates a list of node names in non-empty string type.
genNodeNamesNE :: Gen [NonEmptyString]
genNodeNamesNE = genNodeNames >>= mapM (mkNonEmpty)
genNodeNamesNE = genNodeNames >>= mapM mkNonEmpty
-- | Gets a node name in non-empty type.
genNodeNameNE :: Gen NonEmptyString
......
......@@ -202,6 +202,7 @@ readContainer obj = do
return (k', v')) kjvlist
return $ GenericContainer (Map.fromList kalist)
{-# ANN showContainer "HLint: ignore Use ***" #-}
-- | Container dumper.
showContainer :: (HasStringRepr a, J.JSON b) =>
GenericContainer a b -> J.JSValue
......
......@@ -345,14 +345,14 @@ pGroupName = simpleField "group_name" [t| NonEmptyString |]
-- | Migration type (live\/non-live).
pMigrationMode :: Field
pMigrationMode =
renameField "MigrationMode" $
renameField "MigrationMode" .
optionalField $
simpleField "mode" [t| MigrationMode |]
-- | Obsolete \'live\' migration mode (boolean).
pMigrationLive :: Field
pMigrationLive =
renameField "OldLiveMode" $ optionalField $ booleanField "live"
renameField "OldLiveMode" . optionalField $ booleanField "live"
-- | Whether to force an unknown OS variant.
pForceVariant :: Field
......@@ -440,7 +440,7 @@ pIgnoreErrors = defaultField [| Set.empty |] $
-- | Optional group name.
pOptGroupName :: Field
pOptGroupName = renameField "OptGroupName" $
pOptGroupName = renameField "OptGroupName" .
optionalField $ simpleField "group_name" [t| NonEmptyString |]
-- | Disk templates' parameter defaults.
......
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