Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Within a t = Within (Path a Dir, Path Rel t)
- fromWithin :: Within a t -> Path a t
- toWithin :: Path a Dir -> Path Rel t -> Within a t
- within :: Path Rel t -> Path a Dir -> Within a t
- asWithin :: MonadThrow m => Path a t -> Path a Dir -> m (Within a t)
- whatLiesWithin :: Within a t -> Path Rel t
- mapWithin :: (Path Rel s -> Path Rel t) -> Within a s -> Within a t
- mapWithinT :: MonadThrow m => (Path Rel s -> m (Path Rel t)) -> Within a s -> m (Within a t)
- moveWithin :: (Path a Dir -> Path b Dir) -> Within a t -> Within b t
- moveWithinT :: MonadThrow m => (Path a Dir -> m (Path b Dir)) -> Within a t -> m (Within b t)
- blinkWithin :: Path b Dir -> Within a t -> Within b t
- moveAndMapT :: MonadThrow m => (Path a Dir -> m (Path b Dir)) -> (Path Rel s -> m (Path Rel t)) -> Within a s -> m (Within b t)
- blinkAndMapT :: MonadThrow m => Path b Dir -> (Path Rel s -> m (Path Rel t)) -> Within a s -> m (Within b t)
Documentation
The Within
type represents a relative Path
inside a directory Path
.
The two halves can be manipulated independently.
fromWithin :: Within a t -> Path a t Source #
within :: Path Rel t -> Path a Dir -> Within a t Source #
Infix version of toWithin
, e.g "file.txt `within` myDir"
mapWithinT :: MonadThrow m => (Path Rel s -> m (Path Rel t)) -> Within a s -> m (Within a t) Source #
moveWithin :: (Path a Dir -> Path b Dir) -> Within a t -> Within b t Source #
Map the outer part of a Within
value via a function that changes the directory.
moveWithinT :: MonadThrow m => (Path a Dir -> m (Path b Dir)) -> Within a t -> m (Within b t) Source #
Map the outer part of a Within
value via a function that changes the directory with an operation that may throw.
blinkWithin :: Path b Dir -> Within a t -> Within b t Source #
Switch the outer part of a Within
value to a new directory immediately.
moveAndMapT :: MonadThrow m => (Path a Dir -> m (Path b Dir)) -> (Path Rel s -> m (Path Rel t)) -> Within a s -> m (Within b t) Source #
moveWithinT
and mapWithinT
simultaneously.
blinkAndMapT :: MonadThrow m => Path b Dir -> (Path Rel s -> m (Path Rel t)) -> Within a s -> m (Within b t) Source #
blinkWithin
and mapWithinT
simultaneously.