Cabal-syntax-3.12.1.0: A library for working with .cabal files

Copyright | (c) Ben Gamari 2015-2019
License | BSD3
Maintainer | cabal-dev@haskell.org
Stability | experimental
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Compat.DList

Description

A very simple difference list.

Synopsis

- data DList a
- runDList :: DList a -> [a]
- empty :: DList a
- singleton :: a -> DList a
- fromList :: [a] -> DList a
- toList :: DList a -> [a]
- snoc :: DList a -> a -> DList a

# Documentation

data DList a Source #

Difference list.

#### Instances

Instances details

Monoid (DList a) Source # |
Instance details Defined in Distribution.Compat.DList Methods mempty :: DList a # mappend :: DList a -> DList a -> DList a # mconcat :: [DList a] -> DList a #
Semigroup (DList a) Source # |
Instance details Defined in Distribution.Compat.DList Methods (<>) :: DList a -> DList a -> DList a # sconcat :: NonEmpty (DList a) -> DList a # stimes :: Integral b => b -> DList a -> DList a #

runDList :: DList a -> [a] Source #

empty :: DList a Source #

Since: Cabal-syntax-3.4.0.0

singleton :: a -> DList a Source #

Make `DList` containing single element.

fromList :: [a] -> DList a Source #

toList :: DList a -> [a] Source #

snoc :: DList a -> a -> DList a Source #