command-qq: Quasiquoters for external commands

[ bsd2, library, system ] [ Propose Tags ]

Features:

  • 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

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.2.0.0, 0.2.1.0, 0.2.2.0, 0.3.0.0, 0.3.1.0
Dependencies base (>=4 && <5), process, template-haskell, unix [details]
License BSD-3-Clause
Author Matvey Aksenov
Maintainer matvey.aksenov@gmail.com
Category System
Home page http://biegunka.github.io/command-qq/
Source repo head: git clone https://github.com/biegunka/command-qq
Uploaded by MatveyAksenov at 2013-08-22T08:51:34Z
Distributions NixOS:0.3.1.0
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]