From 66eee199cbd7d6688fb429583a1bf9ab8109f90c Mon Sep 17 00:00:00 2001 From: Nikita Volkov Date: Sun, 22 Nov 2015 08:34:27 +0300 Subject: [PATCH] "noResult" -> "unit" --- library/Hasql/Decoding.hs | 12 ++++++------ tasty/Main.hs | 4 ++-- tasty/Main/Queries.hs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/library/Hasql/Decoding.hs b/library/Hasql/Decoding.hs index 63c32a1..6a91739 100644 --- a/library/Hasql/Decoding.hs +++ b/library/Hasql/Decoding.hs @@ -4,7 +4,7 @@ module Hasql.Decoding ( -- * Result Result, - noResult, + unit, rowsAffected, singleRow, -- ** Specialized multi-row results @@ -82,9 +82,9 @@ newtype Result a = -- -- Useful for statements like @INSERT@ or @CREATE@. -- -{-# INLINABLE noResult #-} -noResult :: Result () -noResult = +{-# INLINABLE unit #-} +unit :: Result () +unit = Result (Results.single Result.unit) -- | @@ -158,11 +158,11 @@ rowsList = -- ** Instances ------------------------- --- | Maps to 'noResult'. +-- | Maps to 'unit'. instance Default (Result ()) where {-# INLINE def #-} def = - noResult + unit -- | Maps to 'rowsAffected'. instance Default (Result Int64) where diff --git a/tasty/Main.hs b/tasty/Main.hs index ea028ac..20a5b81 100644 --- a/tasty/Main.hs +++ b/tasty/Main.hs @@ -27,14 +27,14 @@ tree = DSL.session $ do let query = - H.Query sql mempty HD.noResult True + H.Query sql mempty HD.unit True where sql = "drop type if exists mood" in DSL.query () query let query = - H.Query sql mempty HD.noResult True + H.Query sql mempty HD.unit True where sql = "create type mood as enum ('sad', 'ok', 'happy')" diff --git a/tasty/Main/Queries.hs b/tasty/Main/Queries.hs index e27d9ac..ae90493 100644 --- a/tasty/Main/Queries.hs +++ b/tasty/Main/Queries.hs @@ -13,7 +13,7 @@ def sql = plain :: ByteString -> H.Query () () plain sql = - H.Query sql mempty HD.noResult False + H.Query sql mempty HD.unit False dropType :: ByteString -> H.Query () () dropType name =