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

Commit

Permalink
Rename LspStdio to Server, move out LSP modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lukel97 committed Dec 21, 2019
1 parent 6c7715b commit eac0709
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/MainHie.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Haskell.Ide.Engine.MonadFunctions
import Haskell.Ide.Engine.MonadTypes
import Haskell.Ide.Engine.Options
import Haskell.Ide.Engine.Scheduler
import Haskell.Ide.Engine.Transport.LspStdio
import Haskell.Ide.Engine.Server
import qualified Language.Haskell.LSP.Core as Core
import Options.Applicative.Simple
import qualified Paths_haskell_ide_engine as Meta
Expand Down Expand Up @@ -130,4 +130,4 @@ run opts = do

-- launch the dispatcher.
scheduler <- newScheduler plugins' initOpts
lspStdioTransport scheduler origDir plugins' (optCaptureFile opts)
server scheduler origDir plugins' (optCaptureFile opts)
8 changes: 4 additions & 4 deletions haskell-ide-engine.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ flag pedantic
library
hs-source-dirs: src
exposed-modules: Haskell.Ide.Engine.Channel
Haskell.Ide.Engine.LSP.CodeActions
Haskell.Ide.Engine.LSP.Completions
Haskell.Ide.Engine.CodeActions
Haskell.Ide.Engine.Completions
Haskell.Ide.Engine.Plugin.Base
Haskell.Ide.Engine.LSP.Reactor
Haskell.Ide.Engine.Reactor
Haskell.Ide.Engine.Options
Haskell.Ide.Engine.Plugin.ApplyRefact
Haskell.Ide.Engine.Plugin.Brittany
Expand All @@ -44,7 +44,7 @@ library
Haskell.Ide.Engine.Support.Hoogle
Haskell.Ide.Engine.Support.Fuzzy
Haskell.Ide.Engine.Support.HieExtras
Haskell.Ide.Engine.Transport.LspStdio
Haskell.Ide.Engine.Server
Haskell.Ide.Engine.Types
other-modules: Paths_haskell_ide_engine
build-depends: Cabal >= 1.22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Haskell.Ide.Engine.LSP.CodeActions where
module Haskell.Ide.Engine.CodeActions where

import Control.Lens
import Control.Monad.Reader
import qualified Data.Aeson as J
import Data.Maybe
import Data.Foldable
import qualified GHC.Generics as G
import Haskell.Ide.Engine.LSP.Reactor
import Haskell.Ide.Engine.Reactor
import Haskell.Ide.Engine.Types
import qualified Language.Haskell.LSP.Core as Core
import qualified Language.Haskell.LSP.Types as J
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Haskell.Ide.Engine.LSP.Completions
module Haskell.Ide.Engine.Completions
( WithSnippets(..)
, getCompletions
, resolveCompletion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
module Haskell.Ide.Engine.LSP.Reactor
module Haskell.Ide.Engine.Reactor
( R
, runReactor
, reactorSend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PartialTypeSignatures #-}

module Haskell.Ide.Engine.Transport.LspStdio
module Haskell.Ide.Engine.Server
(
lspStdioTransport
server
) where

import Control.Concurrent
Expand Down Expand Up @@ -41,9 +41,9 @@ import qualified Data.Yaml as Yaml
import Haskell.Ide.Engine.Cradle (findLocalCradle, cradleDisplay)
import Haskell.Ide.Engine.Config
import qualified Haskell.Ide.Engine.Ghc as HIE
import Haskell.Ide.Engine.LSP.CodeActions
import qualified Haskell.Ide.Engine.LSP.Completions as Completions
import Haskell.Ide.Engine.LSP.Reactor
import Haskell.Ide.Engine.CodeActions
import qualified Haskell.Ide.Engine.Completions as Completions
import Haskell.Ide.Engine.Reactor
import Haskell.Ide.Engine.MonadFunctions
import Haskell.Ide.Engine.MonadTypes
import qualified Haskell.Ide.Engine.Plugin.ApplyRefact as ApplyRefact
Expand Down Expand Up @@ -76,13 +76,13 @@ import GHC.Conc
{-# ANN module ("hlint: ignore Use tuple-section" :: String) #-}
-- ---------------------------------------------------------------------

lspStdioTransport
server
:: Scheduler.Scheduler R
-> FilePath
-> IdePlugins
-> Maybe FilePath
-> IO ()
lspStdioTransport scheduler origDir plugins captureFp = do
server scheduler origDir plugins captureFp = do
run scheduler origDir plugins captureFp >>= \case
0 -> exitSuccess
c -> exitWith . ExitFailure $ c
Expand Down

0 comments on commit eac0709

Please sign in to comment.