Skip to content

Commit 6967f67

Browse files
committed
refactor: lift
1 parent 4faf1d0 commit 6967f67

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/hls-explicit-record-fields-plugin/src/Ide/Plugin/ExplicitFields.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import Data.Text (Text)
2525
import Data.Unique (hashUnique, newUnique)
2626

2727
import Control.Monad (replicateM)
28+
import Control.Monad.Trans.Except (except)
2829
import Data.Aeson (ToJSON (toJSON))
2930
import Data.List (find, intersperse)
3031
import qualified Data.Text as T
@@ -106,8 +107,8 @@ import Language.LSP.Protocol.Types (CodeAction (..),
106107
WorkspaceEdit (WorkspaceEdit),
107108
type (|?) (InL, InR))
108109

109-
110110
#if __GLASGOW_HASKELL__ < 910
111+
import Control.Monad.Trans.Class (lift)
111112
import Development.IDE.GHC.Compat (HsExpansion (HsExpanded))
112113
#endif
113114

@@ -189,7 +190,7 @@ inlayHintProvider _ state pId InlayHintParams {_textDocument = TextDocumentIdent
189190
locations = [ getDefinition nfp pos
190191
| record <- records
191192
, pos <- maybeToList $ fmap _start $ recordInfoToDotDotRange record ]
192-
defnLocsList <- liftIO $ Shake.runIdeAction "ExplicitFields.getDefinition" (shakeExtras state) (sequence locations)
193+
defnLocsList <- lift $ sequence locations
193194
pure $ InL $ mapMaybe (mkInlayHints crr pragma) (zip defnLocsList records)
194195
where
195196
mkInlayHints :: CollectRecordsResult -> NextPragmaInfo -> (Maybe [(Location, Identifier)], RecordInfo) -> Maybe InlayHint

0 commit comments

Comments
 (0)