packages feed

hls-graph 1.9.0.0 → 2.0.0.0

raw patch · 2 files changed

+13/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Development.IDE.Graph.Internal.Types: instance Control.Monad.Fail.MonadFail Development.IDE.Graph.Internal.Types.Rules

Files

hls-graph.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name:          hls-graph-version:       1.9.0.0+version:       2.0.0.0 synopsis:      Haskell Language Server internal graph API description:   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server/tree/master/hls-graph#readme>
src/Development/IDE/Graph/Internal/Types.hs view
@@ -54,8 +54,13 @@  type TheRules = Map.HashMap TypeRep Dynamic +-- | A computation that defines all the rules that form part of the computation graph.+--+-- 'Rules' has access to 'IO' through 'MonadIO'. Use of 'IO' is at your own risk: if+-- you write 'Rules' that throw exceptions, then you need to make sure to handle them+-- yourself when you run the resulting 'Rules'. newtype Rules a = Rules (ReaderT SRules IO a)-    deriving newtype (Monad, Applicative, Functor, MonadIO, MonadFail)+    deriving newtype (Monad, Applicative, Functor, MonadIO)  data SRules = SRules {     rulesExtra   :: !Dynamic,@@ -67,6 +72,12 @@ --------------------------------------------------------------------- -- ACTIONS +-- | An action representing something that can be run as part of a 'Rule'.+-- +-- 'Action's can be pure functions but also have access to 'IO' via 'MonadIO' and 'MonadUnliftIO.+-- It should be assumed that actions throw exceptions, these can be caught with+-- 'Development.IDE.Graph.Internal.Action.actionCatch'. In particular, it is +-- permissible to use the 'MonadFail' instance, which will lead to an 'IOException'. newtype Action a = Action {fromAction :: ReaderT SAction IO a}     deriving newtype (Monad, Applicative, Functor, MonadIO, MonadFail, MonadThrow, MonadCatch, MonadMask, MonadUnliftIO)