File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
ghcide/src/Development/IDE/Plugin/CodeAction Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 2
2
{-# LANGUAGE FlexibleInstances #-}
3
3
{-# LANGUAGE TemplateHaskell #-}
4
4
5
- module Development.IDE.Plugin.CodeAction.Args where
5
+ module Development.IDE.Plugin.CodeAction.Args (
6
+ module Development.IDE.Plugin.CodeAction.Args ,
7
+ ) where
6
8
7
9
import Control.Lens (alaf )
8
10
import Data.Bifunctor (second )
@@ -72,14 +74,14 @@ instance ToCodeAction r => ToCodeAction (ParsedSource -> r) where
72
74
73
75
instance ToCodeAction [(T. Text , [TextEdit |? Rewrite ])] where
74
76
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 = []
83
85
84
86
-- generates instances of 'ToCodeAction',
85
87
-- where the pattern is @instance ToCodeAction r => ToCodeAction (field -> r)@, for each field of 'CodeActionArgs'.
You can’t perform that action at this time.
0 commit comments