hw-prim-0.6.2.19: Primitive functions and data types

Safe HaskellNone
LanguageHaskell2010

HaskellWorks.Data.AtIndex

Synopsis

Documentation

class Container a Source #

Associated Types

type Elem a Source #

Instances
Container ByteString Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem ByteString :: Type Source #

Container [a] Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem [a] :: Type Source #

Container (Vector Int) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int) :: Type Source #

Container (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int8) :: Type Source #

Container (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int16) :: Type Source #

Container (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int32) :: Type Source #

Container (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int64) :: Type Source #

Container (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word8) :: Type Source #

Container (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word16) :: Type Source #

Container (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word32) :: Type Source #

Container (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word64) :: Type Source #

Container (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int8) :: Type Source #

Container (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int16) :: Type Source #

Container (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int32) :: Type Source #

Container (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int64) :: Type Source #

Container (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word8) :: Type Source #

Container (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word16) :: Type Source #

Container (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word32) :: Type Source #

Container (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word64) :: Type Source #

class Length v => AtIndex v where Source #

Methods

(!!!) :: v -> Position -> Elem v Source #

atIndex :: v -> Position -> Elem v Source #

Instances
AtIndex ByteString Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex [a] Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: [a] -> Position -> Elem [a] Source #

atIndex :: [a] -> Position -> Elem [a] Source #

AtIndex (Vector Int) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

class Container v => Length v where Source #

Minimal complete definition

length

Methods

length :: v -> Count Source #

end :: v -> Position Source #

Instances
Length ByteString Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length [a] Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: [a] -> Count Source #

end :: [a] -> Position Source #

Length (Vector Int) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

atIndexOr :: AtIndex v => Elem v -> v -> Position -> Elem v Source #

Get the element of the container at the specified position, but return d if position is out of bounds.

atIndexOrBeforeOrAfter :: AtIndex v => Elem v -> Elem v -> v -> Position -> Elem v Source #

Get the element of the container at the specified position, but return before if position before the first element or after if the position is beyond the last element.

atIndexOrBeforeOrLast :: (AtIndex v, Length v) => Elem v -> v -> Position -> Elem v Source #

Get the element of the container at the specified position, but return the last element if the position is past the end of the container or the default value before' if the position is before the beginning of the vector. In the case when the container is empty, then the default value before' is used.