sized-grid-0.1.1.5: Multidimensional grids with sized specified at compile time

Safe HaskellNone
LanguageHaskell2010

SizedGrid.Grid.Class

Synopsis

Documentation

class IsGrid cs grid | grid -> cs where Source #

Conversion between Grid and FocusedGrid and access grids at a Coord

Methods

gridIndex :: Coord cs -> Lens' (grid a) a Source #

Get the element at a grid location. This is a lens because we know it must exist

asGrid :: Lens' (grid a) (Grid cs a) Source #

Convert to, or run a function over, a Grid

asFocusedGrid :: Lens' (grid a) (FocusedGrid cs a) Source #

Convert to, or run a function over, a FocusedGrid

Instances
(AllSizedKnown cs, All IsCoord cs) => IsGrid cs (FocusedGrid cs) Source # 
Instance details

Defined in SizedGrid.Grid.Class

(AllSizedKnown cs, All IsCoord cs) => IsGrid cs (Grid cs) Source # 
Instance details

Defined in SizedGrid.Grid.Class

Methods

gridIndex :: Coord cs -> Lens' (Grid cs a) a Source #

asGrid :: Lens' (Grid cs a) (Grid cs a) Source #

asFocusedGrid :: Lens' (Grid cs a) (FocusedGrid cs a) Source #