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

Pandora.Paradigm.Structure.Interface.Stack

Synopsis

Documentation

class Stack t where Source #

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

Associated Types

type Topping t :: * -> * Source #

type Popping t :: * -> * Source #

type Pushing t :: * -> * Source #

Methods

top :: Lens (Topping t) (t e) e Source #

pop :: State (Popping t e) (Maybe e) Source #

push :: e -> State (Pushing t 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 #

type Popping List :: Type -> Type Source #

type Pushing List :: Type -> Type Source #

Methods

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

pop :: State (Popping List e) (Maybe e) Source #

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

Stack (Construction Maybe) Source # 
Instance details

Defined in Pandora.Paradigm.Structure.Some.List

Associated Types

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

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

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