-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Quasiquoters for external commands -- -- Features: -- -- -- --
--   >>> [sh_| echo hello world! |]
--   hello world!
--   
-- -- -- --
--   ghci = quoter $ callCommand "ghc" ["-ignore-dot-ghci", "-e"]
--   
-- -- Then you can use ghci in ghci! -- --
--   >>> [ghci| putStrLn "hello world!" |] :: IO ()
--   hello world!
--   
-- -- For more examples, see System.Command.QQ.Predef -- -- -- -- See README.md for an example -- -- -- -- See examples/CommandT.hs @package command-qq @version 0.3.1.0 -- | Haskell values embedding module System.Command.QQ.Embed -- | Embed haskell values into external commands -- -- I recommend using -XExtendedDefaultRules for modules where -- you want to embed values, it would save for annoying type annotations -- for numeric literals -- --
--   embed . embed = embed
--   
class Embed a embed :: Embed a => a -> String embed :: (Embed a, Show a) => a -> String instance System.Command.QQ.Embed.Embed GHC.Integer.Type.Integer instance System.Command.QQ.Embed.Embed GHC.Types.Int instance System.Command.QQ.Embed.Embed GHC.Int.Int8 instance System.Command.QQ.Embed.Embed GHC.Int.Int16 instance System.Command.QQ.Embed.Embed GHC.Int.Int32 instance System.Command.QQ.Embed.Embed GHC.Int.Int64 instance System.Command.QQ.Embed.Embed GHC.Types.Word instance System.Command.QQ.Embed.Embed GHC.Word.Word8 instance System.Command.QQ.Embed.Embed GHC.Word.Word16 instance System.Command.QQ.Embed.Embed GHC.Word.Word32 instance System.Command.QQ.Embed.Embed GHC.Word.Word64 instance System.Command.QQ.Embed.Embed GHC.Types.Float instance System.Command.QQ.Embed.Embed GHC.Types.Double instance System.Command.QQ.Embed.Embed Foreign.C.Types.CChar instance System.Command.QQ.Embed.Embed Foreign.C.Types.CSChar instance System.Command.QQ.Embed.Embed Foreign.C.Types.CUChar instance System.Command.QQ.Embed.Embed Foreign.C.Types.CShort instance System.Command.QQ.Embed.Embed Foreign.C.Types.CUShort instance System.Command.QQ.Embed.Embed Foreign.C.Types.CInt instance System.Command.QQ.Embed.Embed Foreign.C.Types.CUInt instance System.Command.QQ.Embed.Embed Foreign.C.Types.CLong instance System.Command.QQ.Embed.Embed Foreign.C.Types.CULong instance System.Command.QQ.Embed.Embed Foreign.C.Types.CSize instance System.Command.QQ.Embed.Embed Foreign.C.Types.CLLong instance System.Command.QQ.Embed.Embed Foreign.C.Types.CULLong instance System.Command.QQ.Embed.Embed Foreign.C.Types.CFloat instance System.Command.QQ.Embed.Embed Foreign.C.Types.CDouble instance (a Data.Type.Equality.~ GHC.Integer.Type.Integer) => System.Command.QQ.Embed.Embed (GHC.Real.Ratio a) instance System.Command.QQ.Embed.Embed GHC.Types.Char instance System.Command.QQ.Embed.Embed GHC.Base.String instance System.Command.QQ.Embed.Embed Data.Text.Internal.Text instance System.Command.QQ.Embed.Embed Data.Text.Internal.Lazy.Text -- | Evalute passed arguments with external interpreter module System.Command.QQ.Eval -- | Different interesting return types for quasiquoters -- -- Instances here mostly resemble the types of things in -- System.Process class Eval r eval :: Eval r => String -> [String] -> r instance System.Command.QQ.Eval.Eval (GHC.Types.IO ()) instance System.Command.QQ.Eval.Eval (GHC.Types.IO GHC.IO.Exception.ExitCode) instance System.Command.QQ.Eval.Eval (GHC.Types.IO Data.Text.Internal.Lazy.Text) instance System.Command.QQ.Eval.Eval (GHC.Types.IO GHC.Base.String) instance (s Data.Type.Equality.~ GHC.IO.Exception.ExitCode, o Data.Type.Equality.~ Data.Text.Internal.Lazy.Text, e Data.Type.Equality.~ Data.Text.Internal.Lazy.Text) => System.Command.QQ.Eval.Eval (GHC.Types.IO (s, o, e)) instance (i Data.Type.Equality.~ Data.Text.Internal.Lazy.Text, o Data.Type.Equality.~ (GHC.IO.Exception.ExitCode, Data.Text.Internal.Lazy.Text, Data.Text.Internal.Lazy.Text)) => System.Command.QQ.Eval.Eval (i -> GHC.Types.IO o) -- | Quasiquoters for external commands module System.Command.QQ -- | Simple quasiquoter for the default shell -- -- sh analog that always constructs an action of type IO -- () and so can always be used without type annotations -- --
--   >>> [sh_|echo "hello, world!"|]
--   hello, world!
--   
sh_ :: QuasiQuoter -- | Quasiquoter for the default shell -- -- Constructs polymorphic action of type Eval a => a from -- passed string. -- -- Uses SHELL environment variable as path to shell executable -- or /bin/sh if it is unset. -- --
--   >>> [sh|echo "hello, world!"|] :: IO ExitCode
--   ExitSuccess
--   
--   >>> [sh|echo "hello, world!"|] :: IO Text
--   "hello, world!\n"
--   
-- -- Haskell values can be embedded with Ruby-like syntax: -- --
--   >>> let apples = 7
--   
--   >>> [sh|echo "#{apples} apples!"|] :: IO Text
--   "7 apples!\n"
--   
sh :: QuasiQuoter -- | Shell's quasiquoter constructor -- -- "Shell" here means executable that has the following API: -- --
--   <SHELL> -c <COMMAND>
--   
-- -- e.g. sh, bash, zsh, ksh, -- tcsh, python, etc shell :: FilePath -> QuasiQuoter -- | Interpreter's quasiquoter constructor -- -- "Interpreter" here means executable that has the following API: -- --
--   <INTERPRETER> -e <COMMAND>
--   
-- -- e.g. perl, ruby, ghc, etc interpreter :: FilePath -> QuasiQuoter -- | Construct quasiquoter from function taking the string and producing -- Haskell expression. -- -- Other kinds of quasiquoters (patterns, types or declarations -- quasiquoters) will fail at compile time quoter :: (String -> Q Exp) -> QuasiQuoter -- | Construct Haskell expression for external command call callCommand :: FilePath -> [String] -> String -> Q Exp -- | Construct Haskell expression from the string, substituting variables -- for their values. Variable expansion uses a ruby-like syntax substituteVars :: String -> Q Exp -- | Some predefined quasiquoters module System.Command.QQ.Predef -- | bash shell bash :: QuasiQuoter -- | zsh shell zsh :: QuasiQuoter -- | awk interpreter awk :: QuasiQuoter -- | ghci interpreter ghci :: QuasiQuoter -- | perl interpreter perl :: QuasiQuoter -- | ruby interpreter ruby :: QuasiQuoter -- | python interpreter python :: QuasiQuoter -- | python2 interpreter python2 :: QuasiQuoter -- | python3 interpreter python3 :: QuasiQuoter