Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Tuple
- tupleType :: Type
- toTuple :: [SomeObject] -> IO Tuple
- iterableToTuple :: Object iter => iter -> IO Tuple
- fromTuple :: Tuple -> IO [SomeObject]
- length :: Tuple -> IO Integer
- getItem :: Tuple -> Integer -> IO SomeObject
- getSlice :: Tuple -> Integer -> Integer -> IO Tuple
- setItem :: Object o => Tuple -> Integer -> o -> IO ()
Documentation
Instances
Concrete Tuple Source # | |
Defined in CPython.Types.Tuple concreteType :: Tuple -> Type | |
Object Tuple Source # | |
Defined in CPython.Internal toObject :: Tuple -> SomeObject Source # fromForeignPtr :: ForeignPtr Tuple -> Tuple | |
Sequence Tuple Source # | |
Defined in CPython.Protocols.Sequence toSequence :: Tuple -> SomeSequence Source # |
iterableToTuple :: Object iter => iter -> IO Tuple Source #
Convert any object implementing the iterator protocol to a Tuple
.
getItem :: Tuple -> Integer -> IO SomeObject Source #
Return the object at a given index from a tuple, or throws IndexError
if the index is out of bounds.
getSlice :: Tuple -> Integer -> Integer -> IO Tuple Source #
Take a slice of a tuple from low to high, and return it as a new tuple.