rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Schema.HTable

Synopsis

Documentation

class HTable (t :: HTable) Source #

A HTable is a functor-indexed/higher-kinded data type that is representable (htabulate/hfield), constrainable (hdicts), and specified (hspecs).

This is an internal concept for Rel8, and you should not need to define instances yourself or specify this constraint.

Associated Types

type HField (t :: HTable) = (field :: Type -> Type) | field -> t Source #

type HField (t :: HTable) = GHField t

type HConstrainTable (t :: HTable) (c :: Type -> Constraint) Source #

type HConstrainTable (t :: HTable) (c :: Type -> Constraint) = HConstrainTable (GHColumns (Rep (t (Proxy :: Type -> Type)))) c

Instances

Instances details
Sql DBType a => HTable (HIdentity a) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.Identity

Associated Types

type HField (HIdentity a) 
Instance details

Defined in Rel8.Internal.Schema.HTable.Identity

type HField (HIdentity a) = (:~:) a

Methods

hfield :: HIdentity a context -> HField (HIdentity a) a0 -> context a0 Source #

htabulate :: (forall a0. HField (HIdentity a) a0 -> context a0) -> HIdentity a context Source #

htraverse :: Apply m => (forall a0. f a0 -> m (g a0)) -> HIdentity a f -> m (HIdentity a g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HIdentity a) c => HIdentity a (Dict c) Source #

hspecs :: HIdentity a Spec Source #

HTable table => HTable (HMaybeTable table) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.Maybe

Associated Types

type HField (HMaybeTable table) 
Instance details

Defined in Rel8.Internal.Schema.HTable.Maybe

type HField (HMaybeTable table)

Methods

hfield :: HMaybeTable table context -> HField (HMaybeTable table) a -> context a Source #

htabulate :: (forall a. HField (HMaybeTable table) a -> context a) -> HMaybeTable table context Source #

htraverse :: Apply m => (forall a. f a -> m (g a)) -> HMaybeTable table f -> m (HMaybeTable table g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HMaybeTable table) c => HMaybeTable table (Dict c) Source #

hspecs :: HMaybeTable table Spec Source #

HTable table => HTable (HNullify table) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.Nullify

Associated Types

type HField (HNullify table) 
Instance details

Defined in Rel8.Internal.Schema.HTable.Nullify

type HField (HNullify table)

Methods

hfield :: HNullify table context -> HField (HNullify table) a -> context a Source #

htabulate :: (forall a. HField (HNullify table) a -> context a) -> HNullify table context Source #

htraverse :: Apply m => (forall a. f a -> m (g a)) -> HNullify table f -> m (HNullify table g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HNullify table) c => HNullify table (Dict c) Source #

hspecs :: HNullify table Spec Source #

(HTable left, HTable right) => HTable (HEitherTable left right) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.Either

Associated Types

type HField (HEitherTable left right) 
Instance details

Defined in Rel8.Internal.Schema.HTable.Either

type HField (HEitherTable left right)

Methods

hfield :: HEitherTable left right context -> HField (HEitherTable left right) a -> context a Source #

htabulate :: (forall a. HField (HEitherTable left right) a -> context a) -> HEitherTable left right context Source #

htraverse :: Apply m => (forall a. f a -> m (g a)) -> HEitherTable left right f -> m (HEitherTable left right g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HEitherTable left right) c => HEitherTable left right (Dict c) Source #

hspecs :: HEitherTable left right Spec Source #

(HTable table, KnownSymbol label) => HTable (HLabel label table) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.Label

Associated Types

type HField (HLabel label table) 
Instance details

Defined in Rel8.Internal.Schema.HTable.Label

type HField (HLabel label table)

Methods

hfield :: HLabel label table context -> HField (HLabel label table) a -> context a Source #

htabulate :: (forall a. HField (HLabel label table) a -> context a) -> HLabel label table context Source #

htraverse :: Apply m => (forall a. f a -> m (g a)) -> HLabel label table f -> m (HLabel label table g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HLabel label table) c => HLabel label table (Dict c) Source #

hspecs :: HLabel label table Spec Source #

(HTable t, MapSpec f) => HTable (HMapTable f t) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.MapTable

Associated Types

type HField (HMapTable f t) 
Instance details

Defined in Rel8.Internal.Schema.HTable.MapTable

Methods

hfield :: HMapTable f t context -> HField (HMapTable f t) a -> context a Source #

htabulate :: (forall a. HField (HMapTable f t) a -> context a) -> HMapTable f t context Source #

htraverse :: Apply m => (forall a. f0 a -> m (g a)) -> HMapTable f t f0 -> m (HMapTable f t g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HMapTable f t) c => HMapTable f t (Dict c) Source #

hspecs :: HMapTable f t Spec Source #

(HTable x, HTable y) => HTable (HProduct x y) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable

Associated Types

type HField (HProduct x y) 
Instance details

Defined in Rel8.Internal.Schema.HTable

type HField (HProduct x y)

Methods

hfield :: HProduct x y context -> HField (HProduct x y) a -> context a Source #

htabulate :: (forall a. HField (HProduct x y) a -> context a) -> HProduct x y context Source #

htraverse :: Apply m => (forall a. f a -> m (g a)) -> HProduct x y f -> m (HProduct x y g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HProduct x y) c => HProduct x y (Dict c) Source #

hspecs :: HProduct x y Spec Source #

(HTable here, HTable there) => HTable (HTheseTable here there) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.These

Associated Types

type HField (HTheseTable here there) 
Instance details

Defined in Rel8.Internal.Schema.HTable.These

type HField (HTheseTable here there)

Methods

hfield :: HTheseTable here there context -> HField (HTheseTable here there) a -> context a Source #

htabulate :: (forall a. HField (HTheseTable here there) a -> context a) -> HTheseTable here there context Source #

htraverse :: Apply m => (forall a. f a -> m (g a)) -> HTheseTable here there f -> m (HTheseTable here there g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HTheseTable here there) c => HTheseTable here there (Dict c) Source #

hspecs :: HTheseTable here there Spec Source #

(HTable table, Vector list) => HTable (HVectorize list table) Source # 
Instance details

Defined in Rel8.Internal.Schema.HTable.Vectorize

Associated Types

type HField (HVectorize list table) 
Instance details

Defined in Rel8.Internal.Schema.HTable.Vectorize

type HField (HVectorize list table)

Methods

hfield :: HVectorize list table context -> HField (HVectorize list table) a -> context a Source #

htabulate :: (forall a. HField (HVectorize list table) a -> context a) -> HVectorize list table context Source #

htraverse :: Apply m => (forall a. f a -> m (g a)) -> HVectorize list table f -> m (HVectorize list table g) Source #

hdicts :: forall (c :: Type -> Constraint). HConstrainTable (HVectorize list table) c => HVectorize list table (Dict c) Source #

hspecs :: HVectorize list table Spec Source #

hfield :: HTable t => t context -> HField t a -> context a Source #

htabulate :: HTable t => (forall a. HField t a -> context a) -> t context Source #

hdicts :: forall (c :: Type -> Constraint). (HTable t, HConstrainTable t c) => t (Dict c) Source #

hfoldMap :: (HTable t, Semigroup s) => (forall a. context a -> s) -> t context -> s Source #

hmap :: HTable t => (forall a. context a -> context' a) -> t context -> t context' Source #

htabulateA :: (HTable t, Apply m) => (forall a. HField t a -> m (context a)) -> m (t context) Source #

htabulateP :: (HTable t, ProductProfunctor p) => (forall a. HField t a -> p i (context a)) -> p i (t context) Source #

htraverse :: (HTable t, Apply m) => (forall a. f a -> m (g a)) -> t f -> m (t g) Source #

htraverse_ :: (HTable t, Apply f) => (forall a. context a -> f b) -> t context -> f () Source #

htraverseP :: (HTable t, ProductProfunctor p) => (forall a. p (f a) (g a)) -> p (t f) (t g) Source #

htraversePWithField :: (HTable t, ProductProfunctor p) => (forall a. HField t a -> p (f a) (g a)) -> p (t f) (t g) Source #