pandora-0.5.5: A box of patterns and paradigms
Safe HaskellSafe-Inferred
LanguageHaskell2010

Pandora.Paradigm.Structure.Interface.Stack

Synopsis

Documentation

class Stack structure where Source #

When providing a new instance, you should ensure it satisfies:
* Idempotency: item @Push x . morph @Pop ≡ identity

Associated Types

type Topping structure :: * -> * Source #

Methods

top :: ((Lens < Topping structure) < structure e) < e Source #

pop :: (State < structure e) < Topping structure e Source #

push :: e -> (State < structure e) < e Source #

Instances

Instances details
Stack List Source # 
Instance details

Defined in Pandora.Paradigm.Structure.Some.List

Associated Types

type Topping List :: Type -> Type Source #

Methods

top :: ((Lens < Topping List) < List e) < e Source #

pop :: (State < List e) < Topping List e Source #

push :: e -> (State < List e) < e Source #

Stack (Construction Exactly) Source # 
Instance details

Defined in Pandora.Paradigm.Structure.Some.Stream

Associated Types

type Topping (Construction Exactly) :: Type -> Type Source #

Stack (Construction Maybe) Source # 
Instance details

Defined in Pandora.Paradigm.Structure.Some.List

Associated Types

type Topping (Construction Maybe) :: Type -> Type Source #