hw-prim-0.6.3.2: Primitive functions and data types
Safe HaskellNone
LanguageHaskell2010

HaskellWorks.Data.AtIndex

Synopsis

Documentation

class Container a Source #

Associated Types

type Elem a Source #

Instances

Instances details
Container ByteString Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem ByteString 
Instance details

Defined in HaskellWorks.Data.Container

Container (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int16) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int16) = Int16
Container (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int32) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int32) = Int32
Container (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int64) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int64) = Int64
Container (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int8) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int8) = Int8
Container (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word16) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word16) = Word16
Container (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word32) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word32) = Word32
Container (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word64) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word64) = Word64
Container (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word8) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word8) = Word8
Container (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int16) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int16) = Int16
Container (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int32) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int32) = Int32
Container (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int64) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int64) = Int64
Container (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int8) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int8) = Int8
Container (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word16) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word16) = Word16
Container (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word32) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word32) = Word32
Container (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word64) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word64) = Word64
Container (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Word8) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Word8) = Word8
Container (Vector Int) Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem (Vector Int) 
Instance details

Defined in HaskellWorks.Data.Container

type Elem (Vector Int) = Int
Container [a] Source # 
Instance details

Defined in HaskellWorks.Data.Container

Associated Types

type Elem [a] 
Instance details

Defined in HaskellWorks.Data.Container

type Elem [a] = a

class Length v => AtIndex v where Source #

Methods

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

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

Instances

Instances details
AtIndex ByteString Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

AtIndex (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int16 -> Position -> Elem (Vector Int16) Source #

atIndex :: Vector Int16 -> Position -> Elem (Vector Int16) Source #

AtIndex (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int32 -> Position -> Elem (Vector Int32) Source #

atIndex :: Vector Int32 -> Position -> Elem (Vector Int32) Source #

AtIndex (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int64 -> Position -> Elem (Vector Int64) Source #

atIndex :: Vector Int64 -> Position -> Elem (Vector Int64) Source #

AtIndex (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int8 -> Position -> Elem (Vector Int8) Source #

atIndex :: Vector Int8 -> Position -> Elem (Vector Int8) Source #

AtIndex (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word16 -> Position -> Elem (Vector Word16) Source #

atIndex :: Vector Word16 -> Position -> Elem (Vector Word16) Source #

AtIndex (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word32 -> Position -> Elem (Vector Word32) Source #

atIndex :: Vector Word32 -> Position -> Elem (Vector Word32) Source #

AtIndex (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word64 -> Position -> Elem (Vector Word64) Source #

atIndex :: Vector Word64 -> Position -> Elem (Vector Word64) Source #

AtIndex (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word8 -> Position -> Elem (Vector Word8) Source #

atIndex :: Vector Word8 -> Position -> Elem (Vector Word8) Source #

AtIndex (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int16 -> Position -> Elem (Vector Int16) Source #

atIndex :: Vector Int16 -> Position -> Elem (Vector Int16) Source #

AtIndex (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int32 -> Position -> Elem (Vector Int32) Source #

atIndex :: Vector Int32 -> Position -> Elem (Vector Int32) Source #

AtIndex (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int64 -> Position -> Elem (Vector Int64) Source #

atIndex :: Vector Int64 -> Position -> Elem (Vector Int64) Source #

AtIndex (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int8 -> Position -> Elem (Vector Int8) Source #

atIndex :: Vector Int8 -> Position -> Elem (Vector Int8) Source #

AtIndex (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word16 -> Position -> Elem (Vector Word16) Source #

atIndex :: Vector Word16 -> Position -> Elem (Vector Word16) Source #

AtIndex (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word32 -> Position -> Elem (Vector Word32) Source #

atIndex :: Vector Word32 -> Position -> Elem (Vector Word32) Source #

AtIndex (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word64 -> Position -> Elem (Vector Word64) Source #

atIndex :: Vector Word64 -> Position -> Elem (Vector Word64) Source #

AtIndex (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Word8 -> Position -> Elem (Vector Word8) Source #

atIndex :: Vector Word8 -> Position -> Elem (Vector Word8) Source #

AtIndex (Vector Int) Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

(!!!) :: Vector Int -> Position -> Elem (Vector Int) Source #

atIndex :: Vector Int -> Position -> Elem (Vector Int) Source #

AtIndex [a] Source # 
Instance details

Defined in HaskellWorks.Data.AtIndex

Methods

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

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

class Container v => Length v where Source #

Minimal complete definition

length

Methods

length :: v -> Count Source #

end :: v -> Position Source #

Instances

Instances details
Length ByteString Source # 
Instance details

Defined in HaskellWorks.Data.Length

Length (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int16 -> Count Source #

end :: Vector Int16 -> Position Source #

Length (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int32 -> Count Source #

end :: Vector Int32 -> Position Source #

Length (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int64 -> Count Source #

end :: Vector Int64 -> Position Source #

Length (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int8 -> Count Source #

end :: Vector Int8 -> Position Source #

Length (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word16 -> Count Source #

end :: Vector Word16 -> Position Source #

Length (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word32 -> Count Source #

end :: Vector Word32 -> Position Source #

Length (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word64 -> Count Source #

end :: Vector Word64 -> Position Source #

Length (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word8 -> Count Source #

end :: Vector Word8 -> Position Source #

Length (Vector Int16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int16 -> Count Source #

end :: Vector Int16 -> Position Source #

Length (Vector Int32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int32 -> Count Source #

end :: Vector Int32 -> Position Source #

Length (Vector Int64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int64 -> Count Source #

end :: Vector Int64 -> Position Source #

Length (Vector Int8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int8 -> Count Source #

end :: Vector Int8 -> Position Source #

Length (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word16 -> Count Source #

end :: Vector Word16 -> Position Source #

Length (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word32 -> Count Source #

end :: Vector Word32 -> Position Source #

Length (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word64 -> Count Source #

end :: Vector Word64 -> Position Source #

Length (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Word8 -> Count Source #

end :: Vector Word8 -> Position Source #

Length (Vector Int) Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: Vector Int -> Count Source #

end :: Vector Int -> Position Source #

Length [a] Source # 
Instance details

Defined in HaskellWorks.Data.Length

Methods

length :: [a] -> Count Source #

end :: [a] -> Position Source #

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.