shqq-0.1: shqq.cabal
name: shqq
version: 0.1
license: BSD3
license-file: LICENSE
synopsis: Embed shell commands with interpolated Haskell variables, and capture output
category: System
author: Keegan McAllister <mcallister.keegan@gmail.com>
maintainer: Keegan McAllister <mcallister.keegan@gmail.com>
build-type: Simple
cabal-version: >=1.6
description:
This library provides a quasiquoter for executing shell commands, somewhat
similar to Perl's backtick operator. Shell commands are IO actions, and
they capture the command's standard output as a @String@ result.
.
You can use Haskell variables in a shell command. A string representation
of the contents will be interpolated. The shell will see each interpolated
variable as a single token without interpreting special characters, unless
you choose otherwise.
.
Note: The shell escaping is not correct for the Windows shell. This library
should fail to build on Windows, as well.
.
Examples of using this library are included in @examples/@.
extra-source-files:
README
, examples/dupe.hs
-- Our shell escaping is not correct on Windows. We make the project Unix-only
-- in two ways: the 'unix' dependency, and a CPP macro check in ShQQ.hs.
library
exposed-modules:
System.ShQQ
ghc-options: -Wall
build-depends:
base >= 3 && < 5
, template-haskell >= 2.3
, posix-escape >= 0.1
, parsec >= 3.1
, unix
-- NB: process-1.0 has a Unicode handling bug which makes shell escaping
-- ineffective, compromising security. See:
--
-- http://hackage.haskell.org/trac/ghc/ticket/4006
-- http://hackage.haskell.org/trac/ghc/ticket/1414
, process >= 1.1
other-extensions:
TemplateHaskell
, CPP
source-repository head
type: git
location: git://github.com/kmcallister/shqq