From cf2ed91b8d903206259808e506e09b8b4febb73b Mon Sep 17 00:00:00 2001 From: Jaro Date: Wed, 22 Feb 2023 08:13:39 +0100 Subject: [PATCH] Avoid reimplementing Data.Text.Lazy.fromStrict. --- src/Data/Text/ParagraphLayout/Plain.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Data/Text/ParagraphLayout/Plain.hs b/src/Data/Text/ParagraphLayout/Plain.hs index 25e1fb2..3a0cd7e 100644 --- a/src/Data/Text/ParagraphLayout/Plain.hs +++ b/src/Data/Text/ParagraphLayout/Plain.hs @@ -34,7 +34,7 @@ import Data.Text.Glyphize ,shape ) import Data.Text.Internal (Text(Text)) -import qualified Data.Text.Internal.Lazy as Lazy +import qualified Data.Text.Lazy as Lazy import Data.Text.ParagraphLayout.Rect import qualified Data.Text.ParagraphLayout.ResolvedSpan as RS @@ -160,7 +160,7 @@ layoutRun run = (rect, glyphs) font = RS.spanFont rs -- TODO: Set beginsText / endsText. buffer = defaultBuffer - { text = fromStrict $ runText run + { text = Lazy.fromStrict $ runText run , contentType = Just ContentTypeUnicode , direction = runDirection run , script = runScript run @@ -217,6 +217,3 @@ arrangeBoxH currentX (rect, glyphs) = (nextX, (newRect, glyphs)) where nextX = currentX + x_size rect newRect = rect { x_origin = currentX } - -fromStrict :: Text -> Lazy.Text -fromStrict t = Lazy.Chunk t Lazy.Empty -- 2.30.2