@@ -19,6 +19,7 @@ module Graphics.Vty.Image ( Image(..)
1919 , utf8_string
2020 , utf8_bytestring
2121 , char_fill
22+ , empty_image
2223 -- | The possible display attributes used in constructing an `Image`.
2324 , module Graphics.Vty.Attributes
2425 )
@@ -91,7 +92,11 @@ data Image =
9192 { output_width :: !Word -- >= 1
9293 , output_height :: !Word -- >= 1
9394 }
94− -- Any image of zero size equals the id image
95+ -- The combining operators identity constant.
96+ -- IdImage <|> a = a
97+ -- IdImage <-> a = a
98+ --
99+ -- Any image of zero size equals the identity image.
95100 | IdImage
96101 deriving Eq
97102
@@ -310,3 +315,8 @@ char_fill :: Enum d => Attr -> Char -> d -> d -> Image
310315char_fill !a !c w h =
311316 vert_cat $ replicate (fromEnum h) $ horiz_cat $ replicate (fromEnum w) $ char a c
312317
318+-- | The empty image. Useful for fold combinators. These occupy no space nor define any display
319+-- attributes.
320+empty_image :: Image
321+empty_image = IdImage
322+