orthotope-0.1.1.0: Multidimensional arrays inspired by APL
Safe HaskellNone
LanguageHaskell2010

Data.Array.Convert

Documentation

class Convert a b where Source #

Minimal complete definition

convert | convertE

Methods

convert :: a -> b Source #

Convert between two array types. If both arrays have the same flavor of boxing this is a O(1) operation. Conversion between different boxing is a O(n) operation.

convertE :: a -> Either String b Source #

Convert between two array types if possible, or return error message.

Instances

Instances details
(a ~ b, Unbox a) => Convert (Array a) (Array b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, Unbox a) => Convert (Array a) (Array b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, Unbox a) => Convert (Array a) (Array b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, Unbox a) => Convert (Array a) (Array b) Source # 
Instance details

Defined in Data.Array.Convert

a ~ b => Convert (Array a) (Array Vector b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, Shape sh) => Convert (Array a) (Array sh b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 a -> Array sh b Source #

convertE :: Array0 a -> Either String (Array sh b) Source #

(a ~ b, KnownNat n) => Convert (Array a) (Array n b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 a -> Array n b Source #

convertE :: Array0 a -> Either String (Array n b) Source #

a ~ b => Convert (Array a) (Array Vector b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, Shape sh) => Convert (Array a) (Array sh b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 a -> Array sh b Source #

convertE :: Array0 a -> Either String (Array sh b) Source #

(a ~ b, KnownNat n) => Convert (Array a) (Array n b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 a -> Array n b Source #

convertE :: Array0 a -> Either String (Array n b) Source #

a ~ b => Convert (Array a) (Array Vector b) Source # 
Instance details

Defined in Data.Array.Convert

a ~ b => Convert (Array n a) (Array b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array n a -> Array0 b Source #

convertE :: Array n a -> Either String (Array0 b) Source #

(a ~ b, Shape sh) => Convert (Array sh a) (Array b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array sh a -> Array0 b Source #

convertE :: Array sh a -> Either String (Array0 b) Source #

(a ~ b, Shape sh) => Convert (Array sh a) (Array b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array sh a -> Array0 b Source #

convertE :: Array sh a -> Either String (Array0 b) Source #

(a ~ b, Rank sh ~ n, Shape sh) => Convert (Array n a) (Array sh b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 n a -> Array sh b Source #

convertE :: Array0 n a -> Either String (Array sh b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 n a -> Array m b Source #

convertE :: Array0 n a -> Either String (Array m b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 n a -> Array m b Source #

convertE :: Array0 n a -> Either String (Array m b) Source #

(a ~ b, Rank sh ~ n, Shape sh) => Convert (Array n a) (Array sh b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 n a -> Array sh b Source #

convertE :: Array0 n a -> Either String (Array sh b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array n a -> Array0 m b Source #

convertE :: Array n a -> Either String (Array0 m b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array n a -> Array0 m b Source #

convertE :: Array n a -> Either String (Array0 m b) Source #

(a ~ b, Rank sh ~ n, Shape sh) => Convert (Array sh a) (Array n b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array sh a -> Array0 n b Source #

convertE :: Array sh a -> Either String (Array0 n b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 n a -> Array m b Source #

convertE :: Array0 n a -> Either String (Array m b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array0 n a -> Array m b Source #

convertE :: Array0 n a -> Either String (Array m b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array n a -> Array0 m b Source #

convertE :: Array n a -> Either String (Array0 m b) Source #

(a ~ b, n ~ m, Unbox a) => Convert (Array n a) (Array m b) Source # 
Instance details

Defined in Data.Array.Convert

Methods

convert :: Array n a -> Array0 m b Source #

convertE :: Array n a -> Either String (Array0 m b) Source #

(a ~ b, n ~ m) => Convert (Array n a) (Array m Vector b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, n ~ m) => Convert (Array n a) (Array m Vector b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, n ~ m) => Convert (Array n a) (Array m Vector b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, s ~ t) => Convert (Array s a) (Array t Vector b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, s ~ t) => Convert (Array s a) (Array t Vector b) Source # 
Instance details

Defined in Data.Array.Convert

(a ~ b, s ~ t) => Convert (Array s a) (Array t Vector b) Source # 
Instance details

Defined in Data.Array.Convert