From 7b20c6723c0383571668d657a78f3ad1ec2777a1 Mon Sep 17 00:00:00 2001 From: William Rusnack Date: Sun, 5 May 2024 12:57:34 -0400 Subject: [PATCH] added to the api a placeholder for hPutBuilder --- src/Data/Text/Lazy/Builder/IO.hs | 13 +++++++++++++ text.cabal | 1 + 2 files changed, 14 insertions(+) create mode 100644 src/Data/Text/Lazy/Builder/IO.hs diff --git a/src/Data/Text/Lazy/Builder/IO.hs b/src/Data/Text/Lazy/Builder/IO.hs new file mode 100644 index 00000000..7bba2f8f --- /dev/null +++ b/src/Data/Text/Lazy/Builder/IO.hs @@ -0,0 +1,13 @@ +module Data.Text.Lazy.Builder.IO + ( hPutBuilder + ) where + +import System.IO (Handle) +import Data.Text.Lazy.Builder (Builder, toLazyText) +import qualified Data.Text.Lazy.IO as L + +-- | Write a Builder to a handle. +-- Currently, just a placeholder that uses LazyText until an implementation is added. +hPutBuilder :: Handle -> Builder -> IO () +hPutBuilder h b = L.hPutStr h $ toLazyText b + diff --git a/text.cabal b/text.cabal index 9b10c97c..b41ae9fc 100644 --- a/text.cabal +++ b/text.cabal @@ -195,6 +195,7 @@ library Data.Text.Lazy Data.Text.Lazy.Builder Data.Text.Lazy.Builder.Int + Data.Text.Lazy.Builder.IO Data.Text.Lazy.Builder.RealFloat Data.Text.Lazy.Encoding Data.Text.Lazy.IO