sql-words 0.1.0.0 → 0.1.1.0
raw patch · 2 files changed
+7/−2 lines, 2 files
Files
sql-words.cabal view
@@ -1,5 +1,5 @@ name: sql-words-version: 0.1.0.0+version: 0.1.1.0 synopsis: Simple idea SQL keywords data constructor into OverloadedString description: This package contiains SQL keywords constructors defined as OverloadedString literals and helper functions to concate these.
src/Language/SQL/Keyword/Concat.hs view
@@ -28,6 +28,7 @@ (.||.), (.=.), (.<.), (.<=.), (.>.), (.>=.), (.<>.), and, or, in',+ (<++>), fold, @@ -38,7 +39,7 @@ import Prelude hiding (and, or, not) import Data.List (intersperse)-import Data.Monoid (mempty, mconcat)+import Data.Monoid (mempty, mconcat, (<>)) import Language.SQL.Keyword.Internal.Type (Keyword (..), word, wordShow, toDString, fromDString) @@ -70,6 +71,10 @@ {- $binaryOperators Binary operators on SQL. Result is concatinated into one 'Keyword'. -}++-- | Directly concatinate SQL string without whitespaces.+(<++>) :: Keyword -> Keyword -> Keyword+x <++> y = fromDString $ toDString x <> toDString y concat' :: [Keyword] -> Keyword concat' = fromDString . mconcat . map toDString