mirror of
https://github.com/zhigang1992/graphql-engine.git
synced 2026-05-25 18:32:23 +08:00
move raven into graphql-engine repo
This commit is contained in:
29
server/src-lib/Data/Text/Extended.hs
Normal file
29
server/src-lib/Data/Text/Extended.hs
Normal file
@@ -0,0 +1,29 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Data.Text.Extended
|
||||
( module DT
|
||||
, squote
|
||||
, dquote
|
||||
, paren
|
||||
, (<->)
|
||||
) where
|
||||
|
||||
import Hasura.Prelude
|
||||
|
||||
import Data.Text as DT
|
||||
|
||||
squote :: DT.Text -> DT.Text
|
||||
squote t = DT.singleton '\'' <> t <> DT.singleton '\''
|
||||
{-# INLINE squote #-}
|
||||
|
||||
dquote :: DT.Text -> DT.Text
|
||||
dquote t = DT.singleton '"' <> t <> DT.singleton '"'
|
||||
{-# INLINE dquote #-}
|
||||
|
||||
paren :: DT.Text -> DT.Text
|
||||
paren t = "(" <> t <> ")"
|
||||
{-# INLINE paren #-}
|
||||
|
||||
infixr 6 <->
|
||||
(<->) :: DT.Text -> DT.Text -> DT.Text
|
||||
(<->) l r = l <> DT.singleton ' ' <> r
|
||||
{-# INLINE (<->) #-}
|
||||
Reference in New Issue
Block a user