module Language.LSP.Protocol.Types.Progress (
_workDoneProgressBegin,
_workDoneProgressEnd,
_workDoneProgressReport,
)
where
import Control.Lens
import Data.Aeson
import Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin
import Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd
import Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport
_JSON :: (ToJSON a, FromJSON a) => Prism' Value a
_JSON :: forall a. (ToJSON a, FromJSON a) => Prism' Value a
_JSON = forall b t s a. (b -> t) -> (s -> Either t a) -> Prism s t a b
prism forall a. ToJSON a => a -> Value
toJSON forall a b. (a -> b) -> a -> b
$ \Value
x -> case forall a. FromJSON a => Value -> Result a
fromJSON Value
x of
Success a
y -> forall a b. b -> Either a b
Right a
y
Result a
_ -> forall a b. a -> Either a b
Left Value
x
_workDoneProgressBegin :: Prism' Value WorkDoneProgressBegin
_workDoneProgressBegin :: Prism' Value WorkDoneProgressBegin
_workDoneProgressBegin = forall a. (ToJSON a, FromJSON a) => Prism' Value a
_JSON
_workDoneProgressEnd :: Prism' Value WorkDoneProgressEnd
_workDoneProgressEnd :: Prism' Value WorkDoneProgressEnd
_workDoneProgressEnd = forall a. (ToJSON a, FromJSON a) => Prism' Value a
_JSON
_workDoneProgressReport :: Prism' Value WorkDoneProgressReport
_workDoneProgressReport :: Prism' Value WorkDoneProgressReport
_workDoneProgressReport = forall a. (ToJSON a, FromJSON a) => Prism' Value a
_JSON