shpider-0.2.1.1: Web automation library in Haskell.

Network.Shpider.Pairs

Description

This module provides a nice syntax for defining a list of pairs.

Synopsis

Documentation

type PairsWriter a b = State [(a, b)]Source

The abstract type describing the monadic state of a list of pairs.

(=:) :: forall a b. a -> b -> PairsWriter a b ()Source

Make a list of pairs of pairs like

    pairs $ do $ 3 =: ( " is my favourite number or " , 5 )
                 10 =: ( " pints have I drunk or was it " , 11 )

pairs :: forall a b c. PairsWriter a b c -> [(a, b)]Source

Take a monadic PairsWriter and return a list of pairs.