type-aligned-0.9.6: Various type-aligned sequence data structures.

Copyright(c) Atze van der Ploeg 2014
LicenseBSD-style
Maintaineratzeus@gmail.org
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.TASequence.ConsList

Description

A type aligned sequence, a head-tail list, with worst case constant time: <|, and tviewl.

Documentation

data ConsList c x y where #

Constructors

CNil :: ConsList c x x 
Cons :: c x y -> ConsList c y z -> ConsList c x z 

Instances

TASequence ConsList # 

Methods

tempty :: ConsList c x x #

tsingleton :: c x y -> ConsList c x y #

(><) :: ConsList c x y -> ConsList c y z -> ConsList c x z #

tviewl :: ConsList c x y -> TAViewL ConsList c x y #

tviewr :: ConsList c x y -> TAViewR ConsList c x y #

(|>) :: ConsList c x y -> c y z -> ConsList c x z #

(<|) :: c x y -> ConsList c y z -> ConsList c x z #

tmap :: (forall x y. c x y -> d x y) -> ConsList c x y -> ConsList d x y #