Skip to content

Commit 23d4f29

Browse files
committed
HLint suggestions
1 parent 470d3f7 commit 23d4f29

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

benchmarks/RawTasks/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,13 @@ aggSongs (HCons day1 (HCons day2 (HCons day3 HNil))) =
210210
main :: IO ()
211211
main = do
212212

213-
r <- (fetch'
213+
r <- fetch'
214214
(HCons'
215215
(NamedCSVStore "benchmarks/data/jan.csv" :: NamedCSVStore [Listen])
216216
(HCons' (NamedCSVStore "benchmarks/data/feb.csv" :: NamedCSVStore [Listen])
217217
(HCons' (NamedCSVStore "benchmarks/data/mar.csv" :: NamedCSVStore [Listen]) HNil')
218218
)
219219
)
220-
)
221220

222221
defaultMain
223222
[ bgroup

examples/word-count/app/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generateWords
1212
'[[String]]
1313
'[FileStore [String]]
1414
N1
15-
generateWords = functionTask (\_ -> ["apple", "banana", "grapefruit"]) (FileStore "fruit.txt")
15+
generateWords = functionTask (const ["apple", "banana", "grapefruit"]) (FileStore "fruit.txt")
1616

1717
newtype CommaSepFile a = CommaSepFile String
1818

@@ -27,7 +27,7 @@ countLetters
2727
'[FileStore [String]]
2828
N1
2929
countLetters = functionTask (map f) (FileStore "count.txt")
30-
where f word = (concat [word, ":", show (length word)])
30+
where f word = concat [word, ":", show (length word)]
3131

3232
circuit
3333
:: Circuit

src/Pipeline/DataStore.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ newtype FileStore a = FileStore FilePath deriving (Eq, Show, Generic, NFData)
6161
-}
6262
instance DataStore FileStore String where
6363
fetch (FileStore fname) = readFile fname
64-
save (FileStore fname) x = do
65-
writeFile fname x
64+
save (FileStore fname) = writeFile fname
6665
empty taskUUID jobUUID = FileStore <$> createNewFile taskUUID jobUUID ".txt"
6766

6867
{-|

src/Pipeline/Internal/Backend/BasicNetwork.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ taskExecuter (Task f) taskUUID inPipes outPipes = forever
6565
(do
6666
(jobUUID, taskInputs) <- readPipes inPipes
6767
r <-
68-
(runExceptT
68+
runExceptT
6969
(do
7070
outputStore <- lift (empty taskUUID jobUUID)
7171
input <- (ExceptT . return) taskInputs
7272
catchE (intercept (f input outputStore))
7373
(throwE . TaskError . ExceptionMessage . displayException)
7474
return (HCons' outputStore HNil')
7575
)
76-
)
76+
7777
writePipes jobUUID r outPipes
7878
)
7979

@@ -181,7 +181,7 @@ instance BuildNetworkAlg BasicNetwork Map where
181181
(do
182182
(jobUUID, mapInputs) <- readPipes (outputs n)
183183
r <-
184-
(runExceptT
184+
runExceptT
185185
(do
186186
inputs <- (ExceptT . return) mapInputs
187187
HCons inputs' HNil <- (lift . fetch') inputs
@@ -202,7 +202,7 @@ instance BuildNetworkAlg BasicNetwork Map where
202202
lift (save outputStore mapOutput)
203203
return (HCons' outputStore HNil')
204204
)
205-
)
205+
206206
writePipes jobUUID r output
207207
)
208208
stopNetwork mapNetwork

src/Pipeline/Internal/Common/TypeList.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ type family Apply (fs :: [Type -> Type]) (as :: [Type]) where
3232

3333
type family Replicate (n :: Nat) (a :: k) :: [k] where
3434
Replicate 'Zero _ = '[]
35-
Replicate ('Succ n) x = x ': (Replicate n x)
35+
Replicate ('Succ n) x = x ': Replicate n x

0 commit comments

Comments
 (0)