{-# language AllowAmbiguousTypes #-}
{-# language ConstraintKinds #-}
{-# language DataKinds #-}
{-# language DeriveAnyClass #-}
{-# language DeriveGeneric #-}
{-# language DerivingStrategies #-}
{-# language FlexibleContexts #-}
{-# language FlexibleInstances #-}
{-# language GADTs #-}
{-# language LambdaCase #-}
{-# language MultiParamTypeClasses #-}
{-# language NamedFieldPuns #-}
{-# language QuantifiedConstraints #-}
{-# language RankNTypes #-}
{-# language RecordWildCards #-}
{-# language ScopedTypeVariables #-}
{-# language StandaloneKindSignatures #-}
{-# language TypeApplications #-}
{-# language TypeFamilies #-}
{-# language UndecidableInstances #-}
module Rel8.Schema.HTable.Vectorize
( HVectorize
, hvectorize, hunvectorize
, happend, hempty
)
where
import Data.Kind ( Type )
import Data.List.NonEmpty ( NonEmpty )
import Prelude
import Rel8.Kind.Necessity ( Necessity( Required ), SNecessity( SRequired ) )
import Rel8.Schema.Context.Label ( HLabelable, hlabeler, hunlabeler )
import Rel8.Schema.Dict ( Dict( Dict ) )
import qualified Rel8.Schema.Kind as K
import Rel8.Schema.HTable
( HTable
, hfield, htabulate, htabulateA, hspecs
)
import Rel8.Schema.Null ( Unnullify, NotNull, Nullity( NotNull ) )
import Rel8.Schema.Spec ( Spec( Spec ), SSpec(..) )
import Rel8.Type.Array ( listTypeInformation, nonEmptyTypeInformation )
import Rel8.Type.Information ( TypeInformation )
import Data.Zip ( Unzip, Zip, Zippy(..) )
import Rel8.FCF
import Rel8.Schema.HTable.MapTable
import GHC.Generics (Generic)
class Vector list where
listNotNull :: proxy a -> Dict NotNull (list a)
vectorTypeInformation :: ()
=> Nullity a
-> TypeInformation (Unnullify a)
-> TypeInformation (list a)
instance Vector [] where
listNotNull :: proxy a -> Dict NotNull [a]
listNotNull proxy a
_ = Dict NotNull [a]
forall a (c :: a -> Constraint) (a :: a). c a => Dict c a
Dict
vectorTypeInformation :: Nullity a -> TypeInformation (Unnullify a) -> TypeInformation [a]
vectorTypeInformation = Nullity a -> TypeInformation (Unnullify a) -> TypeInformation [a]
forall a.
Nullity a -> TypeInformation (Unnullify a) -> TypeInformation [a]
listTypeInformation
instance Vector NonEmpty where
listNotNull :: proxy a -> Dict NotNull (NonEmpty a)
listNotNull proxy a
_ = Dict NotNull (NonEmpty a)
forall a (c :: a -> Constraint) (a :: a). c a => Dict c a
Dict
vectorTypeInformation :: Nullity a
-> TypeInformation (Unnullify a) -> TypeInformation (NonEmpty a)
vectorTypeInformation = Nullity a
-> TypeInformation (Unnullify a) -> TypeInformation (NonEmpty a)
forall a.
Nullity a
-> TypeInformation (Unnullify a) -> TypeInformation (NonEmpty a)
nonEmptyTypeInformation
type HVectorize :: (Type -> Type) -> K.HTable -> K.HTable
newtype HVectorize list table context = HVectorize (HMapTable (Vectorize list) table context)
deriving stock (forall x.
HVectorize list table context
-> Rep (HVectorize list table context) x)
-> (forall x.
Rep (HVectorize list table context) x
-> HVectorize list table context)
-> Generic (HVectorize list table context)
forall x.
Rep (HVectorize list table context) x
-> HVectorize list table context
forall x.
HVectorize list table context
-> Rep (HVectorize list table context) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (list :: * -> *) (table :: HTable) (context :: HContext) x.
Rep (HVectorize list table context) x
-> HVectorize list table context
forall (list :: * -> *) (table :: HTable) (context :: HContext) x.
HVectorize list table context
-> Rep (HVectorize list table context) x
$cto :: forall (list :: * -> *) (table :: HTable) (context :: HContext) x.
Rep (HVectorize list table context) x
-> HVectorize list table context
$cfrom :: forall (list :: * -> *) (table :: HTable) (context :: HContext) x.
HVectorize list table context
-> Rep (HVectorize list table context) x
Generic
deriving anyclass HVectorize list table SSpec
(forall (context :: HContext) (spec :: Spec).
HVectorize list table context
-> HField (HVectorize list table) spec -> context spec)
-> (forall (context :: HContext).
(forall (spec :: Spec).
HField (HVectorize list table) spec -> context spec)
-> HVectorize list table context)
-> (forall (m :: * -> *) (f :: HContext) (g :: HContext).
Apply m =>
(forall (spec :: Spec). f spec -> m (g spec))
-> HVectorize list table f -> m (HVectorize list table g))
-> (forall (c :: Spec -> Constraint).
HConstrainTable (HVectorize list table) c =>
HVectorize list table (Dict c))
-> HVectorize list table SSpec
-> HTable (HVectorize list table)
forall (m :: * -> *) (f :: HContext) (g :: HContext).
Apply m =>
(forall (spec :: Spec). f spec -> m (g spec))
-> HVectorize list table f -> m (HVectorize list table g)
forall (list :: * -> *) (table :: HTable).
(HTable table, Vector list) =>
HVectorize list table SSpec
forall (list :: * -> *) (table :: HTable) (m :: * -> *)
(f :: HContext) (g :: HContext).
(HTable table, Vector list, Apply m) =>
(forall (spec :: Spec). f spec -> m (g spec))
-> HVectorize list table f -> m (HVectorize list table g)
forall (list :: * -> *) (table :: HTable)
(c :: Spec -> Constraint).
(HTable table, Vector list,
HConstrainTable (HVectorize list table) c) =>
HVectorize list table (Dict c)
forall (list :: * -> *) (table :: HTable) (context :: HContext).
(HTable table, Vector list) =>
(forall (spec :: Spec).
HField (HVectorize list table) spec -> context spec)
-> HVectorize list table context
forall (list :: * -> *) (table :: HTable) (context :: HContext)
(spec :: Spec).
(HTable table, Vector list) =>
HVectorize list table context
-> HField (HVectorize list table) spec -> context spec
forall (c :: Spec -> Constraint).
HConstrainTable (HVectorize list table) c =>
HVectorize list table (Dict c)
forall (context :: HContext).
(forall (spec :: Spec).
HField (HVectorize list table) spec -> context spec)
-> HVectorize list table context
forall (context :: HContext) (spec :: Spec).
HVectorize list table context
-> HField (HVectorize list table) spec -> context spec
forall (t :: HTable).
(forall (context :: HContext) (spec :: Spec).
t context -> HField t spec -> context spec)
-> (forall (context :: HContext).
(forall (spec :: Spec). HField t spec -> context spec)
-> t context)
-> (forall (m :: * -> *) (f :: HContext) (g :: HContext).
Apply m =>
(forall (spec :: Spec). f spec -> m (g spec)) -> t f -> m (t g))
-> (forall (c :: Spec -> Constraint).
HConstrainTable t c =>
t (Dict c))
-> t SSpec
-> HTable t
hspecs :: HVectorize list table SSpec
$chspecs :: forall (list :: * -> *) (table :: HTable).
(HTable table, Vector list) =>
HVectorize list table SSpec
hdicts :: HVectorize list table (Dict c)
$chdicts :: forall (list :: * -> *) (table :: HTable)
(c :: Spec -> Constraint).
(HTable table, Vector list,
HConstrainTable (HVectorize list table) c) =>
HVectorize list table (Dict c)
htraverse :: (forall (spec :: Spec). f spec -> m (g spec))
-> HVectorize list table f -> m (HVectorize list table g)
$chtraverse :: forall (list :: * -> *) (table :: HTable) (m :: * -> *)
(f :: HContext) (g :: HContext).
(HTable table, Vector list, Apply m) =>
(forall (spec :: Spec). f spec -> m (g spec))
-> HVectorize list table f -> m (HVectorize list table g)
htabulate :: (forall (spec :: Spec).
HField (HVectorize list table) spec -> context spec)
-> HVectorize list table context
$chtabulate :: forall (list :: * -> *) (table :: HTable) (context :: HContext).
(HTable table, Vector list) =>
(forall (spec :: Spec).
HField (HVectorize list table) spec -> context spec)
-> HVectorize list table context
hfield :: HVectorize list table context
-> HField (HVectorize list table) spec -> context spec
$chfield :: forall (list :: * -> *) (table :: HTable) (context :: HContext)
(spec :: Spec).
(HTable table, Vector list) =>
HVectorize list table context
-> HField (HVectorize list table) spec -> context spec
HTable
data Vectorize :: (Type -> Type) -> Spec -> Exp Spec
type instance Eval (Vectorize list ('Spec labels _necessity a)) = 'Spec labels 'Required (list a)
instance Vector list => MapSpec (Vectorize list) where
mapInfo :: SSpec x -> SSpec (Eval (Vectorize list x))
mapInfo = \case
SSpec {SLabels labels
SNecessity necessity
Nullity a
TypeInformation (Unnullify a)
nullity :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> Nullity a
info :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> TypeInformation (Unnullify a)
necessity :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> SNecessity necessity
labels :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> SLabels labels
nullity :: Nullity a
info :: TypeInformation (Unnullify a)
necessity :: SNecessity necessity
labels :: SLabels labels
..} -> case Nullity a -> Dict NotNull (list a)
forall (list :: * -> *) (proxy :: * -> *) a.
Vector list =>
proxy a -> Dict NotNull (list a)
listNotNull @list Nullity a
nullity of
Dict NotNull (list a)
Dict -> SSpec :: forall (labels :: Labels) (necessity :: Necessity) a.
SLabels labels
-> SNecessity necessity
-> TypeInformation (Unnullify a)
-> Nullity a
-> SSpec ('Spec labels necessity a)
SSpec
{ necessity :: SNecessity 'Required
necessity = SNecessity 'Required
SRequired
, nullity :: Nullity (list a)
nullity = Nullity (list a)
forall a. NotNull a => Nullity a
NotNull
, info :: TypeInformation (Unnullify (list a))
info = Nullity a
-> TypeInformation (Unnullify a) -> TypeInformation (list a)
forall (list :: * -> *) a.
Vector list =>
Nullity a
-> TypeInformation (Unnullify a) -> TypeInformation (list a)
vectorTypeInformation Nullity a
nullity TypeInformation (Unnullify a)
info
, SLabels labels
labels :: SLabels labels
labels :: SLabels labels
..
}
hvectorize :: (HTable t, Unzip f, Vector list)
=> (forall labels necessity a. ()
=> SSpec ('Spec labels necessity a)
-> f (context ('Spec labels necessity a))
-> context' ('Spec labels 'Required (list a)))
-> f (t context)
-> HVectorize list t context'
hvectorize :: (forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a)
-> f (context ('Spec labels necessity a))
-> context' ('Spec labels 'Required (list a)))
-> f (t context) -> HVectorize list t context'
hvectorize forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a)
-> f (context ('Spec labels necessity a))
-> context' ('Spec labels 'Required (list a))
vectorizer f (t context)
as = HMapTable (Vectorize list) t context' -> HVectorize list t context'
forall (list :: * -> *) (table :: HTable) (context :: HContext).
HMapTable (Vectorize list) table context
-> HVectorize list table context
HVectorize (HMapTable (Vectorize list) t context'
-> HVectorize list t context')
-> HMapTable (Vectorize list) t context'
-> HVectorize list t context'
forall a b. (a -> b) -> a -> b
$ (forall (spec :: Spec).
HField (HMapTable (Vectorize list) t) spec -> context' spec)
-> HMapTable (Vectorize list) t context'
forall (t :: HTable) (context :: HContext).
HTable t =>
(forall (spec :: Spec). HField t spec -> context spec) -> t context
htabulate ((forall (spec :: Spec).
HField (HMapTable (Vectorize list) t) spec -> context' spec)
-> HMapTable (Vectorize list) t context')
-> (forall (spec :: Spec).
HField (HMapTable (Vectorize list) t) spec -> context' spec)
-> HMapTable (Vectorize list) t context'
forall a b. (a -> b) -> a -> b
$ \(HMapTableField field) ->
case t SSpec -> HField t a -> SSpec a
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
hfield t SSpec
forall (t :: HTable). HTable t => t SSpec
hspecs HField t a
field of
spec :: SSpec a
spec@SSpec {} -> SSpec ('Spec labels necessity a)
-> f (context ('Spec labels necessity a))
-> context' ('Spec labels 'Required (list a))
forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a)
-> f (context ('Spec labels necessity a))
-> context' ('Spec labels 'Required (list a))
vectorizer SSpec a
SSpec ('Spec labels necessity a)
spec ((t context -> context ('Spec labels necessity a))
-> f (t context) -> f (context ('Spec labels necessity a))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (t context
-> HField t ('Spec labels necessity a)
-> context ('Spec labels necessity a)
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
`hfield` HField t a
HField t ('Spec labels necessity a)
field) f (t context)
as)
{-# INLINABLE hvectorize #-}
hunvectorize :: (HTable t, Zip f, Vector list)
=> (forall labels necessity a. ()
=> SSpec ('Spec labels necessity a)
-> context ('Spec labels 'Required (list a))
-> f (context' ('Spec labels necessity a)))
-> HVectorize list t context
-> f (t context')
hunvectorize :: (forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a)
-> context ('Spec labels 'Required (list a))
-> f (context' ('Spec labels necessity a)))
-> HVectorize list t context -> f (t context')
hunvectorize forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a)
-> context ('Spec labels 'Required (list a))
-> f (context' ('Spec labels necessity a))
unvectorizer (HVectorize HMapTable (Vectorize list) t context
table) =
Zippy f (t context') -> f (t context')
forall (f :: * -> *) a. Zippy f a -> f a
getZippy (Zippy f (t context') -> f (t context'))
-> Zippy f (t context') -> f (t context')
forall a b. (a -> b) -> a -> b
$ (forall (spec :: Spec). HField t spec -> Zippy f (context' spec))
-> Zippy f (t context')
forall (t :: HTable) (m :: * -> *) (context :: HContext).
(HTable t, Apply m) =>
(forall (spec :: Spec). HField t spec -> m (context spec))
-> m (t context)
htabulateA ((forall (spec :: Spec). HField t spec -> Zippy f (context' spec))
-> Zippy f (t context'))
-> (forall (spec :: Spec).
HField t spec -> Zippy f (context' spec))
-> Zippy f (t context')
forall a b. (a -> b) -> a -> b
$ \HField t spec
field -> case t SSpec -> HField t spec -> SSpec spec
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
hfield t SSpec
forall (t :: HTable). HTable t => t SSpec
hspecs HField t spec
field of
spec :: SSpec spec
spec@SSpec{} -> case HMapTable (Vectorize list) t context
-> HField
(HMapTable (Vectorize list) t) ('Spec labels 'Required (list a))
-> context ('Spec labels 'Required (list a))
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
hfield HMapTable (Vectorize list) t context
table (HField t ('Spec labels necessity a)
-> HMapTableField
(Vectorize list)
t
(Eval (Vectorize list ('Spec labels necessity a)))
forall e (t :: HTable) (a :: Spec) (f :: Spec -> Exp e).
HField t a -> HMapTableField f t (Eval (f a))
HMapTableField HField t spec
HField t ('Spec labels necessity a)
field) of
context ('Spec labels 'Required (list a))
a -> f (context' ('Spec labels necessity a))
-> Zippy f (context' ('Spec labels necessity a))
forall (f :: * -> *) a. f a -> Zippy f a
Zippy (SSpec ('Spec labels necessity a)
-> context ('Spec labels 'Required (list a))
-> f (context' ('Spec labels necessity a))
forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a)
-> context ('Spec labels 'Required (list a))
-> f (context' ('Spec labels necessity a))
unvectorizer SSpec spec
SSpec ('Spec labels necessity a)
spec context ('Spec labels 'Required (list a))
a)
{-# INLINABLE hunvectorize #-}
happend :: (HTable t, Vector list) =>
( forall labels necessity a. ()
=> Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a))
)
-> HVectorize list t context
-> HVectorize list t context
-> HVectorize list t context
happend :: (forall (labels :: Labels) (necessity :: Necessity) a.
Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a)))
-> HVectorize list t context
-> HVectorize list t context
-> HVectorize list t context
happend forall (labels :: Labels) (necessity :: Necessity) a.
Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a))
append (HVectorize HMapTable (Vectorize list) t context
as) (HVectorize HMapTable (Vectorize list) t context
bs) = HMapTable (Vectorize list) t context -> HVectorize list t context
forall (list :: * -> *) (table :: HTable) (context :: HContext).
HMapTable (Vectorize list) table context
-> HVectorize list table context
HVectorize (HMapTable (Vectorize list) t context -> HVectorize list t context)
-> HMapTable (Vectorize list) t context
-> HVectorize list t context
forall a b. (a -> b) -> a -> b
$
(forall (spec :: Spec).
HField (HMapTable (Vectorize list) t) spec -> context spec)
-> HMapTable (Vectorize list) t context
forall (t :: HTable) (context :: HContext).
HTable t =>
(forall (spec :: Spec). HField t spec -> context spec) -> t context
htabulate ((forall (spec :: Spec).
HField (HMapTable (Vectorize list) t) spec -> context spec)
-> HMapTable (Vectorize list) t context)
-> (forall (spec :: Spec).
HField (HMapTable (Vectorize list) t) spec -> context spec)
-> HMapTable (Vectorize list) t context
forall a b. (a -> b) -> a -> b
$ \field :: HField (HMapTable (Vectorize list) t) spec
field@(HMapTableField j) -> case (HMapTable (Vectorize list) t context
-> HField (HMapTable (Vectorize list) t) spec -> context spec
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
hfield HMapTable (Vectorize list) t context
as HField (HMapTable (Vectorize list) t) spec
field, HMapTable (Vectorize list) t context
-> HField (HMapTable (Vectorize list) t) spec -> context spec
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
hfield HMapTable (Vectorize list) t context
bs HField (HMapTable (Vectorize list) t) spec
field) of
(context spec
a, context spec
b) -> case t SSpec -> HField t a -> SSpec a
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
hfield t SSpec
forall (t :: HTable). HTable t => t SSpec
hspecs HField t a
j of
SSpec {Nullity a
nullity :: Nullity a
nullity :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> Nullity a
nullity, TypeInformation (Unnullify a)
info :: TypeInformation (Unnullify a)
info :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> TypeInformation (Unnullify a)
info} -> Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels 'Required (list a))
-> context ('Spec labels 'Required (list a))
-> context ('Spec labels 'Required (list a))
forall (labels :: Labels) (necessity :: Necessity) a.
Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a))
-> context ('Spec labels necessity (list a))
append Nullity a
nullity TypeInformation (Unnullify a)
info context spec
context ('Spec labels 'Required (list a))
a context spec
context ('Spec labels 'Required (list a))
b
hempty :: HTable t =>
( forall labels necessity a. ()
=> Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity [a])
)
-> HVectorize [] t context
hempty :: (forall (labels :: Labels) (necessity :: Necessity) a.
Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity [a]))
-> HVectorize [] t context
hempty forall (labels :: Labels) (necessity :: Necessity) a.
Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity [a])
empty = HMapTable (Vectorize []) t context -> HVectorize [] t context
forall (list :: * -> *) (table :: HTable) (context :: HContext).
HMapTable (Vectorize list) table context
-> HVectorize list table context
HVectorize (HMapTable (Vectorize []) t context -> HVectorize [] t context)
-> HMapTable (Vectorize []) t context -> HVectorize [] t context
forall a b. (a -> b) -> a -> b
$ (forall (spec :: Spec).
HField (HMapTable (Vectorize []) t) spec -> context spec)
-> HMapTable (Vectorize []) t context
forall (t :: HTable) (context :: HContext).
HTable t =>
(forall (spec :: Spec). HField t spec -> context spec) -> t context
htabulate ((forall (spec :: Spec).
HField (HMapTable (Vectorize []) t) spec -> context spec)
-> HMapTable (Vectorize []) t context)
-> (forall (spec :: Spec).
HField (HMapTable (Vectorize []) t) spec -> context spec)
-> HMapTable (Vectorize []) t context
forall a b. (a -> b) -> a -> b
$ \(HMapTableField field) -> case t SSpec -> HField t a -> SSpec a
forall (t :: HTable) (context :: HContext) (spec :: Spec).
HTable t =>
t context -> HField t spec -> context spec
hfield t SSpec
forall (t :: HTable). HTable t => t SSpec
hspecs HField t a
field of
SSpec {Nullity a
nullity :: Nullity a
nullity :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> Nullity a
nullity, TypeInformation (Unnullify a)
info :: TypeInformation (Unnullify a)
info :: forall (labels :: Labels) (necessity :: Necessity) a.
SSpec ('Spec labels necessity a) -> TypeInformation (Unnullify a)
info} -> Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels 'Required [a])
forall (labels :: Labels) (necessity :: Necessity) a.
Nullity a
-> TypeInformation (Unnullify a)
-> context ('Spec labels necessity [a])
empty Nullity a
nullity TypeInformation (Unnullify a)
info
instance HLabelable g => HLabelable (Precompose (Vectorize list) g) where
hlabeler :: Precompose (Vectorize list) g ('Spec labels necessity a)
-> Precompose
(Vectorize list) g ('Spec (label : labels) necessity a)
hlabeler = g ('Spec (label : labels) 'Required (list a))
-> Precompose
(Vectorize list) g ('Spec (label : labels) necessity a)
forall a b (f :: a -> Exp b) (g :: Exp b) (x :: a).
g (Eval (f x)) -> Precompose f g x
Precompose (g ('Spec (label : labels) 'Required (list a))
-> Precompose
(Vectorize list) g ('Spec (label : labels) necessity a))
-> (Precompose (Vectorize list) g ('Spec labels necessity a)
-> g ('Spec (label : labels) 'Required (list a)))
-> Precompose (Vectorize list) g ('Spec labels necessity a)
-> Precompose
(Vectorize list) g ('Spec (label : labels) necessity a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. g ('Spec labels 'Required (list a))
-> g ('Spec (label : labels) 'Required (list a))
forall (context :: HContext) (labels :: Labels)
(necessity :: Necessity) a (label :: Symbol).
HLabelable context =>
context ('Spec labels necessity a)
-> context ('Spec (label : labels) necessity a)
hlabeler (g ('Spec labels 'Required (list a))
-> g ('Spec (label : labels) 'Required (list a)))
-> (Precompose (Vectorize list) g ('Spec labels necessity a)
-> g ('Spec labels 'Required (list a)))
-> Precompose (Vectorize list) g ('Spec labels necessity a)
-> g ('Spec (label : labels) 'Required (list a))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Precompose (Vectorize list) g ('Spec labels necessity a)
-> g ('Spec labels 'Required (list a))
forall b a (f :: a -> Exp b) (g :: Exp b) (x :: a).
Precompose f g x -> g (Eval (f x))
precomposed
hunlabeler :: Precompose (Vectorize list) g ('Spec (label : labels) necessity a)
-> Precompose (Vectorize list) g ('Spec labels necessity a)
hunlabeler = g ('Spec labels 'Required (list a))
-> Precompose (Vectorize list) g ('Spec labels necessity a)
forall a b (f :: a -> Exp b) (g :: Exp b) (x :: a).
g (Eval (f x)) -> Precompose f g x
Precompose (g ('Spec labels 'Required (list a))
-> Precompose (Vectorize list) g ('Spec labels necessity a))
-> (Precompose
(Vectorize list) g ('Spec (label : labels) necessity a)
-> g ('Spec labels 'Required (list a)))
-> Precompose
(Vectorize list) g ('Spec (label : labels) necessity a)
-> Precompose (Vectorize list) g ('Spec labels necessity a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. g ('Spec (label : labels) 'Required (list a))
-> g ('Spec labels 'Required (list a))
forall (context :: HContext) (label :: Symbol) (labels :: Labels)
(necessity :: Necessity) a.
HLabelable context =>
context ('Spec (label : labels) necessity a)
-> context ('Spec labels necessity a)
hunlabeler (g ('Spec (label : labels) 'Required (list a))
-> g ('Spec labels 'Required (list a)))
-> (Precompose
(Vectorize list) g ('Spec (label : labels) necessity a)
-> g ('Spec (label : labels) 'Required (list a)))
-> Precompose
(Vectorize list) g ('Spec (label : labels) necessity a)
-> g ('Spec labels 'Required (list a))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Precompose (Vectorize list) g ('Spec (label : labels) necessity a)
-> g ('Spec (label : labels) 'Required (list a))
forall b a (f :: a -> Exp b) (g :: Exp b) (x :: a).
Precompose f g x -> g (Eval (f x))
precomposed