Safe Haskell | None |
---|---|
Language | Haskell2010 |
Although there are a lot of instances in this file, really it's just a combinatorial explosion of the following combinations:
- Several Haskell types being converted to/from Nix wrappers
- Several types of Nix wrappers
- Whether to be shallow or deep while unwrapping
Synopsis
- newtype Deeper a = Deeper a
- type CoerceDeeperToNValue t f m = Deeper (NValue t f m) -> NValue t f m
- type CoerceDeeperToNValue' t f m = Deeper (NValue' t f m (NValue t f m)) -> NValue' t f m (NValue t f m)
- type Convertible e t f m = (Framed e m, MonadDataErrorContext t f m, MonadThunk t m (NValue t f m))
- inHask :: forall a1 a2 v b m. (Monad m, FromValue a1 m v, ToValue a2 m b) => (a1 -> a2) -> v -> m b
- inHaskM :: forall a1 a2 v b m. (Monad m, FromValue a1 m v, ToValue a2 m b) => (a1 -> m a2) -> v -> m b
- inHaskMay :: forall a1 a2 v b m. (Monad m, FromValue a1 m v, ToValue a2 m b) => (Maybe a1 -> a2) -> v -> m b
- class FromValue a m v where
- fromValue :: v -> m a
- fromValueMay :: v -> m (Maybe a)
- traverseFromValue :: (Applicative m, Traversable t, FromValue b m a) => t a -> m (Maybe (t b))
- traverseToValue :: (Traversable t, Applicative f, ToValue a f b) => t a -> f (t b)
- fromMayToValue :: forall t f m a e. (Convertible e t f m, FromValue a m (NValue' t f m (NValue t f m))) => ValueType -> NValue' t f m (NValue t f m) -> m a
- fromMayToDeeperValue :: forall t f m a e m1. (Convertible e t f m, FromValue (m1 a) m (Deeper (NValue' t f m (NValue t f m)))) => ValueType -> Deeper (NValue' t f m (NValue t f m)) -> m (m1 a)
- class ToValue a m v where
- toValue :: a -> m v
Documentation
Deeper a |
Instances
Functor Deeper Source # | |
Foldable Deeper Source # | |
Defined in Nix.Convert fold :: Monoid m => Deeper m -> m # foldMap :: Monoid m => (a -> m) -> Deeper a -> m # foldMap' :: Monoid m => (a -> m) -> Deeper a -> m # foldr :: (a -> b -> b) -> b -> Deeper a -> b # foldr' :: (a -> b -> b) -> b -> Deeper a -> b # foldl :: (b -> a -> b) -> b -> Deeper a -> b # foldl' :: (b -> a -> b) -> b -> Deeper a -> b # foldr1 :: (a -> a -> a) -> Deeper a -> a # foldl1 :: (a -> a -> a) -> Deeper a -> a # elem :: Eq a => a -> Deeper a -> Bool # maximum :: Ord a => Deeper a -> a # minimum :: Ord a => Deeper a -> a # | |
Traversable Deeper Source # | |
(Convertible e t f m, ToValue a m (Deeper (NValue' t f m (NValue t f m)))) => ToValue a m (Deeper (NValue t f m)) Source # | |
(Convertible e t f m, FromValue a m (NValue' t f m (NValue t f m))) => FromValue a m (Deeper (NValue' t f m (NValue t f m))) Source # | |
(Convertible e t f m, MonadValue (NValue t f m) m, FromValue a m (Deeper (NValue' t f m (NValue t f m)))) => FromValue a m (Deeper (NValue t f m)) Source # | |
(Convertible e t f m, ToValue a m (NValue t f m)) => ToValue [a] m (Deeper (NValue' t f m (NValue t f m))) Source # | |
(Convertible e t f m, ToValue a m (NValue t f m)) => ToValue (AttrSet a) m (Deeper (NValue' t f m (NValue t f m))) Source # | |
(Convertible e t f m, FromValue a m (NValue t f m)) => FromValue [a] m (Deeper (NValue' t f m (NValue t f m))) Source # | |
(Convertible e t f m, FromValue a m (NValue t f m)) => FromValue (AttrSet a) m (Deeper (NValue' t f m (NValue t f m))) Source # | |
(Convertible e t f m, ToValue a m (NValue t f m)) => ToValue (AttrSet a, PositionSet) m (Deeper (NValue' t f m (NValue t f m))) Source # | |
Defined in Nix.Convert | |
(Convertible e t f m, FromValue a m (NValue t f m)) => FromValue (AttrSet a, PositionSet) m (Deeper (NValue' t f m (NValue t f m))) Source # | |
Defined in Nix.Convert |
type CoerceDeeperToNValue' t f m = Deeper (NValue' t f m (NValue t f m)) -> NValue' t f m (NValue t f m) Source #
type Convertible e t f m = (Framed e m, MonadDataErrorContext t f m, MonadThunk t m (NValue t f m)) Source #
inHask :: forall a1 a2 v b m. (Monad m, FromValue a1 m v, ToValue a2 m b) => (a1 -> a2) -> v -> m b Source #
Transform Nix -> Hask. Run function. Convert Hask -> Nix.
inHaskM :: forall a1 a2 v b m. (Monad m, FromValue a1 m v, ToValue a2 m b) => (a1 -> m a2) -> v -> m b Source #
inHaskMay :: forall a1 a2 v b m. (Monad m, FromValue a1 m v, ToValue a2 m b) => (Maybe a1 -> a2) -> v -> m b Source #
Maybe transform Nix -> Hask. Run function. Convert Hask -> Nix.
FromValue
class FromValue a m v where Source #
Instances
traverseFromValue :: (Applicative m, Traversable t, FromValue b m a) => t a -> m (Maybe (t b)) Source #
traverseToValue :: (Traversable t, Applicative f, ToValue a f b) => t a -> f (t b) Source #
fromMayToValue :: forall t f m a e. (Convertible e t f m, FromValue a m (NValue' t f m (NValue t f m))) => ValueType -> NValue' t f m (NValue t f m) -> m a Source #
fromMayToDeeperValue :: forall t f m a e m1. (Convertible e t f m, FromValue (m1 a) m (Deeper (NValue' t f m (NValue t f m)))) => ValueType -> Deeper (NValue' t f m (NValue t f m)) -> m (m1 a) Source #
ToValue
class ToValue a m v where Source #