Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Container a where
- type Elem a
- class Length v => AtIndex v where
- class Container v => Length v where
- atIndexOr :: AtIndex v => Elem v -> v -> Position -> Elem v
- atIndexOrBeforeOrAfter :: AtIndex v => Elem v -> Elem v -> v -> Position -> Elem v
- atIndexOrBeforeOrLast :: (AtIndex v, Length v) => Elem v -> v -> Position -> Elem v
Documentation
Instances
Container ByteString Source # | |
Defined in HaskellWorks.Data.Container type Elem ByteString :: Type Source # | |
Container [a] Source # | |
Defined in HaskellWorks.Data.Container | |
Container (Vector Int) Source # | |
Container (Vector Int8) Source # | |
Container (Vector Int16) Source # | |
Container (Vector Int32) Source # | |
Container (Vector Int64) Source # | |
Container (Vector Word8) Source # | |
Container (Vector Word16) Source # | |
Container (Vector Word32) Source # | |
Container (Vector Word64) Source # | |
Container (Vector Int8) Source # | |
Container (Vector Int16) Source # | |
Container (Vector Int32) Source # | |
Container (Vector Int64) Source # | |
Container (Vector Word8) Source # | |
Container (Vector Word16) Source # | |
Container (Vector Word32) Source # | |
Container (Vector Word64) Source # | |
class Length v => AtIndex v where Source #
Instances
AtIndex ByteString Source # | |
Defined in HaskellWorks.Data.AtIndex (!!!) :: ByteString -> Position -> Elem ByteString Source # atIndex :: ByteString -> Position -> Elem ByteString Source # | |
AtIndex [a] Source # | |
AtIndex (Vector Int) Source # | |
AtIndex (Vector Int8) Source # | |
AtIndex (Vector Int16) Source # | |
AtIndex (Vector Int32) Source # | |
AtIndex (Vector Int64) Source # | |
AtIndex (Vector Word8) Source # | |
AtIndex (Vector Word16) Source # | |
AtIndex (Vector Word32) Source # | |
AtIndex (Vector Word64) Source # | |
AtIndex (Vector Int8) Source # | |
AtIndex (Vector Int16) Source # | |
AtIndex (Vector Int32) Source # | |
AtIndex (Vector Int64) Source # | |
AtIndex (Vector Word8) Source # | |
AtIndex (Vector Word16) Source # | |
AtIndex (Vector Word32) Source # | |
AtIndex (Vector Word64) Source # | |
class Container v => Length v where Source #
Instances
Length ByteString Source # | |
Defined in HaskellWorks.Data.Length length :: ByteString -> Count Source # end :: ByteString -> Position Source # | |
Length [a] Source # | |
Length (Vector Int) Source # | |
Length (Vector Int8) Source # | |
Length (Vector Int16) Source # | |
Length (Vector Int32) Source # | |
Length (Vector Int64) Source # | |
Length (Vector Word8) Source # | |
Length (Vector Word16) Source # | |
Length (Vector Word32) Source # | |
Length (Vector Word64) Source # | |
Length (Vector Int8) Source # | |
Length (Vector Int16) Source # | |
Length (Vector Int32) Source # | |
Length (Vector Int64) Source # | |
Length (Vector Word8) Source # | |
Length (Vector Word16) Source # | |
Length (Vector Word32) Source # | |
Length (Vector Word64) 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.