~jaro/balkon

cf2ed91b8d903206259808e506e09b8b4febb73b — Jaro 1 year, 10 months ago 4bd95db
Avoid reimplementing Data.Text.Lazy.fromStrict.
1 files changed, 2 insertions(+), 5 deletions(-)

M src/Data/Text/ParagraphLayout/Plain.hs
M src/Data/Text/ParagraphLayout/Plain.hs => src/Data/Text/ParagraphLayout/Plain.hs +2 -5
@@ 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