-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A list-like type for lazy sequences, with a user-defined termination value. -- -- A list-like type for lazy sequences, with a user-defined termination -- value. @package capped-list @version 1.1 -- | A list-like type for lazy sequences, with a user-defined termination -- value. -- -- This module uses common names and so is designed to be imported -- qualified: -- --
-- import qualified Data.CappedList as CL --module Data.CappedList -- | A list-like type for lazy sequences, with a user-defined termination -- value. data CappedList cap a Next :: a -> (CappedList cap a) -> CappedList cap a Cap :: cap -> CappedList cap a -- | Like the standard null function. null :: CappedList cap a -> Bool -- | Like the standard ++ function. append :: CappedList cap a -> CappedList cap a -> CappedList cap a -- | Like the standard map function. map :: (a -> b) -> CappedList cap a -> CappedList cap b -- | Like the standard map function, but the mapping function may -- return a capping value. mapEither :: (a -> Either cap b) -> CappedList cap a -> CappedList cap b -- | Like the standard concatMap function. concatMap :: (a -> CappedList cap b) -> CappedList cap a -> CappedList cap b -- | Like the standard foldr function, but accepting an extra -- parameter to handle Cap values. foldr :: (a -> b -> b) -> (cap -> b) -> CappedList cap a -> b -- | Like the standard foldl function, but accepting an extra -- parameter to handle Cap values. foldl :: (b -> a -> b) -> (cap -> b) -> CappedList cap a -> b -- | Like the standard Data.List.unfoldr function, but the step function -- must return a cap to terminate the unfold. unfoldr :: (b -> Either cap (a, b)) -> b -> CappedList cap a -- | Like the standard length function; Cap is considered -- 0-length. length :: CappedList cap a -> Int instance (Eq cap, Eq a) => Eq (CappedList cap a) instance (Show cap, Show a) => Show (CappedList cap a) instance (Empty cap) => MonadFix (CappedList cap) instance Traversable (CappedList cap) instance Foldable (CappedList cap) instance (Empty cap) => Applicative (CappedList cap) instance (Empty cap) => Alternative (CappedList cap) instance (Empty cap) => MonadPlus (CappedList cap) instance (Empty cap) => Monad (CappedList cap) instance (Empty cap) => Monoid (CappedList cap a) instance Functor (CappedList cap) instance (Empty cap) => Empty (CappedList cap a)