toy-lib-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

ToyLib.Debug.Grid

Description

Debug utilities

Synopsis

Documentation

class ShowGrid a where #

For use with dbgS

Methods

showGrid :: a -> String #

showGridN :: Int -> a -> String #

Instances

Instances details
(Vector v a, Show a) => ShowGrid (IxVector (Int, Int) (v a)) # 
Instance details

Defined in ToyLib.Debug.Grid

Methods

showGrid :: IxVector (Int, Int) (v a) -> String #

showGridN :: Int -> IxVector (Int, Int) (v a) -> String #

dbgGrid :: ShowGrid a => a -> () #

Shows grid in a human-readable spacing.

dbgGridM :: (PrimMonad m, Vector v a, Show a, ShowGrid (IxVector (Int, Int) (v a))) => IxVector (Int, Int) (Mutable v (PrimState m) a) -> m () #

Monadic variant of dbgGrid.

dbgGridId :: ShowGrid a => a -> a #

Shows grid in a human-readable spacing.

dbgGridN :: ShowGrid a => Int -> a -> () #

Shows grid with the specified spacing.

dbgGridNId :: ShowGrid a => Int -> a -> a #

Shows grid with the specified spacing.