From 30db7902f853fe99c91d748d41f591ea8bcf56e8 Mon Sep 17 00:00:00 2001 From: William Yao Date: Sun, 15 Dec 2019 20:43:02 -0600 Subject: [PATCH] simple change to make char textable --- src/Data/Text/Conversions.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/Text/Conversions.hs b/src/Data/Text/Conversions.hs index 692a50f..9e4bd7a 100644 --- a/src/Data/Text/Conversions.hs +++ b/src/Data/Text/Conversions.hs @@ -143,6 +143,7 @@ convertText = fromText . toText decodeConvertText :: (DecodeText f a, FromText b) => a -> f b decodeConvertText = fmap fromText . decodeText +instance ToText Char where toText = T.singleton instance ToText T.Text where toText = id instance FromText T.Text where fromText = id instance ToText String where toText = T.pack