yi-0.7.2: The Haskell-Scriptable Editor

Safe HaskellNone

Yi.Region

Description

This module defines the Region ADT

Synopsis

Documentation

data Region Source

The region data type. The region is semi open: it includes the start but not the end bound. This allows simpler region-manipulation algorithms. Invariant : regionStart r <= regionEnd r

emptyRegion :: RegionSource

The empty region

mkRegion :: Point -> Point -> RegionSource

Construct a region from its bounds, emacs style: the right bound is excluded

inRegion :: Point -> Region -> BoolSource

True if the given point is inside the given region.

nearRegion :: Point -> Region -> BoolSource

True if the given point is inside the given region or at the end of it.

includedRegion :: Region -> Region -> BoolSource

Returns if a region (1st arg) is included in another (2nd arg)

intersectRegion :: Region -> Region -> RegionSource

Take the intersection of two regions

unionRegion :: Region -> Region -> RegionSource

Take the union of two regions (including what is between them)

regionsOverlap :: Bool -> Region -> Region -> BoolSource