Skip to content

Commit 74d15fb

Browse files
banacornwz1000
authored andcommitted
Bump unliftio >= 0.2.0.0 & fix stack.yamls
1 parent 73e21d3 commit 74d15fb

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

lsp.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ library
5454
, transformers >= 0.5.6 && < 0.6
5555
, time
5656
, unordered-containers
57-
, unliftio-core
57+
, unliftio-core >= 0.2.0.0
5858
-- used for generating random uuids for dynamic registration
5959
, random
6060
, uuid >= 1.3

src/Language/LSP/Server/Core.hs

+5-9
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
{-# LANGUAGE FunctionalDependencies #-}
2121
{-# LANGUAGE TypeOperators #-}
2222
{-# LANGUAGE RecursiveDo #-}
23+
{-# LANGUAGE RoleAnnotations #-}
2324
{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
2425
{-# OPTIONS_GHC -fprint-explicit-kinds #-}
2526

@@ -72,15 +73,10 @@ import Control.Monad.Trans.Identity
7273
-- ---------------------------------------------------------------------
7374

7475
newtype LspT config m a = LspT { unLspT :: ReaderT (LanguageContextEnv config) m a }
75-
deriving (Functor, Applicative, Monad, MonadIO, MonadTrans, MonadFix)
76-
77-
-- Manually deriving LspT as an instance of MonadUnliftIO
78-
instance MonadUnliftIO m => MonadUnliftIO (LspT config m) where
79-
withRunInIO inner =
80-
LspT $
81-
ReaderT $ \config ->
82-
withRunInIO $ \run ->
83-
inner (run . flip runReaderT config . unLspT)
76+
deriving (Functor, Applicative, Monad, MonadIO, MonadTrans, MonadUnliftIO, MonadFix)
77+
78+
-- for deriving the instance of MonadUnliftIO
79+
type role LspT representational representational nominal
8480

8581
runLspT :: LanguageContextEnv config -> LspT config m a -> m a
8682
runLspT env = flip runReaderT env . unLspT

stack-8.8.1.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extra-deps:
1010
- dependent-sum-template-0.1.0.3@sha256:0bbbacdfbd3abf2a15aaf0cf2c27e5bdd159b519441fec39e1e6f2f54424adde,1682
1111
- constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853
1212
- dependent-sum-0.7.1.0@sha256:5599aa89637db434431b1dd3fa7c34bc3d565ee44f0519bfbc877be1927c2531,2068
13+
- unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082
1314
- github: bubba/lsp-test
1415
commit: e251176a4b2ff4dead7846fe5d0a4e1dbea69fd4
1516

stack-8.8.2.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extra-deps:
1010
- dependent-sum-template-0.1.0.3@sha256:0bbbacdfbd3abf2a15aaf0cf2c27e5bdd159b519441fec39e1e6f2f54424adde,1682
1111
- constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853
1212
- dependent-sum-0.7.1.0@sha256:5599aa89637db434431b1dd3fa7c34bc3d565ee44f0519bfbc877be1927c2531,2068
13+
- unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082
1314
- github: bubba/lsp-test
1415
commit: e251176a4b2ff4dead7846fe5d0a4e1dbea69fd4
1516

0 commit comments

Comments
 (0)