comfort-array-0.4: Arrays where the index type is a function of the shape type

Safe HaskellNone
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
C [] Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

data Shape [] :: Type Source #

Methods

shapeSize :: Shape [] -> Int Source #

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

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

C T Source # 
Instance details

Defined in Data.Array.Comfort.Container

Associated Types

data Shape T :: Type Source #

Methods

shapeSize :: Shape T -> Int Source #

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

toShape :: T a -> Shape T Source #

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

Defined in Data.Array.Comfort.Container

Associated Types

data Shape (Map k) :: Type 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) :: Type 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) :: Type 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
EqShape [] Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

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

EqShape T Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

eqShape :: Shape T -> Shape T -> 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
NFShape [] Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

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

NFShape T Source # 
Instance details

Defined in Data.Array.Comfort.Container

Methods

rnfShape :: Shape T -> () 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 #