Safe Haskell | None |
---|---|
Language | Haskell2010 |
Development.IDE.Types.Shake
Synopsis
- newtype Q k = Q (k, NormalizedFilePath)
- newtype A v = A (Value v)
- data Value v
- data ValueWithDiagnostics = ValueWithDiagnostics !(Value Dynamic) !(Vector FileDiagnostic)
- type Values = HashMap (NormalizedFilePath, Key) ValueWithDiagnostics
- data Key = forall k.(Typeable k, Hashable k, Eq k, Show k) => Key k
- newtype BadDependency = BadDependency String
- data ShakeValue
- currentValue :: Value v -> Maybe v
- isBadDependency :: SomeException -> Bool
- toShakeValue :: (ByteString -> ShakeValue) -> Maybe ByteString -> ShakeValue
- encodeShakeValue :: ShakeValue -> ByteString
- decodeShakeValue :: ByteString -> ShakeValue
Documentation
Constructors
Q (k, NormalizedFilePath) |
Instances
Eq k => Eq (Q k) Source # | |
Show k => Show (Q k) Source # | |
Hashable k => Hashable (Q k) Source # | |
Defined in Development.IDE.Types.Shake | |
Binary k => Binary (Q k) Source # | |
NFData k => NFData (Q k) Source # | |
Defined in Development.IDE.Types.Shake | |
type RuleResult (Q k) Source # | |
Defined in Development.IDE.Types.Shake |
Invariant: the v
must be in normal form (fully evaluated).
Otherwise we keep repeatedly rnf
ing values taken from the Shake database
Constructors
Succeeded TextDocumentVersion v | |
Stale (Maybe PositionDelta) TextDocumentVersion v | |
Failed Bool |
Instances
data ValueWithDiagnostics Source #
Constructors
ValueWithDiagnostics !(Value Dynamic) !(Vector FileDiagnostic) |
type Values = HashMap (NormalizedFilePath, Key) ValueWithDiagnostics Source #
The state of the all values and diagnostics
Key type
newtype BadDependency Source #
When we depend on something that reported an error, and we fail as a direct result, throw BadDependency which short-circuits the rest of the action
Constructors
BadDependency String |
Instances
Show BadDependency Source # | |
Defined in Development.IDE.Types.Shake Methods showsPrec :: Int -> BadDependency -> ShowS # show :: BadDependency -> String # showList :: [BadDependency] -> ShowS # | |
Exception BadDependency Source # | |
Defined in Development.IDE.Types.Shake Methods toException :: BadDependency -> SomeException # fromException :: SomeException -> Maybe BadDependency # displayException :: BadDependency -> String # |
data ShakeValue Source #
Constructors
ShakeNoCutoff | This is what we use when we get Nothing from a rule. |
ShakeResult !ByteString | |
ShakeStale !ByteString |
Instances
Show ShakeValue Source # | |
Defined in Development.IDE.Types.Shake Methods showsPrec :: Int -> ShakeValue -> ShowS # show :: ShakeValue -> String # showList :: [ShakeValue] -> ShowS # | |
Generic ShakeValue Source # | |
Defined in Development.IDE.Types.Shake Associated Types type Rep ShakeValue :: Type -> Type # | |
NFData ShakeValue Source # | |
Defined in Development.IDE.Types.Shake Methods rnf :: ShakeValue -> () # | |
type Rep ShakeValue Source # | |
Defined in Development.IDE.Types.Shake type Rep ShakeValue = D1 ('MetaData "ShakeValue" "Development.IDE.Types.Shake" "ghcide-1.0.0.0-L6DikjZcyrRHdytkRlGwfF" 'False) (C1 ('MetaCons "ShakeNoCutoff" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ShakeResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)) :+: C1 ('MetaCons "ShakeStale" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)))) |
currentValue :: Value v -> Maybe v Source #
Convert a Value to a Maybe. This will only return Just
for
up2date results not for stale values.
isBadDependency :: SomeException -> Bool Source #
toShakeValue :: (ByteString -> ShakeValue) -> Maybe ByteString -> ShakeValue Source #