HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduledlist-1.0Haskell2010

Data.DList.Unsafe

This module exports the DList constructor, UnsafeDList, and the record label, unsafeApplyDList, both of which can be used to create unsafe DList values that break the invariant preserved by the names exported from DList.

  • 1 type
  • Packagedlist-1.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUnsafe.hs
newtypenewtype DList a
#

A difference list is an abstraction representing a list that supports \mathcal{O}(1) append and snoc operations, making it useful for replacing frequent applications of ++ such as logging and pretty printing (esp. if those uses of ++ are left-nested).

Constructors

  • UnsafeDList
    • unsafeApplyDList :: [a] -> [a]
Instances18Monad, Functor, MonadFail, Applicative, Foldable, Traversable, …