Follow.Middlewares.Filter.Internal

Description

This module defines some predicate builders and combinators useful to apply the filter middleware to a directory.

Synopsis

# Documentation

type Predicate = Entry -> Bool Source #

Predicate that takes an Entry as argument.

equalP :: Eq a => EntryGetter a -> a -> Predicate Source #

Builds a predicate which takes the field returned by the getter and compares with given value for equality. It returns False when field is Nothing.

lessP :: Ord a => EntryGetter a -> a -> Predicate Source #

Builds a predicate which takes the field returned by the getter and compares whether it is less than given value. It returns False when field is Nothing.

greaterP :: Ord a => EntryGetter a -> a -> Predicate Source #

Builds a predicate which takes the field returned by the getter and compares whether it is greater than given value. It returns False when field is Nothing.

Builds a predicate which takes given value and checks whether it is an infix for the field returned by given getter. It returns False when field is Nothing.

Builds a predicate which takes given value and checks whether it is a prefix for the field returned by given getter. It returns False when field is Nothing.

Builds a predicate which takes given value and checks whether it is a suffix for the field returned by given getter. It returns False when field is Nothing.

Builds a predicate which combines with a logical and given predicates.

Builds a predicate which combines with a logical or given predicates.

Build a predicte which negates the result of given predicate.