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

Data.Array.Comfort.Shape.SubSize

Description

Framework for extracting subsize in unsafeCreateWithSizes.

Synopsis

Documentation

newtype T sh nsize Source #

Constructors

Cons 

Fields

auto :: C nsize => T (ToShape nsize) nsize Source #

atom :: C sh => T sh Int Source #

data Sub nsize Source #

Constructors

Sub Int nsize 

Instances

Instances details
C sub => C (Sub sub) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

Associated Types

type ToShape (Sub sub) Source #

Methods

evaluate :: ToShape (Sub sub) -> (Int, Sub sub) Source #

type ToShape (Sub sub) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

type ToShape (Sub sub) = ToShape sub

sub :: T sh nsize -> T sh (Sub nsize) Source #

pair :: T sh0 nsize0 -> T sh1 nsize1 -> T (sh0, sh1) (nsize0, nsize1) Source #

triple :: T sh0 nsize0 -> T sh1 nsize1 -> T sh2 nsize2 -> T (sh0, sh1, sh2) (nsize0, nsize1, nsize2) Source #

append :: T sh0 nsize0 -> T sh1 nsize1 -> T (sh0 ::+ sh1) (nsize0 ::+ nsize1) Source #

class C nsize Source #

Minimal complete definition

evaluate

Associated Types

type ToShape nsize Source #

Instances

Instances details
C sh => C (Atom sh) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

Associated Types

type ToShape (Atom sh) Source #

Methods

evaluate :: ToShape (Atom sh) -> (Int, Atom sh) Source #

C sub => C (Sub sub) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

Associated Types

type ToShape (Sub sub) Source #

Methods

evaluate :: ToShape (Sub sub) -> (Int, Sub sub) Source #

(C nsize0, C nsize1) => C (nsize0 ::+ nsize1) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

Associated Types

type ToShape (nsize0 ::+ nsize1) Source #

Methods

evaluate :: ToShape (nsize0 ::+ nsize1) -> (Int, nsize0 ::+ nsize1) Source #

(C nsize0, C nsize1) => C (nsize0, nsize1) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

Associated Types

type ToShape (nsize0, nsize1) Source #

Methods

evaluate :: ToShape (nsize0, nsize1) -> (Int, (nsize0, nsize1)) Source #

(C nsize0, C nsize1, C nsize2) => C (nsize0, nsize1, nsize2) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

Associated Types

type ToShape (nsize0, nsize1, nsize2) Source #

Methods

evaluate :: ToShape (nsize0, nsize1, nsize2) -> (Int, (nsize0, nsize1, nsize2)) Source #

newtype Atom sh Source #

Constructors

Atom Int 

Instances

Instances details
C sh => C (Atom sh) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

Associated Types

type ToShape (Atom sh) Source #

Methods

evaluate :: ToShape (Atom sh) -> (Int, Atom sh) Source #

type ToShape (Atom sh) Source # 
Instance details

Defined in Data.Array.Comfort.Shape.SubSize

type ToShape (Atom sh) = sh

evaluate :: C nsize => ToShape nsize -> (Int, nsize) Source #

Compute the sizes of a shape and some sub-shapes.