Skip to content

Commit

Permalink
Fix the LSP flag/CPP
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Dec 8, 2023
1 parent 2644541 commit 9b78a15
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 1 addition & 2 deletions rzk/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Language.Rzk.VSCode.Lsp (runLsp)
import Options.Generic
import System.Exit (exitFailure, exitSuccess)

import Data.Functor ((<&>))
import Data.Functor (void, (<&>))
import Paths_rzk (version)
import Rzk.Format (formatFile, formatFileWrite,
isWellFormattedFile)
Expand Down Expand Up @@ -90,4 +90,3 @@ main = do
exitSuccess

Version -> putStrLn (showVersion version)

5 changes: 4 additions & 1 deletion rzk/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ flags:
manual: true
default: true

when:
- condition: flag(lsp) && !impl(ghcjs)
cpp-options: -DLSP

custom-setup:
dependencies:
base: ">= 4.11.0.0 && < 5.0"
Expand Down Expand Up @@ -86,7 +90,6 @@ library:
lsp: ">= 2.2.0.0"
lsp-types: ">= 2.0.2.0"
stm: ">= 2.5.0.0"
cpp-options: -DLSP

executables:
rzk:
Expand Down
9 changes: 8 additions & 1 deletion rzk/rzk.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ library
, text >=1.2.3.1
, yaml >=0.11.0.0
default-language: Haskell2010
if flag(lsp) && !impl(ghcjs)
cpp-options: -DLSP
if flag(lsp) && !impl(ghcjs)
exposed-modules:
Language.Rzk.VSCode.Config
Expand All @@ -83,7 +85,6 @@ library
Language.Rzk.VSCode.Logging
Language.Rzk.VSCode.Lsp
Language.Rzk.VSCode.Tokenize
cpp-options: -DLSP
build-depends:
aeson >=1.4.2.0
, co-log-core >=0.3.2.0
Expand Down Expand Up @@ -119,6 +120,8 @@ executable rzk
, text >=1.2.3.1
, yaml >=0.11.0.0
default-language: Haskell2010
if flag(lsp) && !impl(ghcjs)
cpp-options: -DLSP
if !impl(ghcjs)
build-depends:
optparse-generic >=1.4.0
Expand Down Expand Up @@ -149,6 +152,8 @@ test-suite doctests
, text >=1.2.3.1
, yaml >=0.11.0.0
default-language: Haskell2010
if flag(lsp) && !impl(ghcjs)
cpp-options: -DLSP

test-suite rzk-test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -176,3 +181,5 @@ test-suite rzk-test
, text >=1.2.3.1
, yaml >=0.11.0.0
default-language: Haskell2010
if flag(lsp) && !impl(ghcjs)
cpp-options: -DLSP

0 comments on commit 9b78a15

Please sign in to comment.