Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype WithinT b w a = WithinT (EnvT (Path b Dir) w a)
- type Within b a = WithinT b Identity a
- localDir :: (Path b Dir -> Path c Dir) -> WithinT b w a -> WithinT c w a
- localDirM :: Monad m => (Path b Dir -> m (Path c Dir)) -> WithinT b w a -> m (WithinT c w a)
- asWithin :: MonadThrow m => Path a t -> Path a Dir -> m (Within a (Path Rel t))
- within :: a -> Path b Dir -> Within b a
- fromWithin :: Within a (Path Rel t) -> Path a t
- blinkLocalDir :: Path b Dir -> WithinT a w t -> WithinT b w t
- blinkAndMap :: Functor w => Path b Dir -> (s -> t) -> WithinT a w s -> WithinT b w t
- blinkAndMapM :: (Monad m, Traversable w) => Path b Dir -> (s -> m t) -> WithinT a w s -> m (WithinT b w t)
- localDirAndMapM :: (Monad m, Traversable w) => (Path b Dir -> m (Path c Dir)) -> (s -> m t) -> WithinT b w s -> m (WithinT c w t)
Documentation
newtype WithinT b w a Source #
The Within Type, newtype wrapper around EnvT
specialised to a `Path b Dir` environment.
Instances
ComonadTrans (WithinT b) Source # | |
Eq t => Eq (Within b t) Source # | |
Functor w => Functor (WithinT b w) Source # | |
Ord t => Ord (Within b t) Source # | |
Show t => Show (Within b t) Source # | |
Foldable w => Foldable (WithinT b w) Source # | |
Defined in Within fold :: Monoid m => WithinT b w m -> m # foldMap :: Monoid m => (a -> m) -> WithinT b w a -> m # foldr :: (a -> b0 -> b0) -> b0 -> WithinT b w a -> b0 # foldr' :: (a -> b0 -> b0) -> b0 -> WithinT b w a -> b0 # foldl :: (b0 -> a -> b0) -> b0 -> WithinT b w a -> b0 # foldl' :: (b0 -> a -> b0) -> b0 -> WithinT b w a -> b0 # foldr1 :: (a -> a -> a) -> WithinT b w a -> a # foldl1 :: (a -> a -> a) -> WithinT b w a -> a # toList :: WithinT b w a -> [a] # null :: WithinT b w a -> Bool # length :: WithinT b w a -> Int # elem :: Eq a => a -> WithinT b w a -> Bool # maximum :: Ord a => WithinT b w a -> a # minimum :: Ord a => WithinT b w a -> a # | |
Traversable w => Traversable (WithinT b w) Source # | |
Defined in Within | |
Hashable t => Hashable (Within b t) Source # | |
Comonad w => Comonad (WithinT b w) Source # | |
Comonad w => ComonadEnv (Path b Dir) (WithinT b w) Source # | |
Generic (WithinT b w a) Source # | |
type Rep (WithinT b w a) Source # | |
localDir :: (Path b Dir -> Path c Dir) -> WithinT b w a -> WithinT c w a Source #
Change the parent directory of a Within
value.
localDirM :: Monad m => (Path b Dir -> m (Path c Dir)) -> WithinT b w a -> m (WithinT c w a) Source #
Change the parent directory of a Within
value, monadic verison.
within :: a -> Path b Dir -> Within b a Source #
Put a value inside a directory.
>>>
$(mkRelFile "a.txt") `within` $(mkRelDir "foo")
fromWithin :: Within a (Path Rel t) -> Path a t Source #
Turns a Within
containing a path into a single path.
blinkLocalDir :: Path b Dir -> WithinT a w t -> WithinT b w t Source #
Switch the outer part of a Within
value to a new directory, synonym for localDir . const
blinkAndMap :: Functor w => Path b Dir -> (s -> t) -> WithinT a w s -> WithinT b w t Source #
Switch the outer part of a Within
value to a new directory and map the inner at the same time.
blinkAndMapM :: (Monad m, Traversable w) => Path b Dir -> (s -> m t) -> WithinT a w s -> m (WithinT b w t) Source #
Switch the outer part of a Within
value to a new directory and mapM the inner at the same time.