comfort-array-0.5.4.1: Arrays where the index type is a function of the shape type
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Array.Comfort.Container

Description

This module provides an array shape type, that allows to store elements from a container while preserving the container structure.

Documentation

class Foldable f => C f where Source #

Associated Types

data Shape f Source #

Methods

shapeSize :: Shape f -> Int Source #

fromList :: Shape f -> [a] -> f a Source #

toShape :: f a -> Shape f Source #

Instances

Instances details
C T Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

data Shape T Source #

Methods

shapeSize :: Shape T -> Int Source #

fromList :: Shape T -> [a] -> T a Source #

toShape :: T a -> Shape T Source #

C [] Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

data Shape [] Source #

Methods

shapeSize :: Shape [] -> Int Source #

fromList :: Shape [] -> [a] -> [a] Source #

toShape :: [a] -> Shape [] Source #

Ord k => C (Map k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

data Shape (Map k) Source #

Methods

shapeSize :: Shape (Map k) -> Int Source #

fromList :: Shape (Map k) -> [a] -> Map k a Source #

toShape :: Map k a -> Shape (Map k) Source #

Ord k => C (T k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

data Shape (T k) Source #

Methods

shapeSize :: Shape (T k) -> Int Source #

fromList :: Shape (T k) -> [a] -> T k a Source #

toShape :: T k a -> Shape (T k) Source #

C f => C (T f) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

data Shape (T f) Source #

Methods

shapeSize :: Shape (T f) -> Int Source #

fromList :: Shape (T f) -> [a] -> T f a Source #

toShape :: T f a -> Shape (T f) Source #

class C f => EqShape f where Source #

Methods

eqShape :: Shape f -> Shape f -> Bool Source #

Instances

Instances details
EqShape T Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

eqShape :: Shape T -> Shape T -> Bool Source #

EqShape [] Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

eqShape :: Shape [] -> Shape [] -> Bool Source #

Ord k => EqShape (Map k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

eqShape :: Shape (Map k) -> Shape (Map k) -> Bool Source #

Ord k => EqShape (T k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

eqShape :: Shape (T k) -> Shape (T k) -> Bool Source #

EqShape f => EqShape (T f) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

eqShape :: Shape (T f) -> Shape (T f) -> Bool Source #

class C f => NFShape f where Source #

Methods

rnfShape :: Shape f -> () Source #

Instances

Instances details
NFShape T Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

rnfShape :: Shape T -> () Source #

NFShape [] Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

rnfShape :: Shape [] -> () Source #

(NFData k, Ord k) => NFShape (Map k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

rnfShape :: Shape (Map k) -> () Source #

(NFData k, Ord k) => NFShape (T k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

rnfShape :: Shape (T k) -> () Source #

NFShape f => NFShape (T f) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

rnfShape :: Shape (T f) -> () Source #

class C f => Indexed f where Source #

Associated Types

type Index f Source #

Methods

indices :: Shape f -> [Index f] Source #

unifiedSizeOffset :: Checking check => Shape f -> (Int, Index f -> Result check Int) Source #

Instances

Instances details
Indexed [] Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

type Index [] Source #

Methods

indices :: Shape [] -> [Index []] Source #

unifiedSizeOffset :: Checking check => Shape [] -> (Int, Index [] -> Result check Int) Source #

Ord k => Indexed (Map k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

type Index (Map k) Source #

Methods

indices :: Shape (Map k) -> [Index (Map k)] Source #

unifiedSizeOffset :: Checking check => Shape (Map k) -> (Int, Index (Map k) -> Result check Int) Source #

Ord k => Indexed (T k) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

type Index (T k) Source #

Methods

indices :: Shape (T k) -> [Index (T k)] Source #

unifiedSizeOffset :: Checking check => Shape (T k) -> (Int, Index (T k) -> Result check Int) Source #

C f => Indexed (T f) Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

type Index (T f) Source #

Methods

indices :: Shape (T f) -> [Index (T f)] Source #

unifiedSizeOffset :: Checking check => Shape (T f) -> (Int, Index (T f) -> Result check Int) Source #