{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Haskus.Format.Text
( TextBuffer (..)
, TextI
, TextB
, ShowText (..)
)
where
import Haskus.Memory.Buffer
import Haskus.Utils.Flow
newtype TextBuffer (t :: k) b
= TextBuffer b
type TextI t = TextBuffer t BufferI
type TextB t mut pin fin heap = TextBuffer t (Buffer mut pin fin heap)
class ShowText t b where
showTextIO :: MonadIO m => TextBuffer t b -> m String
showText :: BufferToList b => TextBuffer t b -> String