shell-monad-0.6.2: shell monad

Safe HaskellNone
LanguageHaskell98

Control.Monad.Shell.Quote

Description

Shell quoting

Synopsis

Documentation

newtype Quoted a Source

A value that is safely quoted so that it can be exposed to the shell.

While the constructor is exposed, you should avoid directly constucting Quoted values. Instead, use quote.

Constructors

Q 

Fields

getQ :: a
 

Instances

Eq a => Eq (Quoted a) 
Ord a => Ord (Quoted a) 
Show a => Show (Quoted a) 
Monoid a => Monoid (Quoted a) 
Param (Quoted Text)

Quoted Text arguments are passed as-is.

class Quotable t where Source

Quotes a value to allow it to be safely exposed to the shell.

The method used is to replace ' with '"'"' and wrap the value inside single quotes. This works for POSIX shells, as well as other shells like csh.

Methods

quote :: t -> Quoted Text Source

newtype Val v Source

An arbitrary value.

Constructors

Val v 

Instances