~jaro/balkon

e9f7ad6373bb835cf35c67316f7d6296ae9067ea — Jaro 1 year, 8 months ago 229c02c
Hide Rect union from public interface.

The function behaves in a specific way that should not be relied on by
other modules.
M lib/Data/Text/ParagraphLayout/Rect.hs => lib/Data/Text/ParagraphLayout/Rect.hs +0 -1
@@ 3,7 3,6 @@
module Data.Text.ParagraphLayout.Rect
    (Rect(Rect, x_origin, y_origin, x_size, y_size)
    ,height
    ,union
    ,width
    ,x_max
    ,x_min

M src/Data/Text/ParagraphLayout/Internal/Rect.hs => src/Data/Text/ParagraphLayout/Internal/Rect.hs +0 -3
@@ 63,6 63,3 @@ union a b = Rect x_low y_high dx (-dy) where
    y_high = y_max a `max` y_max b
    dx = x_high - x_low
    dy = y_high - y_low

instance (Num a, Ord a) => Semigroup (Rect a) where
    (<>) = union

M test/Data/Text/ParagraphLayout/RectSpec.hs => test/Data/Text/ParagraphLayout/RectSpec.hs +1 -1
@@ 3,7 3,7 @@ module Data.Text.ParagraphLayout.RectSpec (spec) where
import Data.Int (Int32)

import Test.Hspec
import Data.Text.ParagraphLayout.Rect
import Data.Text.ParagraphLayout.Internal.Rect

positiveRect :: Rect Int32
positiveRect = Rect 50 (-70) 10 10