module TextViewport.Buffer.Item where import Data.Text (Text) import Data.HashMap.Strict qualified as HM import Text.Hyphenation qualified as H data Item = Item { itemText :: Text , itemSegments :: SegmentStrategy } deriving (Eq, Show) data SegmentStrategy = NoSegments | FixedWidthSegments | HyphenateSegments { hsDict :: H.Hyphenator , hsCache :: HM.HashMap Text [(Text, Text)] } deriving (Eq, Show) instance Show H.Hyphenator where show _ = "" instance Eq H.Hyphenator where a == b = False