cabal-debian-4.0.4: Create a debianization for a cabal package

Safe HaskellNone

Debian.Debianize.Interspersed

Description

A class used while converting Cabal dependencies into Debian dependencies.

Synopsis

Documentation

class Interspersed t around between | t -> around, t -> between whereSource

A class of Bs insterspersed with Cs. It is used when converting the cabal dependencies to debian, where the around type is the binary package name and the between type is the version number.

Minimum implementation is a method to return the leftmost B, and another to return the following (C,B) pairs. Its unfortunate to require lists in the implementation, a fold function would be better (though I find implementing such folds to be a pain in the you-know-what.)

The class provides implementations of three folds, each of which exposes slightly different views of the data.

Methods

leftmost :: t -> aroundSource

pairs :: t -> [(between, around)]Source

foldTriples :: (around -> between -> around -> r -> r) -> r -> t -> rSource

foldInverted :: (Maybe between -> around -> Maybe between -> r -> r) -> r -> t -> rSource

foldArounds :: (around -> around -> r -> r) -> r -> t -> rSource

foldBetweens :: (between -> r -> r) -> r -> t -> rSource