vessel-0.2.0.0: Functor-parametric containers

Safe HaskellNone
LanguageHaskell2010

Data.Vessel

Synopsis

Documentation

newtype Vessel (k :: ((* -> *) -> *) -> *) (g :: * -> *) Source #

This type is a container for storing an arbitrary collection of functor-parametric container types of the sort discussed above, keyed by a GADT whose index will specify which sort of container goes in each position.

Ordinary types with values have kind * Functors have kind * -> * Containers taking a functor as a parameter then have kind (* -> *) -> * The keys of a vessel are indexed by a functor-parametric container type, so they have kind ((* -> *) -> *) -> * Vessel itself, for any such key type, produces a functor-parametric container, so it has kind (((* -> *) -> *) -> *) -> (* -> *) -> * Law: None of the items in the Vessel's MonoidalDMap are nullV

Constructors

Vessel 

Fields

Instances
(Has View k, GCompare k) => EmptyView (Vessel k) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

emptyV :: Vessel k f Source #

(Has View k, GCompare k) => View (Vessel k) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (Vessel k g) -> Vessel k (Compose t g) Source #

disperseV :: Align t => Vessel k (Compose t g) -> t (Vessel k g) Source #

cropV :: (forall a. s a -> i a -> r a) -> Vessel k s -> Vessel k i -> Maybe (Vessel k r) Source #

nullV :: Vessel k i -> Bool Source #

mapV :: (forall a. f a -> g a) -> Vessel k f -> Vessel k g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> Vessel k f -> m (Vessel k g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> Vessel k f -> Maybe (Vessel k g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> Vessel k f -> Vessel k g -> Maybe (Vessel k h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> Vessel k f -> Vessel k g -> Vessel k h Source #

(GCompare k, Has' Eq k (FlipAp g)) => Eq (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

(==) :: Vessel k g -> Vessel k g -> Bool #

(/=) :: Vessel k g -> Vessel k g -> Bool #

(ForallF Show k, GShow k, Has' Show k (FlipAp g)) => Show (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

showsPrec :: Int -> Vessel k g -> ShowS #

show :: Vessel k g -> String #

showList :: [Vessel k g] -> ShowS #

Generic (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Associated Types

type Rep (Vessel k g) :: Type -> Type #

Methods

from :: Vessel k g -> Rep (Vessel k g) x #

to :: Rep (Vessel k g) x -> Vessel k g #

(Has' Semigroup k (FlipAp g), GCompare k, Has View k) => Semigroup (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

(<>) :: Vessel k g -> Vessel k g -> Vessel k g #

sconcat :: NonEmpty (Vessel k g) -> Vessel k g #

stimes :: Integral b => b -> Vessel k g -> Vessel k g #

(Has' Semigroup k (FlipAp g), GCompare k, Has View k) => Monoid (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

mempty :: Vessel k g #

mappend :: Vessel k g -> Vessel k g -> Vessel k g #

mconcat :: [Vessel k g] -> Vessel k g #

(GCompare k, ForallF ToJSON k, HasV ToJSON k g) => ToJSON (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

toJSON :: Vessel k g -> Value #

toEncoding :: Vessel k g -> Encoding #

toJSONList :: [Vessel k g] -> Value #

toEncodingList :: [Vessel k g] -> Encoding #

(GCompare k, FromJSON (Some k), HasV FromJSON k g, Has View k) => FromJSON (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

parseJSON :: Value -> Parser (Vessel k g) #

parseJSONList :: Value -> Parser [Vessel k g] #

(Has' Semigroup k (FlipAp g), Has' Group k (FlipAp g), GCompare k, Has View k) => Group (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

negateG :: Vessel k g -> Vessel k g #

(~~) :: Vessel k g -> Vessel k g -> Vessel k g #

(Has' Additive k (FlipAp g), Has' Semigroup k (FlipAp g), GCompare k, Has View k) => Additive (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

(Has View k, GCompare k, Has' Semigroup k (FlipAp (Compose c (VesselLeafWrapper (QueryResult (Vessel k g))))), Query (Vessel k g)) => Query (Vessel k (Compose c g)) Source # 
Instance details

Defined in Data.Vessel.Vessel

Associated Types

type QueryResult (Vessel k (Compose c g)) :: Type #

Methods

crop :: Vessel k (Compose c g) -> QueryResult (Vessel k (Compose c g)) -> QueryResult (Vessel k (Compose c g)) #

(Has View k, GCompare k, Has' Semigroup k (FlipAp Identity)) => Query (Vessel k (Proxy :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.Vessel

Associated Types

type QueryResult (Vessel k Proxy) :: Type #

(Has View k, GCompare k, Has' Semigroup k (FlipAp Identity)) => Query (Vessel k (Const x :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.Vessel

Associated Types

type QueryResult (Vessel k (Const x)) :: Type #

Methods

crop :: Vessel k (Const x) -> QueryResult (Vessel k (Const x)) -> QueryResult (Vessel k (Const x)) #

type ViewQueryResult (Vessel v g :: Type) Source # 
Instance details

Defined in Data.Vessel.Vessel

type Rep (Vessel k g) Source # 
Instance details

Defined in Data.Vessel.Vessel

type Rep (Vessel k g) = D1 (MetaData "Vessel" "Data.Vessel.Vessel" "vessel-0.2.0.0-inplace" True) (C1 (MetaCons "Vessel" PrefixI True) (S1 (MetaSel (Just "unVessel") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MonoidalDMap k (FlipAp g)))))
type QueryResult (Vessel k (Proxy :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.Vessel

type QueryResult (Vessel k (Const x :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.Vessel

type QueryResult (Vessel k (Compose c g)) Source # 
Instance details

Defined in Data.Vessel.Vessel

class View (v :: (* -> *) -> *) where Source #

Our containers are parameterised by a choice of functor to apply at the leaves of their structure. By applying them to Identity, we obtain ordinary containers for data, called "views". By applying them to Proxy, we obtain what are effectively blank forms to be filled in, called "queries" or "view selectors". By using a functor such as Map k, information about many queries or their results may be aggregated together into a single container.

This class codifies the operations we need to be able to perform on these container types in order to transpose various Map-like structures into and out of them.

This is done for the purposes of, on the one hand collecting many users' view selectors into a single aggregated selector containing information about who is interested in each part (condenseV), and on the other hand, taking the resulting aggregated views and splitting them into a Map of views for each user (disperseV).

It also specifies the cropV operation which restricts a view to a particular selection, as well as operations for mapping functions over all the leaves of the container.

Minimal complete definition

Nothing

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (v g) -> v (Compose t g) Source #

Transpose a sufficiently-Map-like structure into a container, effectively aggregating many structures into a single one containing information about which keys each part of it came from originally.

condenseV :: GCondenseView t g v => t (v g) -> v (Compose t g) Source #

Transpose a sufficiently-Map-like structure into a container, effectively aggregating many structures into a single one containing information about which keys each part of it came from originally.

disperseV :: Align t => v (Compose t g) -> t (v g) Source #

Transpose a sufficiently-Map-like structure out of a container, the inverse of condenseV.

disperseV :: GDisperseView t g v => v (Compose t g) -> t (v g) Source #

Transpose a sufficiently-Map-like structure out of a container, the inverse of condenseV.

cropV :: (forall a. s a -> i a -> r a) -> v s -> v i -> Maybe (v r) Source #

Given a structure specifying a query, and a structure representing a view of data, restrict the view to only those parts which satisfy the query. (Essentially intersection of Maps.)

cropV :: forall s i r. GZipView s i r v => (forall a. s a -> i a -> r a) -> v s -> v i -> Maybe (v r) Source #

Given a structure specifying a query, and a structure representing a view of data, restrict the view to only those parts which satisfy the query. (Essentially intersection of Maps.)

nullV :: v i -> Bool Source #

We also want a way to determine if the container is empty, because shipping empty containers around is a bad idea.

nullV :: forall i. GMapView i i v => v i -> Bool Source #

We also want a way to determine if the container is empty, because shipping empty containers around is a bad idea.

mapV :: (forall a. f a -> g a) -> v f -> v g Source #

Map a natural transformation over all the leaves of a container, changing the functor which has been applied.

mapV :: GMapView f g v => (forall a. f a -> g a) -> v f -> v g Source #

Map a natural transformation over all the leaves of a container, changing the functor which has been applied.

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> v f -> m (v g) Source #

Traverse over the leaves of a container.

traverseV :: (GMapView f g v, Applicative m) => (forall a. f a -> m (g a)) -> v f -> m (v g) Source #

Traverse over the leaves of a container.

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> v f -> Maybe (v g) Source #

Map over all the leaves of a container, keeping only the Just results and returing Nothing if no leaves are kept.

mapMaybeV :: forall f g. GMapView f g v => (forall a. f a -> Maybe (g a)) -> v f -> Maybe (v g) Source #

Map over all the leaves of a container, keeping only the Just results and returing Nothing if no leaves are kept.

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> v f -> v g -> Maybe (v h) Source #

Map over all the leaves of two containers, combining the leaves with the provided function, keeping only the Just results and returing Nothing if no leaves are kept.

alignWithMaybeV :: forall f g h. GZipView f g h v => (forall a. These (f a) (g a) -> Maybe (h a)) -> v f -> v g -> Maybe (v h) Source #

Map over all the leaves of two containers, combining the leaves with the provided function, keeping only the Just results and returing Nothing if no leaves are kept.

alignWithV :: (forall a. These (f a) (g a) -> h a) -> v f -> v g -> v h Source #

Map over all the leaves of two containers, combining the leaves with the provided function

alignWithV :: GZipView f g h v => (forall a. These (f a) (g a) -> h a) -> v f -> v g -> v h Source #

Map over all the leaves of two containers, combining the leaves with the provided function

Instances
View (Proxy :: (Type -> Type) -> Type) Source #

a completely empty view.

Instance details

Defined in Data.Vessel.Class

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (Proxy g) -> Proxy (Compose t g) Source #

disperseV :: Align t => Proxy (Compose t g) -> t (Proxy g) Source #

cropV :: (forall a. s a -> i a -> r a) -> Proxy s -> Proxy i -> Maybe (Proxy r) Source #

nullV :: Proxy i -> Bool Source #

mapV :: (forall a. f a -> g a) -> Proxy f -> Proxy g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> Proxy f -> m (Proxy g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> Proxy f -> Maybe (Proxy g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> Proxy f -> Proxy g -> Maybe (Proxy h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> Proxy f -> Proxy g -> Proxy h Source #

(Has View k, GCompare k) => View (Vessel k) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (Vessel k g) -> Vessel k (Compose t g) Source #

disperseV :: Align t => Vessel k (Compose t g) -> t (Vessel k g) Source #

cropV :: (forall a. s a -> i a -> r a) -> Vessel k s -> Vessel k i -> Maybe (Vessel k r) Source #

nullV :: Vessel k i -> Bool Source #

mapV :: (forall a. f a -> g a) -> Vessel k f -> Vessel k g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> Vessel k f -> m (Vessel k g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> Vessel k f -> Maybe (Vessel k g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> Vessel k f -> Vessel k g -> Maybe (Vessel k h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> Vessel k f -> Vessel k g -> Vessel k h Source #

View (SingleV a) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (SingleV a g) -> SingleV a (Compose t g) Source #

disperseV :: Align t => SingleV a (Compose t g) -> t (SingleV a g) Source #

cropV :: (forall a0. s a0 -> i a0 -> r a0) -> SingleV a s -> SingleV a i -> Maybe (SingleV a r) Source #

nullV :: SingleV a i -> Bool Source #

mapV :: (forall a0. f a0 -> g a0) -> SingleV a f -> SingleV a g Source #

traverseV :: Applicative m => (forall a0. f a0 -> m (g a0)) -> SingleV a f -> m (SingleV a g) Source #

mapMaybeV :: (forall a0. f a0 -> Maybe (g a0)) -> SingleV a f -> Maybe (SingleV a g) Source #

alignWithMaybeV :: (forall a0. These (f a0) (g a0) -> Maybe (h a0)) -> SingleV a f -> SingleV a g -> Maybe (SingleV a h) Source #

alignWithV :: (forall a0. These (f a0) (g a0) -> h a0) -> SingleV a f -> SingleV a g -> SingleV a h Source #

View (IdentityV a) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (IdentityV a g) -> IdentityV a (Compose t g) Source #

disperseV :: Align t => IdentityV a (Compose t g) -> t (IdentityV a g) Source #

cropV :: (forall a0. s a0 -> i a0 -> r a0) -> IdentityV a s -> IdentityV a i -> Maybe (IdentityV a r) Source #

nullV :: IdentityV a i -> Bool Source #

mapV :: (forall a0. f a0 -> g a0) -> IdentityV a f -> IdentityV a g Source #

traverseV :: Applicative m => (forall a0. f a0 -> m (g a0)) -> IdentityV a f -> m (IdentityV a g) Source #

mapMaybeV :: (forall a0. f a0 -> Maybe (g a0)) -> IdentityV a f -> Maybe (IdentityV a g) Source #

alignWithMaybeV :: (forall a0. These (f a0) (g a0) -> Maybe (h a0)) -> IdentityV a f -> IdentityV a g -> Maybe (IdentityV a h) Source #

alignWithV :: (forall a0. These (f a0) (g a0) -> h a0) -> IdentityV a f -> IdentityV a g -> IdentityV a h Source #

GCompare k => View (MonoidalDMap k) Source # 
Instance details

Defined in Data.Vessel.Class

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (MonoidalDMap k g) -> MonoidalDMap k (Compose t g) Source #

disperseV :: Align t => MonoidalDMap k (Compose t g) -> t (MonoidalDMap k g) Source #

cropV :: (forall a. s a -> i a -> r a) -> MonoidalDMap k s -> MonoidalDMap k i -> Maybe (MonoidalDMap k r) Source #

nullV :: MonoidalDMap k i -> Bool Source #

mapV :: (forall a. f a -> g a) -> MonoidalDMap k f -> MonoidalDMap k g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> MonoidalDMap k f -> m (MonoidalDMap k g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> MonoidalDMap k f -> Maybe (MonoidalDMap k g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> MonoidalDMap k f -> MonoidalDMap k g -> Maybe (MonoidalDMap k h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> MonoidalDMap k f -> MonoidalDMap k g -> MonoidalDMap k h Source #

GCompare k => View (DMapV k v) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (DMapV k v g) -> DMapV k v (Compose t g) Source #

disperseV :: Align t => DMapV k v (Compose t g) -> t (DMapV k v g) Source #

cropV :: (forall a. s a -> i a -> r a) -> DMapV k v s -> DMapV k v i -> Maybe (DMapV k v r) Source #

nullV :: DMapV k v i -> Bool Source #

mapV :: (forall a. f a -> g a) -> DMapV k v f -> DMapV k v g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> DMapV k v f -> m (DMapV k v g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> DMapV k v f -> Maybe (DMapV k v g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> DMapV k v f -> DMapV k v g -> Maybe (DMapV k v h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> DMapV k v f -> DMapV k v g -> DMapV k v h Source #

(Ord k, View v) => View (SubVessel k v) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (SubVessel k v g) -> SubVessel k v (Compose t g) Source #

disperseV :: Align t => SubVessel k v (Compose t g) -> t (SubVessel k v g) Source #

cropV :: (forall a. s a -> i a -> r a) -> SubVessel k v s -> SubVessel k v i -> Maybe (SubVessel k v r) Source #

nullV :: SubVessel k v i -> Bool Source #

mapV :: (forall a. f a -> g a) -> SubVessel k v f -> SubVessel k v g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> SubVessel k v f -> m (SubVessel k v g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> SubVessel k v f -> Maybe (SubVessel k v g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> SubVessel k v f -> SubVessel k v g -> Maybe (SubVessel k v h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> SubVessel k v f -> SubVessel k v g -> SubVessel k v h Source #

Ord k => View (MapV k v) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (MapV k v g) -> MapV k v (Compose t g) Source #

disperseV :: Align t => MapV k v (Compose t g) -> t (MapV k v g) Source #

cropV :: (forall a. s a -> i a -> r a) -> MapV k v s -> MapV k v i -> Maybe (MapV k v r) Source #

nullV :: MapV k v i -> Bool Source #

mapV :: (forall a. f a -> g a) -> MapV k v f -> MapV k v g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> MapV k v f -> m (MapV k v g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> MapV k v f -> Maybe (MapV k v g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> MapV k v f -> MapV k v g -> Maybe (MapV k v h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> MapV k v f -> MapV k v g -> MapV k v h Source #

class View v => EmptyView v where Source #

A type v supports EmptyView iff it is able to contain no information.

Methods

emptyV :: v f Source #

Instances
(Has View k, GCompare k) => EmptyView (Vessel k) Source # 
Instance details

Defined in Data.Vessel.Vessel

Methods

emptyV :: Vessel k f Source #

GCompare k => EmptyView (MonoidalDMap k) Source # 
Instance details

Defined in Data.Vessel.Class

Methods

emptyV :: MonoidalDMap k f Source #

GCompare k => EmptyView (DMapV k v) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

emptyV :: DMapV k v f Source #

(Ord k, View v) => EmptyView (SubVessel k v) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

emptyV :: SubVessel k v f Source #

Ord k => EmptyView (MapV k v) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

emptyV :: MapV k v f Source #

class Selectable v k where Source #

Associated Types

type Selection v k Source #

A more convenient type to use for extracting results.

Methods

selector :: (forall a. p a) -> k -> v p Source #

Build a query given a suitable value for specifying what we're asking for. p will typically be Proxy or Const SelectedCount.

selection :: k -> v Identity -> Selection v k Source #

From a view, extract a more convenient type of value to use.

Instances
Selectable (SingleV a) () Source # 
Instance details

Defined in Data.Vessel.Single

Associated Types

type Selection (SingleV a) () :: Type Source #

Methods

selector :: (forall a0. p a0) -> () -> SingleV a p Source #

selection :: () -> SingleV a Identity -> Selection (SingleV a) () Source #

Selectable (IdentityV a) () Source # 
Instance details

Defined in Data.Vessel.Identity

Associated Types

type Selection (IdentityV a) () :: Type Source #

Methods

selector :: (forall a0. p a0) -> () -> IdentityV a p Source #

selection :: () -> IdentityV a Identity -> Selection (IdentityV a) () Source #

GCompare k => Selectable (DMapV k v) (Set (Some k)) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Associated Types

type Selection (DMapV k v) (Set (Some k)) :: Type Source #

Methods

selector :: (forall a. p a) -> Set (Some k) -> DMapV k v p Source #

selection :: Set (Some k) -> DMapV k v Identity -> Selection (DMapV k v) (Set (Some k)) Source #

Ord k => Selectable (MapV k v) (Identity k) Source # 
Instance details

Defined in Data.Vessel.Map

Associated Types

type Selection (MapV k v) (Identity k) :: Type Source #

Methods

selector :: (forall a. p a) -> Identity k -> MapV k v p Source #

selection :: Identity k -> MapV k v Identity -> Selection (MapV k v) (Identity k) Source #

Ord k => Selectable (MapV k v) (Set k) Source # 
Instance details

Defined in Data.Vessel.Map

Associated Types

type Selection (MapV k v) (Set k) :: Type Source #

Methods

selector :: (forall a. p a) -> Set k -> MapV k v p Source #

selection :: Set k -> MapV k v Identity -> Selection (MapV k v) (Set k) Source #

newtype FlipAp (g :: k) (v :: k -> *) Source #

Constructors

FlipAp 

Fields

Instances
Eq (v g) => Eq (FlipAp g v) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

(==) :: FlipAp g v -> FlipAp g v -> Bool #

(/=) :: FlipAp g v -> FlipAp g v -> Bool #

Ord (v g) => Ord (FlipAp g v) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

compare :: FlipAp g v -> FlipAp g v -> Ordering #

(<) :: FlipAp g v -> FlipAp g v -> Bool #

(<=) :: FlipAp g v -> FlipAp g v -> Bool #

(>) :: FlipAp g v -> FlipAp g v -> Bool #

(>=) :: FlipAp g v -> FlipAp g v -> Bool #

max :: FlipAp g v -> FlipAp g v -> FlipAp g v #

min :: FlipAp g v -> FlipAp g v -> FlipAp g v #

Show (v g) => Show (FlipAp g v) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

showsPrec :: Int -> FlipAp g v -> ShowS #

show :: FlipAp g v -> String #

showList :: [FlipAp g v] -> ShowS #

Semigroup (v g) => Semigroup (FlipAp g v) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

(<>) :: FlipAp g v -> FlipAp g v -> FlipAp g v #

sconcat :: NonEmpty (FlipAp g v) -> FlipAp g v #

stimes :: Integral b => b -> FlipAp g v -> FlipAp g v #

Monoid (v g) => Monoid (FlipAp g v) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

mempty :: FlipAp g v #

mappend :: FlipAp g v -> FlipAp g v -> FlipAp g v #

mconcat :: [FlipAp g v] -> FlipAp g v #

Group (v g) => Group (FlipAp g v) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

negateG :: FlipAp g v -> FlipAp g v #

(~~) :: FlipAp g v -> FlipAp g v -> FlipAp g v #

Additive (v g) => Additive (FlipAp g v) Source # 
Instance details

Defined in Data.Vessel.Internal

newtype IdentityV (a :: *) (g :: * -> *) Source #

A functor-indexed container corresponding to Identity. (i.e. a single non-deletable item)

Constructors

IdentityV 

Fields

Instances
View (IdentityV a) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (IdentityV a g) -> IdentityV a (Compose t g) Source #

disperseV :: Align t => IdentityV a (Compose t g) -> t (IdentityV a g) Source #

cropV :: (forall a0. s a0 -> i a0 -> r a0) -> IdentityV a s -> IdentityV a i -> Maybe (IdentityV a r) Source #

nullV :: IdentityV a i -> Bool Source #

mapV :: (forall a0. f a0 -> g a0) -> IdentityV a f -> IdentityV a g Source #

traverseV :: Applicative m => (forall a0. f a0 -> m (g a0)) -> IdentityV a f -> m (IdentityV a g) Source #

mapMaybeV :: (forall a0. f a0 -> Maybe (g a0)) -> IdentityV a f -> Maybe (IdentityV a g) Source #

alignWithMaybeV :: (forall a0. These (f a0) (g a0) -> Maybe (h a0)) -> IdentityV a f -> IdentityV a g -> Maybe (IdentityV a h) Source #

alignWithV :: (forall a0. These (f a0) (g a0) -> h a0) -> IdentityV a f -> IdentityV a g -> IdentityV a h Source #

Selectable (IdentityV a) () Source # 
Instance details

Defined in Data.Vessel.Identity

Associated Types

type Selection (IdentityV a) () :: Type Source #

Methods

selector :: (forall a0. p a0) -> () -> IdentityV a p Source #

selection :: () -> IdentityV a Identity -> Selection (IdentityV a) () Source #

Eq (g a) => Eq (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

(==) :: IdentityV a g -> IdentityV a g -> Bool #

(/=) :: IdentityV a g -> IdentityV a g -> Bool #

Ord (g a) => Ord (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

compare :: IdentityV a g -> IdentityV a g -> Ordering #

(<) :: IdentityV a g -> IdentityV a g -> Bool #

(<=) :: IdentityV a g -> IdentityV a g -> Bool #

(>) :: IdentityV a g -> IdentityV a g -> Bool #

(>=) :: IdentityV a g -> IdentityV a g -> Bool #

max :: IdentityV a g -> IdentityV a g -> IdentityV a g #

min :: IdentityV a g -> IdentityV a g -> IdentityV a g #

Read (g a) => Read (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Show (g a) => Show (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

showsPrec :: Int -> IdentityV a g -> ShowS #

show :: IdentityV a g -> String #

showList :: [IdentityV a g] -> ShowS #

Generic (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Associated Types

type Rep (IdentityV a g) :: Type -> Type #

Methods

from :: IdentityV a g -> Rep (IdentityV a g) x #

to :: Rep (IdentityV a g) x -> IdentityV a g #

Semigroup (g a) => Semigroup (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

(<>) :: IdentityV a g -> IdentityV a g -> IdentityV a g #

sconcat :: NonEmpty (IdentityV a g) -> IdentityV a g #

stimes :: Integral b => b -> IdentityV a g -> IdentityV a g #

Monoid (g a) => Monoid (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

mempty :: IdentityV a g #

mappend :: IdentityV a g -> IdentityV a g -> IdentityV a g #

mconcat :: [IdentityV a g] -> IdentityV a g #

ToJSON (g a) => ToJSON (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

FromJSON (g a) => FromJSON (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Group (g a) => Group (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

Methods

negateG :: IdentityV a g -> IdentityV a g #

(~~) :: IdentityV a g -> IdentityV a g -> IdentityV a g #

Semigroup (g a) => Additive (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

type Selection (IdentityV a) () Source # 
Instance details

Defined in Data.Vessel.Identity

type Selection (IdentityV a) () = a
type ViewQueryResult (IdentityV a (Const g :: Type -> Type) :: Type) Source # 
Instance details

Defined in Data.Vessel.Identity

type Rep (IdentityV a g) Source # 
Instance details

Defined in Data.Vessel.Identity

type Rep (IdentityV a g) = D1 (MetaData "IdentityV" "Data.Vessel.Identity" "vessel-0.2.0.0-inplace" True) (C1 (MetaCons "IdentityV" PrefixI True) (S1 (MetaSel (Just "unIdentityV") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (g a))))

newtype SingleV (a :: *) (g :: * -> *) Source #

A functor-indexed container for a single deletable item.

Constructors

SingleV 

Fields

Instances
View (SingleV a) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (SingleV a g) -> SingleV a (Compose t g) Source #

disperseV :: Align t => SingleV a (Compose t g) -> t (SingleV a g) Source #

cropV :: (forall a0. s a0 -> i a0 -> r a0) -> SingleV a s -> SingleV a i -> Maybe (SingleV a r) Source #

nullV :: SingleV a i -> Bool Source #

mapV :: (forall a0. f a0 -> g a0) -> SingleV a f -> SingleV a g Source #

traverseV :: Applicative m => (forall a0. f a0 -> m (g a0)) -> SingleV a f -> m (SingleV a g) Source #

mapMaybeV :: (forall a0. f a0 -> Maybe (g a0)) -> SingleV a f -> Maybe (SingleV a g) Source #

alignWithMaybeV :: (forall a0. These (f a0) (g a0) -> Maybe (h a0)) -> SingleV a f -> SingleV a g -> Maybe (SingleV a h) Source #

alignWithV :: (forall a0. These (f a0) (g a0) -> h a0) -> SingleV a f -> SingleV a g -> SingleV a h Source #

Selectable (SingleV a) () Source # 
Instance details

Defined in Data.Vessel.Single

Associated Types

type Selection (SingleV a) () :: Type Source #

Methods

selector :: (forall a0. p a0) -> () -> SingleV a p Source #

selection :: () -> SingleV a Identity -> Selection (SingleV a) () Source #

Eq (g (First (Maybe a))) => Eq (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

(==) :: SingleV a g -> SingleV a g -> Bool #

(/=) :: SingleV a g -> SingleV a g -> Bool #

Ord (g (First (Maybe a))) => Ord (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

compare :: SingleV a g -> SingleV a g -> Ordering #

(<) :: SingleV a g -> SingleV a g -> Bool #

(<=) :: SingleV a g -> SingleV a g -> Bool #

(>) :: SingleV a g -> SingleV a g -> Bool #

(>=) :: SingleV a g -> SingleV a g -> Bool #

max :: SingleV a g -> SingleV a g -> SingleV a g #

min :: SingleV a g -> SingleV a g -> SingleV a g #

Read (g (First (Maybe a))) => Read (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Show (g (First (Maybe a))) => Show (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

showsPrec :: Int -> SingleV a g -> ShowS #

show :: SingleV a g -> String #

showList :: [SingleV a g] -> ShowS #

Generic (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Associated Types

type Rep (SingleV a g) :: Type -> Type #

Methods

from :: SingleV a g -> Rep (SingleV a g) x #

to :: Rep (SingleV a g) x -> SingleV a g #

Semigroup (g (First (Maybe a))) => Semigroup (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

(<>) :: SingleV a g -> SingleV a g -> SingleV a g #

sconcat :: NonEmpty (SingleV a g) -> SingleV a g #

stimes :: Integral b => b -> SingleV a g -> SingleV a g #

Monoid (g (First (Maybe a))) => Monoid (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

mempty :: SingleV a g #

mappend :: SingleV a g -> SingleV a g -> SingleV a g #

mconcat :: [SingleV a g] -> SingleV a g #

ToJSON (g (First (Maybe a))) => ToJSON (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

FromJSON (g (First (Maybe a))) => FromJSON (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Group (g (First (Maybe a))) => Group (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

Methods

negateG :: SingleV a g -> SingleV a g #

(~~) :: SingleV a g -> SingleV a g -> SingleV a g #

Additive (g (First (Maybe a))) => Additive (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

type Selection (SingleV a) () Source # 
Instance details

Defined in Data.Vessel.Single

type Selection (SingleV a) () = Maybe a
type ViewQueryResult (SingleV a (Const g :: Type -> Type) :: Type) Source # 
Instance details

Defined in Data.Vessel.Single

type Rep (SingleV a g) Source # 
Instance details

Defined in Data.Vessel.Single

type Rep (SingleV a g) = D1 (MetaData "SingleV" "Data.Vessel.Single" "vessel-0.2.0.0-inplace" True) (C1 (MetaCons "SingleV" PrefixI True) (S1 (MetaSel (Just "unSingleV") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (g (First (Maybe a))))))

newtype MapV k v g Source #

A functor-indexed container corresponding to Map k v.

Constructors

MapV 

Fields

Instances
Ord k => EmptyView (MapV k v) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

emptyV :: MapV k v f Source #

Ord k => View (MapV k v) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (MapV k v g) -> MapV k v (Compose t g) Source #

disperseV :: Align t => MapV k v (Compose t g) -> t (MapV k v g) Source #

cropV :: (forall a. s a -> i a -> r a) -> MapV k v s -> MapV k v i -> Maybe (MapV k v r) Source #

nullV :: MapV k v i -> Bool Source #

mapV :: (forall a. f a -> g a) -> MapV k v f -> MapV k v g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> MapV k v f -> m (MapV k v g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> MapV k v f -> Maybe (MapV k v g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> MapV k v f -> MapV k v g -> Maybe (MapV k v h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> MapV k v f -> MapV k v g -> MapV k v h Source #

Ord k => Selectable (MapV k v) (Identity k) Source # 
Instance details

Defined in Data.Vessel.Map

Associated Types

type Selection (MapV k v) (Identity k) :: Type Source #

Methods

selector :: (forall a. p a) -> Identity k -> MapV k v p Source #

selection :: Identity k -> MapV k v Identity -> Selection (MapV k v) (Identity k) Source #

Ord k => Selectable (MapV k v) (Set k) Source # 
Instance details

Defined in Data.Vessel.Map

Associated Types

type Selection (MapV k v) (Set k) :: Type Source #

Methods

selector :: (forall a. p a) -> Set k -> MapV k v p Source #

selection :: Set k -> MapV k v Identity -> Selection (MapV k v) (Set k) Source #

(Eq k1, Eq (g v)) => Eq (MapV k1 v g) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

(==) :: MapV k1 v g -> MapV k1 v g -> Bool #

(/=) :: MapV k1 v g -> MapV k1 v g -> Bool #

(Ord k1, Ord (g v)) => Ord (MapV k1 v g) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

compare :: MapV k1 v g -> MapV k1 v g -> Ordering #

(<) :: MapV k1 v g -> MapV k1 v g -> Bool #

(<=) :: MapV k1 v g -> MapV k1 v g -> Bool #

(>) :: MapV k1 v g -> MapV k1 v g -> Bool #

(>=) :: MapV k1 v g -> MapV k1 v g -> Bool #

max :: MapV k1 v g -> MapV k1 v g -> MapV k1 v g #

min :: MapV k1 v g -> MapV k1 v g -> MapV k1 v g #

(Ord k1, Read k1, Read (g v)) => Read (MapV k1 v g) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

readsPrec :: Int -> ReadS (MapV k1 v g) #

readList :: ReadS [MapV k1 v g] #

readPrec :: ReadPrec (MapV k1 v g) #

readListPrec :: ReadPrec [MapV k1 v g] #

(Show k1, Show (g v)) => Show (MapV k1 v g) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

showsPrec :: Int -> MapV k1 v g -> ShowS #

show :: MapV k1 v g -> String #

showList :: [MapV k1 v g] -> ShowS #

Generic (MapV k1 v g) Source # 
Instance details

Defined in Data.Vessel.Map

Associated Types

type Rep (MapV k1 v g) :: Type -> Type #

Methods

from :: MapV k1 v g -> Rep (MapV k1 v g) x #

to :: Rep (MapV k1 v g) x -> MapV k1 v g #

(Ord k1, Ord k2, Semigroup v) => Semigroup (MapV k1 v (Compose (MonoidalMap k2) Identity)) Source # 
Instance details

Defined in Data.Vessel.Map

(Semigroup v, Ord k) => Semigroup (MapV k v Identity) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

(<>) :: MapV k v Identity -> MapV k v Identity -> MapV k v Identity #

sconcat :: NonEmpty (MapV k v Identity) -> MapV k v Identity #

stimes :: Integral b => b -> MapV k v Identity -> MapV k v Identity #

(Ord k1, Ord k2, Monoid g, Eq g) => Semigroup (MapV k1 v (Compose (MonoidalMap k2) (Const g :: k -> Type))) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

(<>) :: MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

sconcat :: NonEmpty (MapV k1 v (Compose (MonoidalMap k2) (Const g))) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

stimes :: Integral b => b -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

(Ord k2, Eq g, Monoid g) => Semigroup (MapV k2 v (Const g :: k1 -> Type)) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

(<>) :: MapV k2 v (Const g) -> MapV k2 v (Const g) -> MapV k2 v (Const g) #

sconcat :: NonEmpty (MapV k2 v (Const g)) -> MapV k2 v (Const g) #

stimes :: Integral b => b -> MapV k2 v (Const g) -> MapV k2 v (Const g) #

(Semigroup v, Ord k) => Monoid (MapV k v Identity) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

mempty :: MapV k v Identity #

mappend :: MapV k v Identity -> MapV k v Identity -> MapV k v Identity #

mconcat :: [MapV k v Identity] -> MapV k v Identity #

(Ord k1, Ord k2, Monoid g, Eq g) => Monoid (MapV k1 v (Compose (MonoidalMap k2) (Const g :: k -> Type))) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

mempty :: MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

mappend :: MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

mconcat :: [MapV k1 v (Compose (MonoidalMap k2) (Const g))] -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

(Ord k2, Eq g, Monoid g) => Monoid (MapV k2 v (Const g :: k1 -> Type)) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

mempty :: MapV k2 v (Const g) #

mappend :: MapV k2 v (Const g) -> MapV k2 v (Const g) -> MapV k2 v (Const g) #

mconcat :: [MapV k2 v (Const g)] -> MapV k2 v (Const g) #

(ToJSONKey k2, ToJSON (g v), Ord k2) => ToJSON (MapV k2 v g) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

toJSON :: MapV k2 v g -> Value #

toEncoding :: MapV k2 v g -> Encoding #

toJSONList :: [MapV k2 v g] -> Value #

toEncodingList :: [MapV k2 v g] -> Encoding #

(FromJSONKey k2, FromJSON (g v), Ord k2) => FromJSON (MapV k2 v g) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

parseJSON :: Value -> Parser (MapV k2 v g) #

parseJSONList :: Value -> Parser [MapV k2 v g] #

(Ord k1, Ord k2, Group g, Eq g) => Group (MapV k1 v (Compose (MonoidalMap k2) (Const g :: k -> Type))) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

negateG :: MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

(~~) :: MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) -> MapV k1 v (Compose (MonoidalMap k2) (Const g)) #

(Ord k2, Eq g, Group g) => Group (MapV k2 v (Const g :: k1 -> Type)) Source # 
Instance details

Defined in Data.Vessel.Map

Methods

negateG :: MapV k2 v (Const g) -> MapV k2 v (Const g) #

(~~) :: MapV k2 v (Const g) -> MapV k2 v (Const g) -> MapV k2 v (Const g) #

(Ord k1, Ord k2, Additive g, Group g, Eq g) => Additive (MapV k1 v (Compose (MonoidalMap k2) (Const g :: k -> Type))) Source # 
Instance details

Defined in Data.Vessel.Map

(Ord k2, Eq g, Group g, Additive g) => Additive (MapV k2 v (Const g :: k1 -> Type)) Source # 
Instance details

Defined in Data.Vessel.Map

type ViewQueryResult (MapV k2 v g :: Type) Source # 
Instance details

Defined in Data.Vessel.Map

type ViewQueryResult (MapV k2 v g :: Type) = MapV k2 v (ViewQueryResult g)
type Selection (MapV k v) (Identity k) Source # 
Instance details

Defined in Data.Vessel.Map

type Selection (MapV k v) (Identity k) = Maybe v
type Selection (MapV k v) (Set k) Source # 
Instance details

Defined in Data.Vessel.Map

type Selection (MapV k v) (Set k) = MonoidalMap k v
type Rep (MapV k1 v g) Source # 
Instance details

Defined in Data.Vessel.Map

type Rep (MapV k1 v g) = D1 (MetaData "MapV" "Data.Vessel.Map" "vessel-0.2.0.0-inplace" True) (C1 (MetaCons "MapV" PrefixI True) (S1 (MetaSel (Just "unMapV") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MonoidalMap k1 (g v)))))

newtype DMapV (k :: * -> *) (v :: * -> *) g Source #

A functor-indexed container corrresponding to DMap k v.

Constructors

DMapV 

Fields

Instances
GCompare k => EmptyView (DMapV k v) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

emptyV :: DMapV k v f Source #

GCompare k => View (DMapV k v) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (DMapV k v g) -> DMapV k v (Compose t g) Source #

disperseV :: Align t => DMapV k v (Compose t g) -> t (DMapV k v g) Source #

cropV :: (forall a. s a -> i a -> r a) -> DMapV k v s -> DMapV k v i -> Maybe (DMapV k v r) Source #

nullV :: DMapV k v i -> Bool Source #

mapV :: (forall a. f a -> g a) -> DMapV k v f -> DMapV k v g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> DMapV k v f -> m (DMapV k v g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> DMapV k v f -> Maybe (DMapV k v g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> DMapV k v f -> DMapV k v g -> Maybe (DMapV k v h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> DMapV k v f -> DMapV k v g -> DMapV k v h Source #

GCompare k => Selectable (DMapV k v) (Set (Some k)) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Associated Types

type Selection (DMapV k v) (Set (Some k)) :: Type Source #

Methods

selector :: (forall a. p a) -> Set (Some k) -> DMapV k v p Source #

selection :: Set (Some k) -> DMapV k v Identity -> Selection (DMapV k v) (Set (Some k)) Source #

(GCompare k, Has' Eq k (Compose g v)) => Eq (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

(==) :: DMapV k v g -> DMapV k v g -> Bool #

(/=) :: DMapV k v g -> DMapV k v g -> Bool #

(GCompare k, Has' Eq k (Compose g v), Has' Ord k (Compose g v)) => Ord (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

compare :: DMapV k v g -> DMapV k v g -> Ordering #

(<) :: DMapV k v g -> DMapV k v g -> Bool #

(<=) :: DMapV k v g -> DMapV k v g -> Bool #

(>) :: DMapV k v g -> DMapV k v g -> Bool #

(>=) :: DMapV k v g -> DMapV k v g -> Bool #

max :: DMapV k v g -> DMapV k v g -> DMapV k v g #

min :: DMapV k v g -> DMapV k v g -> DMapV k v g #

(ForallF Show k, Has' Show k (Compose g v)) => Show (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

showsPrec :: Int -> DMapV k v g -> ShowS #

show :: DMapV k v g -> String #

showList :: [DMapV k v g] -> ShowS #

Generic (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Associated Types

type Rep (DMapV k v g) :: Type -> Type #

Methods

from :: DMapV k v g -> Rep (DMapV k v g) x #

to :: Rep (DMapV k v g) x -> DMapV k v g #

(GCompare k, Has' Semigroup k (Compose g v)) => Semigroup (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

(<>) :: DMapV k v g -> DMapV k v g -> DMapV k v g #

sconcat :: NonEmpty (DMapV k v g) -> DMapV k v g #

stimes :: Integral b => b -> DMapV k v g -> DMapV k v g #

(GCompare k, Has' Semigroup k (Compose g v), Has' Monoid k (Compose g v)) => Monoid (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

mempty :: DMapV k v g #

mappend :: DMapV k v g -> DMapV k v g -> DMapV k v g #

mconcat :: [DMapV k v g] -> DMapV k v g #

(Has' ToJSON k (Compose g v), ForallF ToJSON k) => ToJSON (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

toJSON :: DMapV k v g -> Value #

toEncoding :: DMapV k v g -> Encoding #

toJSONList :: [DMapV k v g] -> Value #

toEncodingList :: [DMapV k v g] -> Encoding #

(Has' FromJSON k (Compose g v), FromJSON (Some k), GCompare k) => FromJSON (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

parseJSON :: Value -> Parser (DMapV k v g) #

parseJSONList :: Value -> Parser [DMapV k v g] #

(GCompare k, Has' Semigroup k (Compose g v), Has' Monoid k (Compose g v), Has' Group k (Compose g v)) => Group (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

Methods

negateG :: DMapV k v g -> DMapV k v g #

(~~) :: DMapV k v g -> DMapV k v g -> DMapV k v g #

(GCompare k, Has' Semigroup k (Compose g v), Has' Monoid k (Compose g v), Has' Group k (Compose g v), Has' Additive k (Compose g v)) => Additive (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

type Selection (DMapV k v) (Set (Some k)) Source # 
Instance details

Defined in Data.Vessel.DependentMap

type Selection (DMapV k v) (Set (Some k)) = MonoidalDMap k v
type Rep (DMapV k v g) Source # 
Instance details

Defined in Data.Vessel.DependentMap

type Rep (DMapV k v g) = D1 (MetaData "DMapV" "Data.Vessel.DependentMap" "vessel-0.2.0.0-inplace" True) (C1 (MetaCons "DMapV" PrefixI True) (S1 (MetaSel (Just "unDMapV") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MonoidalDMap k (Compose g v)))))

singletonV :: View v => k v -> v g -> Vessel k g Source #

lookupV :: GCompare k => k v -> Vessel k g -> Maybe (v g) Source #

buildV :: (GCompare k, Has View k, Applicative m) => Vessel k g -> (forall v. k v -> v g -> m (v h)) -> m (Vessel k h) Source #

subtractV :: View v => v f -> v g -> Maybe (v f) Source #

mapMaybeWithKeyV :: (GCompare k, Has View k) => (forall v. View v => k v -> v g -> Maybe (v g')) -> Vessel k g -> Vessel k g' Source #

traverseWithKeyV :: (GCompare k, Has View k, Applicative m) => (forall v. View v => k v -> v g -> m (v h)) -> Vessel k g -> m (Vessel k h) Source #

traverseWithKeyV_ :: (GCompare k, Has View k, Applicative m) => (forall v. View v => k v -> v g -> m ()) -> Vessel k g -> m () Source #

intersectionWithKeyV :: (GCompare k, Has View k) => (forall v. View v => k v -> v g -> v g' -> v h) -> Vessel k g -> Vessel k g' -> Vessel k h Source #

mapDecomposedV :: (Functor m, View v) => (v Proxy -> m (v Identity)) -> v (Compose (MonoidalMap c) g) -> m (Maybe (v (Compose (MonoidalMap c) Identity))) Source #

alignWithMV :: forall m v f g h. (View v, Applicative m) => (forall a. These (f a) (g a) -> m (h a)) -> v f -> v g -> m (Maybe (v h)) Source #

collapseNullV :: View v => v f -> Maybe (v f) Source #

data VSum (k :: ((* -> *) -> *) -> *) (g :: * -> *) Source #

Constructors

(k v) :~> (v g) 
Instances
(ForallF ToJSON k, HasV ToJSON k g) => ToJSON (VSum k g) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

toJSON :: VSum k g -> Value #

toEncoding :: VSum k g -> Encoding #

toJSONList :: [VSum k g] -> Value #

toEncodingList :: [VSum k g] -> Encoding #

(FromJSON (Some k), HasV FromJSON k g) => FromJSON (VSum k g) Source # 
Instance details

Defined in Data.Vessel.Internal

Methods

parseJSON :: Value -> Parser (VSum k g) #

parseJSONList :: Value -> Parser [VSum k g] #

toListV :: Vessel k g -> [VSum k g] Source #

fromListV :: (GCompare k, Has View k) => [VSum k g] -> Vessel k g Source #

module Data.Proxy

transposeView :: (View v, Foldable t, Filterable t, Functor t, Align t, QueryResult (t (v g)) ~ t (v g'), QueryResult (v (Compose t g)) ~ v (Compose t g'), Monoid (v g), Monoid (v (Compose t g))) => QueryMorphism (t (v g)) (v (Compose t g)) Source #

A main point of the View class is to be able to produce this QueryMorphism.

class Disperse row where Source #

Disperse is a simplified version of View for ordinary containers. This is used as a stepping stone to obtain the View instance for MapV.

Methods

disperse :: (Foldable col, Filterable col, Functor col) => col (row a) -> row (col a) Source #

condense :: Align col => row (col a) -> col (row a) Source #

Instances
Ord k => Disperse (MonoidalMap k) Source # 
Instance details

Defined in Data.Vessel.Disperse

Methods

disperse :: (Foldable col, Filterable col, Functor col) => col (MonoidalMap k a) -> MonoidalMap k (col a) Source #

condense :: Align col => MonoidalMap k (col a) -> col (MonoidalMap k a) Source #

newtype SubVessel (k :: *) (v :: (* -> *) -> *) (f :: * -> *) Source #

Something between MapV and Vessel, where the keys are simple values, but the values are full views.

TODO: this representation has the advantage that all of it's instances come "free", but the mostly "right" representation is probably ... Vessel v (Compose (MonoidalMap k) f)

Constructors

SubVessel 

Fields

Instances
(Ord k, View v) => EmptyView (SubVessel k v) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

emptyV :: SubVessel k v f Source #

(Ord k, View v) => View (SubVessel k v) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

condenseV :: (Foldable t, Filterable t, Functor t) => t (SubVessel k v g) -> SubVessel k v (Compose t g) Source #

disperseV :: Align t => SubVessel k v (Compose t g) -> t (SubVessel k v g) Source #

cropV :: (forall a. s a -> i a -> r a) -> SubVessel k v s -> SubVessel k v i -> Maybe (SubVessel k v r) Source #

nullV :: SubVessel k v i -> Bool Source #

mapV :: (forall a. f a -> g a) -> SubVessel k v f -> SubVessel k v g Source #

traverseV :: Applicative m => (forall a. f a -> m (g a)) -> SubVessel k v f -> m (SubVessel k v g) Source #

mapMaybeV :: (forall a. f a -> Maybe (g a)) -> SubVessel k v f -> Maybe (SubVessel k v g) Source #

alignWithMaybeV :: (forall a. These (f a) (g a) -> Maybe (h a)) -> SubVessel k v f -> SubVessel k v g -> Maybe (SubVessel k v h) Source #

alignWithV :: (forall a. These (f a) (g a) -> h a) -> SubVessel k v f -> SubVessel k v g -> SubVessel k v h Source #

(Ord k, Eq (v f)) => Eq (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

(==) :: SubVessel k v f -> SubVessel k v f -> Bool #

(/=) :: SubVessel k v f -> SubVessel k v f -> Bool #

(Show k, Show (v f)) => Show (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

showsPrec :: Int -> SubVessel k v f -> ShowS #

show :: SubVessel k v f -> String #

showList :: [SubVessel k v f] -> ShowS #

Generic (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Associated Types

type Rep (SubVessel k v f) :: Type -> Type #

Methods

from :: SubVessel k v f -> Rep (SubVessel k v f) x #

to :: Rep (SubVessel k v f) x -> SubVessel k v f #

(Semigroup (v f), Ord k, View v) => Semigroup (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

(<>) :: SubVessel k v f -> SubVessel k v f -> SubVessel k v f #

sconcat :: NonEmpty (SubVessel k v f) -> SubVessel k v f #

stimes :: Integral b => b -> SubVessel k v f -> SubVessel k v f #

(Semigroup (v f), Ord k, View v) => Monoid (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

mempty :: SubVessel k v f #

mappend :: SubVessel k v f -> SubVessel k v f -> SubVessel k v f #

mconcat :: [SubVessel k v f] -> SubVessel k v f #

(Ord k, ToJSON k, ToJSON (v f)) => ToJSON (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

toJSON :: SubVessel k v f -> Value #

toEncoding :: SubVessel k v f -> Encoding #

toJSONList :: [SubVessel k v f] -> Value #

toEncodingList :: [SubVessel k v f] -> Encoding #

(Ord k, FromJSON k, FromJSON (v f), View v) => FromJSON (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

parseJSON :: Value -> Parser (SubVessel k v f) #

parseJSONList :: Value -> Parser [SubVessel k v f] #

(Group (v f), Ord k, View v) => Group (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Methods

negateG :: SubVessel k v f -> SubVessel k v f #

(~~) :: SubVessel k v f -> SubVessel k v f -> SubVessel k v f #

(Semigroup (v f), Ord k, View v) => Additive (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

(Ord k, View v, Query (Vessel (SubVesselKey k v) g), Semigroup (v (Compose c (VesselLeafWrapper (QueryResult (Vessel (SubVesselKey k v) g)))))) => Query (SubVessel k v (Compose c g)) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Associated Types

type QueryResult (SubVessel k v (Compose c g)) :: Type #

Methods

crop :: SubVessel k v (Compose c g) -> QueryResult (SubVessel k v (Compose c g)) -> QueryResult (SubVessel k v (Compose c g)) #

(Ord k, Semigroup (v Identity), View v) => Query (SubVessel k v (Proxy :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Associated Types

type QueryResult (SubVessel k v Proxy) :: Type #

(Ord k, Semigroup (v Identity), View v) => Query (SubVessel k v (Const x :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.SubVessel

Associated Types

type QueryResult (SubVessel k v (Const x)) :: Type #

Methods

crop :: SubVessel k v (Const x) -> QueryResult (SubVessel k v (Const x)) -> QueryResult (SubVessel k v (Const x)) #

type ViewQueryResult (SubVessel k v g :: Type) Source # 
Instance details

Defined in Data.Vessel.SubVessel

type Rep (SubVessel k v f) Source # 
Instance details

Defined in Data.Vessel.SubVessel

type Rep (SubVessel k v f) = D1 (MetaData "SubVessel" "Data.Vessel.SubVessel" "vessel-0.2.0.0-inplace" True) (C1 (MetaCons "SubVessel" PrefixI True) (S1 (MetaSel (Just "unSubVessel") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vessel (SubVesselKey k v) f))))
type QueryResult (SubVessel k v (Compose c g)) Source # 
Instance details

Defined in Data.Vessel.SubVessel

type QueryResult (SubVessel k v (Proxy :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.SubVessel

type QueryResult (SubVessel k v (Const x :: Type -> Type)) Source # 
Instance details

Defined in Data.Vessel.SubVessel

traverseSubVessel :: (Ord k, View v, Applicative m) => (k -> v g -> m (v h)) -> SubVessel k v g -> m (SubVessel k v h) Source #

singletonSubVessel :: forall k f v. View v => k -> v f -> SubVessel k v f Source #

lookupSubVessel :: Ord k => k -> SubVessel k v f -> Maybe (v f) Source #