Skip to content

Commit

Permalink
Improve code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Jun 1, 2024
1 parent 24dac22 commit ff461b5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tasklite-core/source/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ The default config primarily defines the styling and formatting
-}
module Config where

import Protolude as P (
import Protolude (
Applicative (pure),
Char,
Eq ((==)),
FilePath,
Foldable (foldl),
Functor (fmap),
Generic,
Int,
Expand All @@ -25,6 +24,7 @@ import Protolude as P (
(&),
(.),
)
import Protolude qualified as P

import Data.Aeson (
FromJSON (parseJSON),
Expand Down Expand Up @@ -143,7 +143,7 @@ defaultHooksConfig =


addHookFilesToConfig :: Config -> [(FilePath, b, Text)] -> Config
addHookFilesToConfig =
addHookFilesToConfig = do
let
buildHook :: FilePath -> Text -> Hook
buildHook filePath content =
Expand Down Expand Up @@ -189,19 +189,19 @@ addHookFilesToConfig =
{ exit = addToHookSet hook stage (hConfig & exit)
}
_ -> hConfig
in
P.foldl $ \conf (filePath, _, fileContent) ->
case split (== '-') $ pack $ takeBaseName filePath of
[stage, event] ->
conf
{ hooks =
addToHooksConfig
event
stage
(buildHook filePath fileContent)
conf.hooks
}
_ -> conf

P.foldl $ \conf (filePath, _, fileContent) ->
case split (== '-') $ pack $ takeBaseName filePath of
[stage, event] ->
conf
{ hooks =
addToHooksConfig
event
stage
(buildHook filePath fileContent)
conf.hooks
}
_ -> conf


data Config = Config
Expand Down

0 comments on commit ff461b5

Please sign in to comment.