| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Development.IDE.Core.UseStale
Synopsis
- data Age
- data Tracked (age :: Age) a
- unTrack :: Tracked age a -> a
- data PositionMap (from :: Age) (to :: Age)
- data TrackedStale a where
- TrackedStale :: forall s a. Tracked ('Stale s) a -> PositionMap ('Stale s) 'Current -> TrackedStale a
- untrackedStaleValue :: TrackedStale a -> a
- unsafeMkStale :: age -> Tracked ('Stale s) age
- unsafeMkCurrent :: age -> Tracked 'Current age
- unsafeCopyAge :: forall (age :: Age) a b. Tracked age a -> b -> Tracked age b
- class MapAge a where
- mapAgeFrom :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked to a -> Maybe (Tracked from a)
- mapAgeTo :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked from a -> Maybe (Tracked to a)
- dualPositionMap :: forall (from :: Age) (to :: Age). PositionMap from to -> PositionMap to from
- useWithStale :: IdeRule k v => k -> NormalizedFilePath -> Action (Maybe (TrackedStale v))
- useWithStale_ :: IdeRule k v => k -> NormalizedFilePath -> Action (TrackedStale v)
Documentation
A data kind for Tracked.
Instances
| Category PositionMap # | |
Defined in Development.IDE.Core.UseStale Methods id :: forall (a :: Age). PositionMap a a # (.) :: forall (b :: Age) (c :: Age) (a :: Age). PositionMap b c -> PositionMap a b -> PositionMap a c # | |
Some value, tagged with its age. All Current ages are considered to be
the same thing, but Stale values are protected by an untouchable variable
to ensure they can't be unified.
Instances
| Applicative (Tracked age) # | |
Defined in Development.IDE.Core.UseStale | |
| Functor (Tracked age) # | |
| Monad (Tracked age) # | |
| Foldable (Tracked age) # | |
Defined in Development.IDE.Core.UseStale Methods fold :: Monoid m => Tracked age m -> m # foldMap :: Monoid m => (a -> m) -> Tracked age a -> m # foldMap' :: Monoid m => (a -> m) -> Tracked age a -> m # foldr :: (a -> b -> b) -> b -> Tracked age a -> b # foldr' :: (a -> b -> b) -> b -> Tracked age a -> b # foldl :: (b -> a -> b) -> b -> Tracked age a -> b # foldl' :: (b -> a -> b) -> b -> Tracked age a -> b # foldr1 :: (a -> a -> a) -> Tracked age a -> a # foldl1 :: (a -> a -> a) -> Tracked age a -> a # toList :: Tracked age a -> [a] # null :: Tracked age a -> Bool # length :: Tracked age a -> Int # elem :: Eq a => a -> Tracked age a -> Bool # maximum :: Ord a => Tracked age a -> a # minimum :: Ord a => Tracked age a -> a # | |
| Traversable (Tracked age) # | |
Defined in Development.IDE.Core.UseStale | |
| FromJSON a => FromJSON (Tracked age a) # | |
Defined in Development.IDE.Core.UseStale | |
| ToJSON a => ToJSON (Tracked age a) # | |
| NFData a => NFData (Tracked age a) # | |
Defined in Development.IDE.Core.UseStale | |
| Read a => Read (Tracked age a) # | |
| Show a => Show (Tracked age a) # | |
| Eq a => Eq (Tracked age a) # | |
| Ord a => Ord (Tracked age a) # | |
Defined in Development.IDE.Core.UseStale Methods compare :: Tracked age a -> Tracked age a -> Ordering # (<) :: Tracked age a -> Tracked age a -> Bool # (<=) :: Tracked age a -> Tracked age a -> Bool # (>) :: Tracked age a -> Tracked age a -> Bool # (>=) :: Tracked age a -> Tracked age a -> Bool # | |
data PositionMap (from :: Age) (to :: Age) #
Like PositionMapping, but with annotated ages for how Tracked values
change. Use the Category instance to compose PositionMappings in order
to transform between values of different stale ages.
Instances
| Category PositionMap # | |
Defined in Development.IDE.Core.UseStale Methods id :: forall (a :: Age). PositionMap a a # (.) :: forall (b :: Age) (c :: Age) (a :: Age). PositionMap b c -> PositionMap a b -> PositionMap a c # | |
data TrackedStale a where #
A pair containing a value, as well as
a Tracked StalePositionMapping that will fast-forward values to the current age.
Constructors
| TrackedStale :: forall s a. Tracked ('Stale s) a -> PositionMap ('Stale s) 'Current -> TrackedStale a |
Instances
| Functor TrackedStale # | |
Defined in Development.IDE.Core.UseStale Methods fmap :: (a -> b) -> TrackedStale a -> TrackedStale b # (<$) :: a -> TrackedStale b -> TrackedStale a # | |
untrackedStaleValue :: TrackedStale a -> a #
unsafeMkStale :: age -> Tracked ('Stale s) age #
unsafeMkCurrent :: age -> Tracked 'Current age #
unsafeCopyAge :: forall (age :: Age) a b. Tracked age a -> b -> Tracked age b #
A class for which Tracked values can be run across a PositionMapping
to change their ages.
Minimal complete definition
Methods
mapAgeFrom :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked to a -> Maybe (Tracked from a) #
mapAgeTo :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked from a -> Maybe (Tracked to a) #
Instances
| MapAge RealSrcSpan # | |
Defined in Development.IDE.Core.UseStale Methods mapAgeFrom :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked to RealSrcSpan -> Maybe (Tracked from RealSrcSpan) # mapAgeTo :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked from RealSrcSpan -> Maybe (Tracked to RealSrcSpan) # | |
| MapAge Range # | |
dualPositionMap :: forall (from :: Age) (to :: Age). PositionMap from to -> PositionMap to from #
Get a PositionMap that runs in the opposite direction.
useWithStale :: IdeRule k v => k -> NormalizedFilePath -> Action (Maybe (TrackedStale v)) #
Request a Rule result, it not available return the last computed result, if any, which may be stale
useWithStale_ :: IdeRule k v => k -> NormalizedFilePath -> Action (TrackedStale v) #
Request a Rule result, it not available return the last computed result which may be stale. Errors out if none available.