hls-graph-2.4.0.0: Haskell Language Server internal graph API
Safe HaskellSafe-Inferred
LanguageHaskell2010

Development.IDE.Graph.Internal.Types

Synopsis

Documentation

unwrapDynamic :: forall a. Typeable a => Dynamic -> a #

type TheRules = HashMap TypeRep Dynamic #

newtype Rules a #

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.

Constructors

Rules (ReaderT SRules IO a) 

Instances

Instances details
MonadIO Rules # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

liftIO :: IO a -> Rules a #

Applicative Rules # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

pure :: a -> Rules a #

(<*>) :: Rules (a -> b) -> Rules a -> Rules b

liftA2 :: (a -> b -> c) -> Rules a -> Rules b -> Rules c

(*>) :: Rules a -> Rules b -> Rules b

(<*) :: Rules a -> Rules b -> Rules a

Functor Rules # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

fmap :: (a -> b) -> Rules a -> Rules b #

(<$) :: a -> Rules b -> Rules a #

Monad Rules # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(>>=) :: Rules a -> (a -> Rules b) -> Rules b

(>>) :: Rules a -> Rules b -> Rules b

return :: a -> Rules a #

Monoid a => Monoid (Rules a) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

mempty :: Rules a

mappend :: Rules a -> Rules a -> Rules a

mconcat :: [Rules a] -> Rules a

Semigroup a => Semigroup (Rules a) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(<>) :: Rules a -> Rules a -> Rules a

sconcat :: NonEmpty (Rules a) -> Rules a

stimes :: Integral b => b -> Rules a -> Rules a

data SRules #

Constructors

SRules 

Fields

newtype Action a #

An action representing something that can be run as part of a Rule.

Actions 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 actionCatch. In particular, it is permissible to use the MonadFail instance, which will lead to an IOException.

Constructors

Action 

Fields

Instances

Instances details
MonadFail Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

fail :: String -> Action a

MonadIO Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

liftIO :: IO a -> Action a #

Applicative Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

pure :: a -> Action a #

(<*>) :: Action (a -> b) -> Action a -> Action b

liftA2 :: (a -> b -> c) -> Action a -> Action b -> Action c

(*>) :: Action a -> Action b -> Action b

(<*) :: Action a -> Action b -> Action a

Functor Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

fmap :: (a -> b) -> Action a -> Action b #

(<$) :: a -> Action b -> Action a #

Monad Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(>>=) :: Action a -> (a -> Action b) -> Action b

(>>) :: Action a -> Action b -> Action b

return :: a -> Action a #

MonadCatch Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

catch :: (HasCallStack, Exception e) => Action a -> (e -> Action a) -> Action a

MonadMask Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

mask :: HasCallStack => ((forall a. Action a -> Action a) -> Action b) -> Action b #

uninterruptibleMask :: HasCallStack => ((forall a. Action a -> Action a) -> Action b) -> Action b #

generalBracket :: HasCallStack => Action a -> (a -> ExitCase b -> Action c) -> (a -> Action b) -> Action (b, c) #

MonadThrow Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> Action a

MonadUnliftIO Action # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

withRunInIO :: ((forall a. Action a -> IO a) -> IO b) -> Action b #

data ShakeDatabase #

Constructors

ShakeDatabase !Int [Action ()] Database 

newtype Step #

Constructors

Step Int 

Instances

Instances details
Eq Step # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: Step -> Step -> Bool #

(/=) :: Step -> Step -> Bool #

Ord Step # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

compare :: Step -> Step -> Ordering

(<) :: Step -> Step -> Bool

(<=) :: Step -> Step -> Bool

(>) :: Step -> Step -> Bool

(>=) :: Step -> Step -> Bool

max :: Step -> Step -> Step

min :: Step -> Step -> Step

Hashable Step # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

hashWithSalt :: Int -> Step -> Int #

hash :: Step -> Int #

data KeyValue #

Constructors

forall a.(Eq a, Typeable a, Hashable a, Show a) => KeyValue a Text 

Instances

Instances details
Show KeyValue # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> KeyValue -> ShowS #

show :: KeyValue -> String #

showList :: [KeyValue] -> ShowS #

Eq KeyValue # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: KeyValue -> KeyValue -> Bool #

(/=) :: KeyValue -> KeyValue -> Bool #

Hashable KeyValue # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

hashWithSalt :: Int -> KeyValue -> Int #

hash :: KeyValue -> Int #

newtype Key #

Constructors

UnsafeMkKey Int 

Instances

Instances details
Show Key # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

Eq Key # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Hashable Key # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

hashWithSalt :: Int -> Key -> Int #

hash :: Key -> Int #

pattern Key :: () => (Typeable a, Hashable a, Show a) => a -> Key #

data GlobalKeyValueMap #

Constructors

GlobalKeyValueMap !(HashMap KeyValue Key) !(IntMap KeyValue) !Int 

newKey :: (Eq a, Typeable a, Hashable a, Show a) => a -> Key #

newtype KeySet #

Constructors

KeySet IntSet 

Instances

Instances details
Monoid KeySet # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Semigroup KeySet # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(<>) :: KeySet -> KeySet -> KeySet

sconcat :: NonEmpty KeySet -> KeySet

stimes :: Integral b => b -> KeySet -> KeySet

Show KeySet # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> KeySet -> ShowS #

show :: KeySet -> String #

showList :: [KeySet] -> ShowS #

Eq KeySet # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: KeySet -> KeySet -> Bool #

(/=) :: KeySet -> KeySet -> Bool #

Ord KeySet # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

compare :: KeySet -> KeySet -> Ordering

(<) :: KeySet -> KeySet -> Bool

(<=) :: KeySet -> KeySet -> Bool

(>) :: KeySet -> KeySet -> Bool

(>=) :: KeySet -> KeySet -> Bool

max :: KeySet -> KeySet -> KeySet

min :: KeySet -> KeySet -> KeySet

memberKeySet :: Key -> KeySet -> Bool #

nullKeySet :: KeySet -> Bool #

filterKeySet :: (Key -> Bool) -> KeySet -> KeySet #

newtype KeyMap a #

Constructors

KeyMap (IntMap a) 

Instances

Instances details
Monoid (KeyMap a) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

mempty :: KeyMap a

mappend :: KeyMap a -> KeyMap a -> KeyMap a

mconcat :: [KeyMap a] -> KeyMap a

Semigroup (KeyMap a) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(<>) :: KeyMap a -> KeyMap a -> KeyMap a

sconcat :: NonEmpty (KeyMap a) -> KeyMap a

stimes :: Integral b => b -> KeyMap a -> KeyMap a

Show a => Show (KeyMap a) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> KeyMap a -> ShowS #

show :: KeyMap a -> String #

showList :: [KeyMap a] -> ShowS #

Eq a => Eq (KeyMap a) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: KeyMap a -> KeyMap a -> Bool #

(/=) :: KeyMap a -> KeyMap a -> Bool #

Ord a => Ord (KeyMap a) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

compare :: KeyMap a -> KeyMap a -> Ordering

(<) :: KeyMap a -> KeyMap a -> Bool

(<=) :: KeyMap a -> KeyMap a -> Bool

(>) :: KeyMap a -> KeyMap a -> Bool

(>=) :: KeyMap a -> KeyMap a -> Bool

max :: KeyMap a -> KeyMap a -> KeyMap a

min :: KeyMap a -> KeyMap a -> KeyMap a

mapKeyMap :: (a -> b) -> KeyMap a -> KeyMap b #

insertKeyMap :: Key -> a -> KeyMap a -> KeyMap a #

lookupKeyMap :: Key -> KeyMap a -> Maybe a #

lookupDefaultKeyMap :: a -> Key -> KeyMap a -> a #

fromListKeyMap :: [(Key, a)] -> KeyMap a #

fromListWithKeyMap :: (a -> a -> a) -> [(Key, a)] -> KeyMap a #

toListKeyMap :: KeyMap a -> [(Key, a)] #

elemsKeyMap :: KeyMap a -> [a] #

newtype Value #

Constructors

Value Dynamic 

data KeyDetails #

Constructors

KeyDetails 

data Status #

Constructors

Clean !Result 
Dirty (Maybe Result) 
Running 

Fields

getResult :: Status -> Maybe Result #

data Result #

Constructors

Result 

Fields

data ResultDeps #

Instances

Instances details
Monoid ResultDeps # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Semigroup ResultDeps # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(<>) :: ResultDeps -> ResultDeps -> ResultDeps

sconcat :: NonEmpty ResultDeps -> ResultDeps

stimes :: Integral b => b -> ResultDeps -> ResultDeps

Show ResultDeps # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> ResultDeps -> ShowS #

show :: ResultDeps -> String #

showList :: [ResultDeps] -> ShowS #

Eq ResultDeps # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: ResultDeps -> ResultDeps -> Bool #

(/=) :: ResultDeps -> ResultDeps -> Bool #

data RunMode #

What mode a rule is running in, passed as an argument to BuiltinRun.

Constructors

RunDependenciesSame

My dependencies have not changed.

RunDependenciesChanged

At least one of my dependencies from last time have changed, or I have no recorded dependencies.

Instances

Instances details
Show RunMode # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> RunMode -> ShowS #

show :: RunMode -> String #

showList :: [RunMode] -> ShowS #

NFData RunMode # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

rnf :: RunMode -> () #

Eq RunMode # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: RunMode -> RunMode -> Bool #

(/=) :: RunMode -> RunMode -> Bool #

data RunChanged #

How the output of a rule has changed.

Constructors

ChangedNothing

Nothing has changed.

ChangedStore

The stored value has changed, but in a way that should be considered identical (used rarely).

ChangedRecomputeSame

I recomputed the value and it was the same.

ChangedRecomputeDiff

I recomputed the value and it was different.

Instances

Instances details
FromJSON RunChanged # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

ToJSON RunChanged # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Generic RunChanged # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Associated Types

type Rep RunChanged :: Type -> Type

Methods

from :: RunChanged -> Rep RunChanged x

to :: Rep RunChanged x -> RunChanged

Show RunChanged # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> RunChanged -> ShowS #

show :: RunChanged -> String #

showList :: [RunChanged] -> ShowS #

NFData RunChanged # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

rnf :: RunChanged -> () #

Eq RunChanged # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(==) :: RunChanged -> RunChanged -> Bool #

(/=) :: RunChanged -> RunChanged -> Bool #

type Rep RunChanged # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

type Rep RunChanged = D1 ('MetaData "RunChanged" "Development.IDE.Graph.Internal.Types" "hls-graph-2.4.0.0-c0BksrWyMh6FVIlhqyteI" 'False) ((C1 ('MetaCons "ChangedNothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChangedStore" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ChangedRecomputeSame" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChangedRecomputeDiff" 'PrefixI 'False) (U1 :: Type -> Type)))

data RunResult value #

The result of BuiltinRun.

Constructors

RunResult 

Fields

Instances

Instances details
Functor RunResult # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

fmap :: (a -> b) -> RunResult a -> RunResult b #

(<$) :: a -> RunResult b -> RunResult a #

NFData value => NFData (RunResult value) # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

rnf :: RunResult value -> () #

data GraphException #

Constructors

forall e.Exception e => GraphException 

Fields

  • target :: String

    The key that was being built

  • stack :: [String]

    The stack of keys that led to this exception

  • inner :: e

    The underlying exception

Instances

Instances details
Exception GraphException # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Show GraphException # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> GraphException -> ShowS #

show :: GraphException -> String #

showList :: [GraphException] -> ShowS #

data Stack #

Constructors

Stack [Key] !KeySet 

Instances

Instances details
Show Stack # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> Stack -> ShowS #

show :: Stack -> String #

showList :: [Stack] -> ShowS #

newtype StackException #

Constructors

StackException Stack 

Instances

Instances details
Exception StackException # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Show StackException # 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

showsPrec :: Int -> StackException -> ShowS #

show :: StackException -> String #

showList :: [StackException] -> ShowS #

memberStack :: Key -> Stack -> Bool #