mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
6e95f761f5
GitOrigin-RevId: e0b197a0fd1e259d43e6152b726b350c4d527a4b
18 lines
463 B
Haskell
18 lines
463 B
Haskell
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
|