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.SnocList

Description

A type aligned sequence, a snoc list, with worst case constant time: |>, and tviewr.

Documentation

data SnocList c x y where #

Constructors

SNil :: SnocList c x x 
Snoc :: SnocList c x y -> c y z -> SnocList c x z 

Instances

TASequence SnocList # 

Methods

tempty :: SnocList c x x #

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

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

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

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

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

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

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