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

Commit 6da43ab

Browse files
committed
Add back descriptions to plugin modules as haddocks
1 parent 7ca1293 commit 6da43ab

File tree

11 files changed

+22
-9
lines changed

11 files changed

+22
-9
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
{-# LANGUAGE DeriveGeneric #-}
33
{-# LANGUAGE DuplicateRecordFields #-}
44
{-# LANGUAGE OverloadedStrings #-}
5+
-- | apply-refact applies refactorings specified by the refact package. It is
6+
-- currently integrated into hlint to enable the automatic application of
7+
-- suggestions.
58
module Haskell.Ide.Engine.Plugin.ApplyRefact where
69

710
import Control.Arrow

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE OverloadedStrings #-}
2+
-- | Brittany is a tool to format source code.
23
module Haskell.Ide.Engine.Plugin.Brittany where
34

45
import Control.Lens

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{-# LANGUAGE DeriveGeneric #-}
33
{-# LANGUAGE DuplicateRecordFields #-}
44
{-# LANGUAGE OverloadedStrings #-}
5+
-- | An example of writing an HIE plugin
56
module Haskell.Ide.Engine.Plugin.Example2 where
67

78
import Control.Lens

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE OverloadedStrings #-}
22

3+
-- | A flexible Haskell source code pretty printer.
34
module Haskell.Ide.Engine.Plugin.Floskell
45
( floskellDescriptor
56
)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{-# LANGUAGE ScopedTypeVariables #-}
66
{-# LANGUAGE TupleSections #-}
77
{-# LANGUAGE TypeFamilies #-}
8-
-- Generic actions which require a typechecked module
8+
-- | Generic actions which require a typechecked module
99
module Haskell.Ide.Engine.Plugin.Generic where
1010

1111
import Control.Lens hiding (cons, children)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
{-# LANGUAGE NamedFieldPuns #-}
21
{-# LANGUAGE OverloadedStrings #-}
32
{-# LANGUAGE RankNTypes #-}
43
{-# LANGUAGE ScopedTypeVariables #-}
54
{-# LANGUAGE FlexibleContexts #-}
5+
6+
-- | Provides haddock documentation on hover.
67
module Haskell.Ide.Engine.Plugin.Haddock where
78

89
import Control.Monad.State

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{-# LANGUAGE DeriveGeneric #-}
44
{-# LANGUAGE OverloadedStrings #-}
55

6-
-- Simple example plugin showing how easy it is to make a plugin, using the operations from
6+
-- | Simple example plugin showing how easy it is to make a plugin, using the operations from
77
-- http://www.haskellforall.com/2018/10/detailed-walkthrough-for-beginner.html
88
module Haskell.Ide.Engine.Plugin.HfaAlign where
99

@@ -20,7 +20,6 @@ import qualified Language.Haskell.LSP.Types.Lens as J
2020
import Data.Text (Text)
2121

2222
import qualified Data.Text
23-
-- import qualified Data.Text.IO
2423
import qualified Safe
2524

2625
-- ---------------------------------------------------------------------
@@ -110,5 +109,3 @@ adjustText oldText = newText
110109

111110
newText = Data.Text.unlines newLines
112111

113-
-- main :: IO ()
114-
-- main = Data.Text.IO.interact adjustText

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
{-# LANGUAGE DeriveGeneric #-}
33
{-# LANGUAGE DeriveAnyClass #-}
44
{-# LANGUAGE LambdaCase #-}
5+
6+
-- | A tool for extending the import list of a Haskell source file.
7+
-- Provides code actions and commands.
58
module Haskell.Ide.Engine.Plugin.HsImport where
69

710
import Control.Lens.Operators
@@ -370,8 +373,8 @@ codeActionProvider plId docId _ context = do
370373
codeActions = case termType impDiagnostic of
371374
Hiding _ -> [] {- If we are hiding an import, we can not import
372375
a module hiding everything from it. -}
376+
-- Simple import, import the whole module
373377
Import _ -> [mkImportAction moduleName impDiagnostic Nothing]
374-
-- ^ Simple import, import the whole module
375378
++ importListActions
376379

377380
-- | Retrieve the function signature of a term such as
@@ -433,7 +436,7 @@ codeActionProvider plId docId _ context = do
433436
<> modName
434437
<> case termType importDiagnostic of
435438
Hiding _ -> "hiding"
436-
-- ^ Note, that it must never happen
439+
-- Note, that it must never happen
437440
-- in combination with `symbolType == Nothing`
438441
Import _ -> ""
439442
<> case symbolType of

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{-# LANGUAGE DeriveGeneric #-}
22
{-# LANGUAGE DuplicateRecordFields #-}
33
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE NamedFieldPuns #-}
4+
5+
-- | Integration with Liquid Haskell with diagnostics and hover information
56
module Haskell.Ide.Engine.Plugin.Liquid where
67

78
import Control.Concurrent.Async.Lifted

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
{-# LANGUAGE DeriveAnyClass #-}
55
{-# LANGUAGE RankNTypes #-}
66
{-# LANGUAGE TupleSections #-}
7+
8+
-- | Commands and code actions for adding package dependencies into .cabal and
9+
-- package.yaml files
710
module Haskell.Ide.Engine.Plugin.Package where
811

912
import Haskell.Ide.Engine.MonadTypes

0 commit comments

Comments
 (0)