Safe Haskell | Safe |
---|---|

Language | Haskell98 |

- class (Functor f, Applicative f, Foldable f, Traversable f) => Tup f where
- maybeTupFromList :: Tup f => [a] -> Maybe (f a)
- transposeTup :: (Tup f, Tup g) => f (g a) -> g (f a)
- maybeTupConcat :: (Tup f, Tup g, Tup h) => f a -> g a -> Maybe (h a)
- unsafeTupConcat :: (Tup f, Tup g, Tup h) => f a -> g a -> h a
- maybeConvertTup :: (Tup f, Tup g) => f a -> Maybe (g a)
- unsafeConvertTup :: (Tup f, Tup g) => f a -> g a
- zipTupWith :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- zipTupWith3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- zipTupWith4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e
- zipTup :: Applicative f => f a -> f b -> f (a, b)
- zipTup3 :: Applicative f => f a -> f b -> f c -> f (a, b, c)
- zipTup4 :: Applicative f => f a -> f b -> f c -> f d -> f (a, b, c, d)

# the Tup class

class (Functor f, Applicative f, Foldable f, Traversable f) => Tup f where Source #

tupSize :: f a -> Int Source #

tupToList :: f a -> [a] Source #

tupFromList :: [a] -> f a Source #

tupProxy :: f a -> Proxy a Source #

constantTup :: a -> f a Source #

undefinedTup :: f a Source #

Tup Empty Source # | |

Tup NTup9 Source # | |

Tup NTup8 Source # | |

Tup NTup7 Source # | |

Tup NTup6 Source # | |

Tup NTup5 Source # | |

Tup NTup4 Source # | |

Tup NTup3 Source # | |

Tup NTup2 Source # | |

Tup NTup1 Source # | |

Tup NTup0 Source # | |

Tup Tup9 Source # | |

Tup Tup8 Source # | |

Tup Tup7 Source # | |

Tup Tup6 Source # | |

Tup Tup5 Source # | |

Tup Tup4 Source # | |

Tup Tup3 Source # | |

Tup Tup2 Source # | |

Tup Tup1 Source # | |

Tup Tup0 Source # | |

Tup Tup9 Source # | |

Tup Tup8 Source # | |

Tup Tup7 Source # | |

Tup Tup6 Source # | |

Tup Tup5 Source # | |

Tup Tup4 Source # | |

Tup Tup3 Source # | |

Tup Tup2 Source # | |

Tup Tup1 Source # | |

Tup Tup0 Source # | |

Tup v => Tup (Cons v) Source # | |

# Misc

maybeTupFromList :: Tup f => [a] -> Maybe (f a) Source #

Safe version of `tupFromList`

.

transposeTup :: (Tup f, Tup g) => f (g a) -> g (f a) Source #

Transpose a Tup of Tups.

# Concatenation

maybeTupConcat :: (Tup f, Tup g, Tup h) => f a -> g a -> Maybe (h a) Source #

Safe concatenation (going through lists)

# Conversion

maybeConvertTup :: (Tup f, Tup g) => f a -> Maybe (g a) Source #

Safe conversion between different Tup implementations

unsafeConvertTup :: (Tup f, Tup g) => f a -> g a Source #

Unsafe conversion

# zipping (only using the Applicative structure)

zipTupWith :: Applicative f => (a -> b -> c) -> f a -> f b -> f c Source #

zipTupWith3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

zipTupWith4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #

zipTup :: Applicative f => f a -> f b -> f (a, b) Source #

zipTup3 :: Applicative f => f a -> f b -> f c -> f (a, b, c) Source #

zipTup4 :: Applicative f => f a -> f b -> f c -> f d -> f (a, b, c, d) Source #