{-# OPTIONS_GHC -fno-warn-missing-fields #-}

-- | Literal, uninterpolated here docs
module Data.String.Here.Uninterpolated (here, hereFile, hereLit) where

import Language.Haskell.TH
import Language.Haskell.TH.Quote

import Data.String.Here.Internal

-- | Quote a here doc, stripping leading and trailing whitespace
here :: QuasiQuoter
here :: QuasiQuoter
here = QuasiQuoter {quoteExp :: String -> Q Exp
quoteExp = forall (m :: * -> *). Quote m => String -> m Exp
stringE forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String
trim}

-- | Quote a here doc literally, with no whitespace stripping
hereLit :: QuasiQuoter
hereLit :: QuasiQuoter
hereLit = QuasiQuoter {quoteExp :: String -> Q Exp
quoteExp = forall (m :: * -> *). Quote m => String -> m Exp
stringE}

-- | Splice a file's contents as a here doc
hereFile :: QuasiQuoter
hereFile :: QuasiQuoter
hereFile = QuasiQuoter -> QuasiQuoter
quoteDependentFile QuasiQuoter
hereLit