tensor-ops-0.1.0.0: Tensor manipulation operations with tensorflow-style automatic differentiation

Safe HaskellNone
LanguageHaskell2010

Data.Type.Uniform

Synopsis

Documentation

data Uniform :: a -> [a] -> Type where Source #

A Uniform a as is a witness that every item in as is (identically) a.

Constructors

:: Uniform a '[] 
US :: !(Uniform a as) -> Uniform a (a ': as) 

Instances

Witness ØC (Known [a] (Length a) ms) (Uniform a m ms) Source # 

Associated Types

type WitnessC (ØC :: Constraint) (Known [a] (Length a) ms :: Constraint) (Uniform a m ms) :: Constraint #

Methods

(\\) :: ØC => (Known [a] (Length a) ms -> r) -> Uniform a m ms -> r #

Known [a] (Uniform a n) ([] a) Source # 

Associated Types

type KnownC (Uniform a n) ([] a :: Uniform a n -> *) (a :: Uniform a n) :: Constraint #

Methods

known :: [a] a #

Known [a] (Uniform a n) ns => Known [a] (Uniform a n) ((:) a n ns) Source # 

Associated Types

type KnownC (Uniform a n) ((:) a n ns :: Uniform a n -> *) (a :: Uniform a n) :: Constraint #

Methods

known :: (a ': n) ns a #

Show (Uniform a a1 as) Source # 

Methods

showsPrec :: Int -> Uniform a a1 as -> ShowS #

show :: Uniform a a1 as -> String #

showList :: [Uniform a a1 as] -> ShowS #

type WitnessC ØC (Known [a] (Length a) ms) (Uniform a m ms) Source # 
type WitnessC ØC (Known [a] (Length a) ms) (Uniform a m ms) = ØC
type KnownC [a] (Uniform a n) ([] a) Source # 
type KnownC [a] (Uniform a n) ([] a) = ØC
type KnownC [a] (Uniform a n) ((:) a n ns) Source # 
type KnownC [a] (Uniform a n) ((:) a n ns) = ØC

appendUniform :: Uniform o ns -> Uniform o ms -> Uniform o (ns ++ ms) Source #

replicateUniform :: forall x n. Nat n -> Uniform x (Replicate n x) Source #