cabal-debian-4.36.1: Create a Debianization for a Cabal package

Safe HaskellNone
LanguageHaskell2010

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 where Source #

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.

Minimal complete definition

leftmost, pairs

Methods

leftmost :: t -> around Source #

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

foldTriples :: (around -> between -> around -> r -> r) -> r -> t -> r Source #

foldInverted :: (Maybe between -> around -> Maybe between -> r -> r) -> r -> t -> r Source #

foldArounds :: (around -> around -> r -> r) -> r -> t -> r Source #

foldBetweens :: (between -> r -> r) -> r -> t -> r Source #