Skip to content

Commit

Permalink
Try getting rid of all transformers
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed May 18, 2024
1 parent 0059335 commit dc0a705
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Language/LSP/Notebook.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ import Language.LSP.Transformer


type HaskellNotebookTransformer =
DirectiveToPragma -- Convert :set -XFoo directives to LANGUAGE pragmas
:> StripDirective -- Strip all remaining directives
:> ExpressionToDeclaration -- Convert naked expressions to declarations
:> StatementToDeclaration -- Convert naked statements to declarations
:> ImportSifter -- Sift imports to the top
:> HeaderTransformer -- Add unsafePerformIO import at top
:> PragmaSifter -- Sift pragmas to the top (above imports)
-- DirectiveToPragma -- Convert :set -XFoo directives to LANGUAGE pragmas
-- :> StripDirective -- Strip all remaining directives
-- :> ExpressionToDeclaration -- Convert naked expressions to declarations
-- :> StatementToDeclaration -- Convert naked statements to declarations
-- :> ImportSifter -- Sift imports to the top
HeaderTransformer -- Add unsafePerformIO import at top
-- :> PragmaSifter -- Sift pragmas to the top (above imports)

expressionToDeclarationParams :: FilePath -> Params ExpressionToDeclaration
expressionToDeclarationParams = EDParams 10

transformerParams :: FilePath -> Params HaskellNotebookTransformer
transformerParams ghcLibDir =

Check warning on line 35 in src/Language/LSP/Notebook.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 8.10

Defined but not used: ‘ghcLibDir’

Check warning on line 35 in src/Language/LSP/Notebook.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.0

Defined but not used: ‘ghcLibDir’

Check warning on line 35 in src/Language/LSP/Notebook.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.4

Defined but not used: ‘ghcLibDir’

Check warning on line 35 in src/Language/LSP/Notebook.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.8

Defined but not used: ‘ghcLibDir’

Check warning on line 35 in src/Language/LSP/Notebook.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.6

Defined but not used: ‘ghcLibDir’

Check warning on line 35 in src/Language/LSP/Notebook.hs

View workflow job for this annotation

GitHub Actions / stack / ghc 9.2

Defined but not used: ‘ghcLibDir’
DTPParams ghcLibDir
:> SDParams ghcLibDir
:> expressionToDeclarationParams ghcLibDir
:> STDParams ghcLibDir
:> ghcLibDir
:> ["import System.IO.Unsafe (unsafePerformIO)"]
:> ghcLibDir
-- DTPParams ghcLibDir
-- :> SDParams ghcLibDir
-- :> expressionToDeclarationParams ghcLibDir
-- :> STDParams ghcLibDir
-- :> ghcLibDir
["import System.IO.Unsafe (unsafePerformIO)"]
-- :> ghcLibDir

0 comments on commit dc0a705

Please sign in to comment.