-- 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.0.0 -- | 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 (i ~ Text, o ~ (ExitCode, Text, Text)) => Eval (i -> IO o) instance (s ~ ExitCode, o ~ Text, e ~ Text) => Eval (IO (s, o, e)) instance Eval (IO String) instance Eval (IO Text) instance Eval (IO ExitCode) instance Eval (IO ()) -- | 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 where embed = show embed :: Embed a => a -> String instance Embed Text instance Embed Text instance Embed String instance Embed Char instance a ~ Integer => Embed (Ratio a) instance Embed CDouble instance Embed CFloat instance Embed CULLong instance Embed CLLong instance Embed CSize instance Embed CULong instance Embed CLong instance Embed CUInt instance Embed CInt instance Embed CUShort instance Embed CShort instance Embed CUChar instance Embed CSChar instance Embed CChar instance Embed Double instance Embed Float instance Embed Word64 instance Embed Word32 instance Embed Word16 instance Embed Word8 instance Embed Word instance Embed Int64 instance Embed Int32 instance Embed Int16 instance Embed Int8 instance Embed Int instance Embed Integer -- | 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