Skip to content

Commit 19c61cc

Browse files
committed
HLint
1 parent f7980c3 commit 19c61cc

File tree

1 file changed

+11
-9
lines changed
  • ghcide/src/Development/IDE/Plugin/CodeAction

1 file changed

+11
-9
lines changed

ghcide/src/Development/IDE/Plugin/CodeAction/Args.hs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
{-# LANGUAGE FlexibleInstances #-}
33
{-# LANGUAGE TemplateHaskell #-}
44

5-
module Development.IDE.Plugin.CodeAction.Args where
5+
module Development.IDE.Plugin.CodeAction.Args (
6+
module Development.IDE.Plugin.CodeAction.Args,
7+
) where
68

79
import Control.Lens (alaf)
810
import Data.Bifunctor (second)
@@ -72,14 +74,14 @@ instance ToCodeAction r => ToCodeAction (ParsedSource -> r) where
7274

7375
instance ToCodeAction [(T.Text, [TextEdit |? Rewrite])] where
7476
toCodeAction CodeActionArgs{..} r = second (concatMap go) <$> r
75-
where
76-
go (InL te) = [te]
77-
go (InR rw)
78-
| Just df <- caaDf,
79-
Just ps <- caaAnnSource,
80-
Right x <- rewriteToEdit df (annsA ps) rw
81-
= x
82-
| otherwise = []
77+
where
78+
go (InL te) = [te]
79+
go (InR rw)
80+
| Just df <- caaDf
81+
, Just ps <- caaAnnSource
82+
, Right x <- rewriteToEdit df (annsA ps) rw =
83+
x
84+
| otherwise = []
8385

8486
-- generates instances of 'ToCodeAction',
8587
-- where the pattern is @instance ToCodeAction r => ToCodeAction (field -> r)@, for each field of 'CodeActionArgs'.

0 commit comments

Comments
 (0)