boomerang-1.3.2: Library for invertible parsing and printing

Text.Boomerang.HStack

Description

a simple heteregenous stack library

Synopsis

data a :- b Source

A stack datatype. Just a better looking tuple.

Constructors

Instances

arg :: (ty -> r -> s) -> (a -> ty) -> (a :- r) -> sSource

hdTraverse :: Functor f => (a -> f b) -> (a :- t) -> f (b :- t)Source

Applicative traversal over the top of the stack.

hdMap :: (a1 -> a2) -> (a1 :- b) -> a2 :- bSource

Map over the top of the stack.

hhead :: (a :- b) -> aSource

Get the top of the stack.

htail :: (a :- b) -> bSource

Get the stack with the top popped.

pop :: (a -> b -> r) -> (a :- b) -> rSource

Stack destructor.