Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit c2daf85

Browse files
committed
Corrected unused imports and parameters
1 parent 711776c commit c2daf85

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/Haskell/Ide/Engine/Plugin/Ormolu.hs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
module Haskell.Ide.Engine.Plugin.Ormolu ( ormoluDescriptor ) where
66

7-
import Data.Aeson ( Value ( Null ) )
8-
import Data.Text
9-
import Haskell.Ide.Engine.MonadTypes
10-
117
#if __GLASGOW_HASKELL__ >= 806
128
import Control.Exception
139
import Control.Monad.IO.Class ( liftIO , MonadIO(..) )
10+
import Data.Aeson ( Value ( Null ) )
11+
import Data.Text
12+
import Haskell.Ide.Engine.MonadTypes
1413
import Ormolu
1514
import Ormolu.Config (defaultConfig)
1615
import Ormolu.Exception (OrmoluException)
@@ -34,16 +33,16 @@ ormoluDescriptor plId = PluginDescriptor
3433

3534

3635
provider :: FormattingProvider
37-
provider contents uri typ _opts =
36+
provider _contents _uri typ _opts =
3837
case typ of
3938
#if __GLASGOW_HASKELL__ >= 806
4039
FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null)
41-
FormatText -> pluginGetFile contents uri $ \file -> do
42-
result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack contents))
40+
FormatText -> pluginGetFile _contents _uri $ \file -> do
41+
result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack _contents))
4342
case result of
4443
Left err -> return $ IdeResultFail (IdeError PluginError (pack $ "ormoluCmd: " ++ show err) Null)
45-
Right new -> return $ IdeResultOk [TextEdit (fullRange contents) new]
44+
Right new -> return $ IdeResultOk [TextEdit (fullRange _contents) new]
4645
#else
4746
FormatRange _ -> return $ IdeResultOk []
4847
FormatText -> return $ IdeResultOk []
49-
#endif
48+
#endif

0 commit comments

Comments
 (0)