    {-# LANGUAGE TemplateHaskell #-}
    module Data.String.Interpolate.IsString (i) where

    import           Data.String
    import           Language.Haskell.TH.Quote (QuasiQuoter(..))

    import qualified Data.String.Interpolate as I

    -- |
    -- Like `I.i`, but constructs a value of type
    --
    -- > IsString a => a
    i :: QuasiQuoter
    i :: QuasiQuoter
    i = QuasiQuoter {
        quoteExp :: String -> Q Exp
    quoteExp = \String
    s -> [|fromString $(QuasiQuoter -> String -> Q Exp
    quoteExp QuasiQuoter
    I.i (String -> Q Exp) -> String -> Q Exp
    forall a b. (a -> b) -> a -> b
    $ String
    s)|]
      , quotePat :: String -> Q Pat
    quotePat = String -> String -> Q Pat
    forall {a}. String -> a
    err String
    "pattern"
      , quoteType :: String -> Q Type
    quoteType = String -> String -> Q Type
    forall {a}. String -> a
    err String
    "type"
      , quoteDec :: String -> Q [Dec]
    quoteDec = String -> String -> Q [Dec]
    forall {a}. String -> a
    err String
    "declaration"
      }
      where
        err :: String -> a
    err String
    name = String -> a
    forall a. HasCallStack => String -> a
    error (String
    "Data.String.Interpolate.IsString.i: This QuasiQuoter can not be used as a " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    name String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    "!")