relational-query: fix wrong lazy instances.

This commit is contained in:
Kei Hibino 2017-04-04 15:45:52 +09:00
parent 7d0ffa6b86
commit 35e1859ffd

View File

@ -22,6 +22,7 @@ import Data.Text (Text)
import qualified Data.Text as T import qualified Data.Text as T
import qualified Data.Text.Encoding as T import qualified Data.Text.Encoding as T
import qualified Data.Text.Lazy as LT import qualified Data.Text.Lazy as LT
import qualified Data.Text.Lazy.Encoding as LT
import Text.Printf (PrintfArg, printf) import Text.Printf (PrintfArg, printf)
import Data.Time (FormatTime, Day, TimeOfDay, LocalTime, UTCTime, ZonedTime, formatTime) import Data.Time (FormatTime, Day, TimeOfDay, LocalTime, UTCTime, ZonedTime, formatTime)
import Data.Time.Locale.Compat (defaultTimeLocale) import Data.Time.Locale.Compat (defaultTimeLocale)
@ -89,7 +90,7 @@ instance ShowConstantTermsSQL ByteString where
-- | Constant SQL terms of 'LB.ByteString'. -- | Constant SQL terms of 'LB.ByteString'.
instance ShowConstantTermsSQL LB.ByteString where instance ShowConstantTermsSQL LB.ByteString where
showConstantTermsSQL = mconcat . map showConstantTermsSQL . LB.toChunks showConstantTermsSQL = stringTermsSQL . LT.unpack . LT.decodeUtf8
-- | Constant SQL terms of 'Text'. -- | Constant SQL terms of 'Text'.
instance ShowConstantTermsSQL Text where instance ShowConstantTermsSQL Text where
@ -97,7 +98,7 @@ instance ShowConstantTermsSQL Text where
-- | Constant SQL terms of 'LT.Text'. -- | Constant SQL terms of 'LT.Text'.
instance ShowConstantTermsSQL LT.Text where instance ShowConstantTermsSQL LT.Text where
showConstantTermsSQL = mconcat . map showConstantTermsSQL . LT.toChunks showConstantTermsSQL = stringTermsSQL . LT.unpack
-- | Constant SQL terms of 'Char'. -- | Constant SQL terms of 'Char'.
instance ShowConstantTermsSQL Char where instance ShowConstantTermsSQL Char where