command-qq: Quasiquoters for external commands

[ bsd2, library, system ] [ Propose Tags ]


  • Quasiquotation syntax for external commands:

[sh| echo hello world! |]
  • Easy way to define custom quasiquoters (see examples/CustomQQ.hs)

ghci = QQ.quoter $ QQ.callCommand "ghc" ["-ignore-dot-ghci", "-e"]
  • Can embed Haskell variables in scripts

class Embed a where
  embed :: a -> String

instance Embed String
  embed = id

main :: IO ()
main = let excl = replicate 3 '!' in -- I'd love to show an example but haddock markup fails here
  • Can embed quasiquoters in DSLs (see examples/CommandT.hs)

class Eval r where
  eval :: String -> [String] -> r

instance Eval (IO ExitCode) where
  eval command args = System.Process.rawSystem command args




Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS],,,,,
Dependencies base (>=4 && <5), process, template-haskell, unix [details]
License BSD-3-Clause
Author Matvey Aksenov
Category System
Home page
Source repo head: git clone
Uploaded by MatveyAksenov at 2013-08-22T08:51:34Z
Distributions NixOS:
Downloads 5509 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]