Skip to content

Commit c40661e

Browse files
committed
Add cabal-add source repository
We need to depend on a newer commit of cabal-add since the newest release does not yet allow us to add modules to a cabal-file. Once there is a new release of cabal-add we can revert this commit.
1 parent 242f2af commit c40661e

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

cabal.project

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ packages:
66
./ghcide
77
./hls-plugin-api
88
./hls-test-utils
9-
../cabal-add
109

10+
source-repository-package
11+
type: git
12+
location: https://github.com/Bodigrim/cabal-add.git
13+
tag: 83de92dcce6221d66bdedca0b462fedd3b06afce
1114

1215
index-state: 2025-06-07T14:57:40Z
1316

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd/Types.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ import Ide.Plugin.Cabal.Orphans ()
1919
import Language.LSP.Protocol.Types
2020

2121
data Log
22-
= LogFoundResponsibleCabalFile FilePath
23-
| LogCalledCabalAddPackageCommand CabalAddPackageCommandParams
22+
= LogCalledCabalAddPackageCommand CabalAddPackageCommandParams
2423
| LogCalledCabalAddModuleCommand ModuleInsertionConfig
2524
| LogCreatedEdit WorkspaceEdit
2625
| LogExecutedCommand
2726
deriving (Show)
2827

2928
instance Pretty Log where
3029
pretty = \case
31-
LogFoundResponsibleCabalFile fp -> "Located the responsible cabal file at " <+> pretty fp
3230
LogCalledCabalAddPackageCommand params -> "Called CabalAddPackage command with:\n" <+> pretty params
3331
LogCalledCabalAddModuleCommand params -> "Called CabalAddModule command with:\n" <+> pretty params
3432
LogCreatedEdit edit -> "Created inplace edit:\n" <+> pretty edit

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/Rules.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ data Log
3535
= LogModificationTime NormalizedFilePath FileVersion
3636
| LogShake Shake.Log
3737
| LogOfInterest OfInterest.Log
38-
| LogDocSaved Uri
3938
deriving (Show)
4039

4140
instance Pretty Log where
@@ -44,8 +43,6 @@ instance Pretty Log where
4443
LogOfInterest log' -> pretty log'
4544
LogModificationTime nfp modTime ->
4645
"Modified:" <+> pretty (fromNormalizedFilePath nfp) <+> pretty (show modTime)
47-
LogDocSaved uri ->
48-
"Saved text document:" <+> pretty (getUri uri)
4946

5047
cabalRules :: Recorder (WithPriority Log) -> PluginId -> Rules ()
5148
cabalRules recorder plId = do

0 commit comments

Comments
 (0)