HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulebrick-2.10Haskell2010

Brick.BorderMap

  • 2 types
  • 24 values
  • Packagebrick-2.10
  • Exports26
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBorderMap.hs
datadata BorderMap a
#

A BorderMap a is like a Map Location a, except that there is a rectangle, and only Locations on the border of this rectangle are retained. The BorderMap can be queried for the position and size of the rectangle. There are also efficient bulk query and bulk update operations for adjacent positions on the border.

Instances8Functor, Eq, Ord, Read, Show, Generic, …
datadata Edges a
#

Constructors

Instances10Monad, Functor, Applicative, Eq, Ord, Read, …
valuecoordinates :: BorderMap a -> Edges Int
#

The positions of the edges of the rectangle whose border is retained in a BorderMap. For example, if coordinates m = e, then the top border contains the Locations on row eTop e and between columns eLeft e to eRight e inclusive.

valuebounds :: BorderMap a -> Edges (Int, Int)
#

A complementary way to query the edges of the rectangle whose border is retained in a BorderMap. For example, if bounds m = b, then a Location's column must be between fst (eTop b) and snd (eTop b) to be retained. See also coordinates, which is in most cases a more natural border query.

valuevalues :: BorderMap a -> Edges (IMap a)
#

Maps giving the values along each edge. Corner values are replicated in all relevant edges.

valuelookupH :: Location -> Run ignored -> BorderMap a -> IMap a
#

Bulk lookup of horizontally-adjacent values. The Location gives the starting point, and the Run extends in the "larger columns" direction. The IMap returned maps columns to values.

valuelookupV :: Location -> Run ignored -> BorderMap a -> IMap a
#

Bulk lookup of vertically-adjacent values. The Location gives the starting point, and the Run extends in the "larger rows" direction. The IMap returned maps rows to values.