cabal-debian-5.2.3: Create a Debianization for a Cabal package
Safe HaskellSafe-Inferred
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 #

Instances

Instances details
Interspersed VersionSplits DebBase Version Source # 
Instance details

Defined in Debian.Debianize.VersionSplits

Methods

leftmost :: VersionSplits -> DebBase Source #

pairs :: VersionSplits -> [(Version, DebBase)] Source #

foldTriples :: (DebBase -> Version -> DebBase -> r -> r) -> r -> VersionSplits -> r Source #

foldInverted :: (Maybe Version -> DebBase -> Maybe Version -> r -> r) -> r -> VersionSplits -> r Source #

foldArounds :: (DebBase -> DebBase -> r -> r) -> r -> VersionSplits -> r Source #

foldBetweens :: (Version -> r -> r) -> r -> VersionSplits -> r Source #