graphql-engine/server/src-test/Data/Text/RawString.hs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
443 B
Haskell
Raw Normal View History

module Data.Text.RawString (raw) where
import Hasura.Prelude
import Language.Haskell.TH
import Language.Haskell.TH.Quote
raw :: QuasiQuoter
raw =
QuasiQuoter
{ quoteExp = pure . LitE . StringL,
quotePat = const $ failWith "pattern",
quoteType = const $ failWith "type",
quoteDec = const $ failWith "declaration"
}
where
failWith t = fail $ "illegal raw string quote location; expected expresion, got " <> t