úÎ/Q-¶ None,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 4Different interesting return types for quasiquoters 6Instances here mostly resemble the types of things in System.Process "Quasiquoter for the default shell "default" here means it uses value of SHELL environment variable  or /bin/sh if it is not set. [sh|echo "hi!"|] :: IO ExitCodehi! ExitSuccess[sh|echo "hi!"|] :: IO String"hi!\n"6Haskell values can be embedded with Ruby-like syntax: let apples = 7+[sh|echo "#{apples} apples!"|] :: IO String "7 apples!\n"(Works only for expressions (obviously): return 3 :: IO [sh|blah|]<interactive>:116:16:3 Exception when trying to run compile-time code:6 this quasiquoter does not support splicing types Code: quoteType sh "blah"!Shell commands quasiquoter maker "Shell"? here means something that implements the following interface:    <SHELL> -c <COMMAND> e.g. sh, bash, zsh, ksh, tcsh, python, etc Everything that applies to  applies to  'Interpreter commands quasiquoter maker " Interpreter"? here means something that implements the following interface:    < INTERPRETER> -e <COMMAND> e.g. perl, ruby, ghc, etc Everything that applies to  applies to  6Construct quasiquoter from function taking the string # and producing Haskell expression. 0Other kinds of quasiquoters (patterns, types or 6 declarations quasiquoters) will fail in compile time 7Construct Haskell expression for external command call &Parse references to Haskell variables  embed "hi""hi"  embed 'c'"c"  embed 4.0"4.0"embed (7 :: Double)"7.0" embed (7 :: Float)"7.0"embed (7 :: Int)"7"embed 4"4"embed (7 :: Integer)"7"9Return exit code, stdout, and stderr of external process ! and consume stdin from supplied  ?[sh|while read line; do echo ${#line}; done|] "hello\nworld!\n"(ExitSuccess,"5\n6\n","")9Return exit code, stdout, and stderr of external process S[sh|echo hello world; echo bye world >&2; exit 1|] :: IO (ExitCode, String, String)-(ExitFailure 1,"hello world\n","bye world\n")'Return only stdout of external process *Does not care if external process failed. #[sh|echo hello world|] :: IO String"hello world\n"-[sh|echo hello world; return 1|] :: IO String"hello world\n"*Return only exit code of external process %[sh|echo hello world|] :: IO ExitCode hello world ExitSuccessh|exit 1|] :: IO ExitCode ExitFailure 1NMost basic instance: nothing is known about what happened in external command [sh|echo hello world|] :: IO () hello world Command path 9Arguments that go to command before quasiquoter contents Quasiquoter contents          !"#command-qq-0.1.0.0System.Command.QQEmbedembedEvalevalshshell interpreterquoter callCommand string2exp $fEmbed[] $fEmbedChar $fEmbedDouble $fEmbedFloat $fEmbedInt$fEmbedInteger $fEval(->)baseGHC.BaseString$fEvalIO $fEvalIO0 $fEvalIO1 $fEvalIO2 $fEmbedWord64 $fEmbedWord32 $fEmbedWord16 $fEmbedWord8 $fEmbedWord $fEmbedInt64 $fEmbedInt32 $fEmbedInt16 $fEmbedInt8