rel8-internal-1.8.0.0: src/Rel8/Internal/Schema/Escape.hs
{-# language LambdaCase #-}
module Rel8.Internal.Schema.Escape
( escape
)
where
-- base
import Prelude
-- pretty
import Text.PrettyPrint (Doc, doubleQuotes, text)
escape :: String -> Doc
escape = doubleQuotes . text . concatMap go
where
go = \case
'"' -> "\"\""
c -> [c]