@@ -88,17 +88,13 @@ vertCat = foldr vertJoin EmptyImage
89-- | A Data.Text.Lazy value
89-- | A Data.Text.Lazy value
90text :: Attr -> TL.Text -> Image
90text :: Attr -> TL.Text -> Image
92− | TL.length txt == 0 = EmptyImage
93− | otherwise = let displayWidth = safeWcswidth (TL.unpack txt)
91+text a txt = let displayWidth = safeWcswidth (TL.unpack txt)
94− in HorizText a txt displayWidth (fromIntegral $! TL.length txt)
92+ in HorizText a txt displayWidth (fromIntegral $! TL.length txt)
96-- | A Data.Text value
94-- | A Data.Text value
97text' :: Attr -> T.Text -> Image
95text' :: Attr -> T.Text -> Image
99− | T.length txt == 0 = EmptyImage
100− | otherwise = let displayWidth = safeWcswidth (T.unpack txt)
96+text' a txt = let displayWidth = safeWcswidth (T.unpack txt)
101− in HorizText a (TL.fromStrict txt) displayWidth (T.length txt)
97+ in HorizText a (TL.fromStrict txt) displayWidth (T.length txt)
103-- | an image of a single character. This is a standard Haskell 31-bit character assumed to be in
99-- | an image of a single character. This is a standard Haskell 31-bit character assumed to be in
104-- the ISO-10646 encoding.
100-- the ISO-10646 encoding.
@@ -117,7 +113,6 @@ char a c =
117-- directly to iso10646String or string.
113-- directly to iso10646String or string.
119iso10646String :: Attr -> String -> Image
115iso10646String :: Attr -> String -> Image
120−iso10646String _ [] = EmptyImage
121iso10646String a str =
116iso10646String a str =
122 let displayWidth = safeWcswidth str
117 let displayWidth = safeWcswidth str
123 in HorizText a (TL.pack str) displayWidth (length str)
118 in HorizText a (TL.pack str) displayWidth (length str)