Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
class HasToDType dtype' dtype f g | dtype' dtype f -> g, dtype' dtype g -> f where Source #
Instances
(g ~ ReplaceDType f dtype' dtype, f ~ ReplaceDType g dtype dtype', Generic f, Generic g, GHasToDType dtype' dtype (Rep f) (Rep g)) => HasToDType (dtype' :: DType) (dtype :: DType) f g Source # | |
Defined in Torch.Typed.DType | |
KnownDType dtype' => HasToDType (dtype' :: DType) (dtype :: DType) (Parameter device dtype shape) (Parameter device dtype' shape) Source # | |
KnownDType dtype' => HasToDType (dtype' :: DType) (dtype :: DType) (Tensor device dtype shape) (Tensor device dtype' shape) Source # | |
type family ReplaceDType (f :: k) (dtype' :: DType) (dtype :: DType) :: k where ... Source #
ReplaceDType (t dtype) dtype' dtype = t dtype' | |
ReplaceDType (t a) dtype' dtype = ReplaceDType t dtype' dtype (ReplaceDType a dtype' dtype) | |
ReplaceDType t _ _ = t |
type family ReplaceDType' (f :: k) (dtype' :: DType) :: k where ... Source #
ReplaceDType' (t (dtype :: DType)) dtype' = t dtype' | |
ReplaceDType' (t a) dtype' = ReplaceDType' t dtype' (ReplaceDType' a dtype') | |
ReplaceDType' t _ = t |
class GHasToDType (dtype' :: DType) (dtype :: DType) (f :: Type -> Type) (g :: Type -> Type) where Source #
Instances
GHasToDType dtype' dtype (U1 :: Type -> Type) (U1 :: Type -> Type) Source # | |
(GHasToDType dtype' dtype l l', GHasToDType dtype' dtype r r') => GHasToDType dtype' dtype (l :*: r) (l' :*: r') Source # | |
HasToDType dtype' dtype f g => GHasToDType dtype' dtype (K1 i f :: Type -> Type) (K1 i g :: Type -> Type) Source # | |
GHasToDType dtype' dtype f g => GHasToDType dtype' dtype (M1 i t f) (M1 i t g) Source # | |