Copyright | (c) 2012 Patrick Bahr |
---|---|
License | BSD3 |
Maintainer | Patrick Bahr <paba@diku.dk> |
Stability | experimental |
Portability | non-portable (GHC Extensions) |
Safe Haskell | None |
Language | Haskell98 |
This module provides functionality to number the components of a functorial value with consecutive integers.
- newtype Numbered a i = Numbered (Int, a i)
- unNumbered :: Numbered a :-> a
- number :: HTraversable f => f a :-> f (Numbered a)
- class HFoldable t => HTraversable t
Documentation
This type is used for numbering components of a functorial value.
unNumbered :: Numbered a :-> a Source
number :: HTraversable f => f a :-> f (Numbered a) Source
This function numbers the components of the given functorial value with consecutive integers starting at 0.
class HFoldable t => HTraversable t Source
HTraversable f => HTraversable (Cxt h f) | |
HTraversable f => HTraversable ((:&:) * f a) | |
(HTraversable f, HTraversable g) => HTraversable ((:+:) * f g) |