From 6b767df2fc47a77a4f856e040346ce49c0e7bf00 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 25 Jan 2019 04:15:45 +0100 Subject: Add support for Text --- src/Blessings/Text.hs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/Blessings/Text.hs (limited to 'src/Blessings/Text.hs') diff --git a/src/Blessings/Text.hs b/src/Blessings/Text.hs new file mode 100644 index 0000000..64d261b --- /dev/null +++ b/src/Blessings/Text.hs @@ -0,0 +1,18 @@ +{-# OPTIONS_GHC -fno-warn-orphans #-} + +module Blessings.Text + ( module Blessings + ) where + +import Blessings +import Blessings.Internal +import Data.Text (Text) +import qualified Data.Text as T + + +instance Blessable Text where + length = T.length + drop = T.drop + take = T.take + intercalate = T.intercalate + fromInt = T.pack . show -- cgit v1.2.3