language-bash-0.11.1: Parsing and pretty-printing Bash shell scripts
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Bash.Word

Description

Bash words and substitutions.

Synopsis

Words

type Word = [Span] Source #

A Bash word, broken up into logical spans.

data Span Source #

An individual unit of a word.

Constructors

Char Char

A normal character.

Escape Char

An escaped character.

Single Word

A single-quoted string.

Double Word

A double-quoted string.

ANSIC Word

A ANSI C string.

Locale Word

A locale-translated string.

Backquote Word

A backquote-style command substitution. To extract the command string, unquote the word inside.

ParamSubst ParamSubst

A parameter substitution.

ArithSubst String

An arithmetic substitution.

CommandSubst String

A command substitution.

ProcessSubst ProcessSubstOp String

A process substitution.

Instances

Instances details
Data Span Source # 
Instance details

Defined in Language.Bash.Word

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Span -> c Span #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Span #

toConstr :: Span -> Constr #

dataTypeOf :: Span -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Span) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Span) #

gmapT :: (forall b. Data b => b -> b) -> Span -> Span #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Span -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Span -> r #

gmapQ :: (forall d. Data d => d -> u) -> Span -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Span -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Span -> m Span #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Span -> m Span #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Span -> m Span #

Generic Span Source # 
Instance details

Defined in Language.Bash.Word

Associated Types

type Rep Span :: Type -> Type #

Methods

from :: Span -> Rep Span x #

to :: Rep Span x -> Span #

Read Span Source # 
Instance details

Defined in Language.Bash.Word

Show Span Source # 
Instance details

Defined in Language.Bash.Word

Methods

showsPrec :: Int -> Span -> ShowS #

show :: Span -> String #

showList :: [Span] -> ShowS #

Eq Span Source # 
Instance details

Defined in Language.Bash.Word

Methods

(==) :: Span -> Span -> Bool #

(/=) :: Span -> Span -> Bool #

Pretty Span Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: Span -> Doc ann #

prettyList :: [Span] -> Doc ann #

Pretty [Word] Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: [Word] -> Doc ann #

prettyList :: [[Word]] -> Doc ann #

type Rep Span Source # 
Instance details

Defined in Language.Bash.Word

type Rep Span = D1 ('MetaData "Span" "Language.Bash.Word" "language-bash-0.11.1-inplace" 'False) (((C1 ('MetaCons "Char" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)) :+: C1 ('MetaCons "Escape" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char))) :+: (C1 ('MetaCons "Single" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :+: (C1 ('MetaCons "Double" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :+: C1 ('MetaCons "ANSIC" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))))) :+: ((C1 ('MetaCons "Locale" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :+: (C1 ('MetaCons "Backquote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :+: C1 ('MetaCons "ParamSubst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ParamSubst)))) :+: (C1 ('MetaCons "ArithSubst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: (C1 ('MetaCons "CommandSubst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "ProcessSubst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ProcessSubstOp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))))

Parameters

data Parameter Source #

A parameter name an optional subscript.

Constructors

Parameter String (Maybe Word) 

Instances

Instances details
Data Parameter Source # 
Instance details

Defined in Language.Bash.Word

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parameter -> c Parameter #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Parameter #

toConstr :: Parameter -> Constr #

dataTypeOf :: Parameter -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Parameter) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Parameter) #

gmapT :: (forall b. Data b => b -> b) -> Parameter -> Parameter #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parameter -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parameter -> r #

gmapQ :: (forall d. Data d => d -> u) -> Parameter -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Parameter -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parameter -> m Parameter #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parameter -> m Parameter #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parameter -> m Parameter #

Generic Parameter Source # 
Instance details

Defined in Language.Bash.Word

Associated Types

type Rep Parameter :: Type -> Type #

Read Parameter Source # 
Instance details

Defined in Language.Bash.Word

Show Parameter Source # 
Instance details

Defined in Language.Bash.Word

Eq Parameter Source # 
Instance details

Defined in Language.Bash.Word

Pretty Parameter Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: Parameter -> Doc ann #

prettyList :: [Parameter] -> Doc ann #

type Rep Parameter Source # 
Instance details

Defined in Language.Bash.Word

type Rep Parameter = D1 ('MetaData "Parameter" "Language.Bash.Word" "language-bash-0.11.1-inplace" 'False) (C1 ('MetaCons "Parameter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Word))))

data ParamSubst Source #

A parameter substitution.

Constructors

Bare 

Fields

Brace 

Fields

Alt 

Fields

Substring 

Fields

Prefix 

Fields

Indices 

Fields

Length 

Fields

Delete 

Fields

Replace 

Fields

LetterCase 

Fields

Instances

Instances details
Data ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParamSubst -> c ParamSubst #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ParamSubst #

toConstr :: ParamSubst -> Constr #

dataTypeOf :: ParamSubst -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ParamSubst) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ParamSubst) #

gmapT :: (forall b. Data b => b -> b) -> ParamSubst -> ParamSubst #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParamSubst -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParamSubst -> r #

gmapQ :: (forall d. Data d => d -> u) -> ParamSubst -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ParamSubst -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParamSubst -> m ParamSubst #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParamSubst -> m ParamSubst #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParamSubst -> m ParamSubst #

Generic ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

Associated Types

type Rep ParamSubst :: Type -> Type #

Read ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

Show ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

Eq ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

Pretty ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: ParamSubst -> Doc ann #

prettyList :: [ParamSubst] -> Doc ann #

type Rep ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

type Rep ParamSubst = D1 ('MetaData "ParamSubst" "Language.Bash.Word" "language-bash-0.11.1-inplace" 'False) (((C1 ('MetaCons "Bare" 'PrefixI 'True) (S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter)) :+: C1 ('MetaCons "Brace" 'PrefixI 'True) (S1 ('MetaSel ('Just "indirect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter))) :+: (C1 ('MetaCons "Alt" 'PrefixI 'True) ((S1 ('MetaSel ('Just "indirect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter)) :*: (S1 ('MetaSel ('Just "testNull") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "altOp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AltOp) :*: S1 ('MetaSel ('Just "altWord") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))) :+: (C1 ('MetaCons "Substring" 'PrefixI 'True) ((S1 ('MetaSel ('Just "indirect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter)) :*: (S1 ('MetaSel ('Just "subOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "subLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))) :+: C1 ('MetaCons "Prefix" 'PrefixI 'True) (S1 ('MetaSel ('Just "prefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "modifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char))))) :+: ((C1 ('MetaCons "Indices" 'PrefixI 'True) (S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter)) :+: C1 ('MetaCons "Length" 'PrefixI 'True) (S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter))) :+: (C1 ('MetaCons "Delete" 'PrefixI 'True) ((S1 ('MetaSel ('Just "indirect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter)) :*: (S1 ('MetaSel ('Just "longest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "deleteDirection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Direction) :*: S1 ('MetaSel ('Just "pattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))) :+: (C1 ('MetaCons "Replace" 'PrefixI 'True) ((S1 ('MetaSel ('Just "indirect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "replaceAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: (S1 ('MetaSel ('Just "replaceDirection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Direction)) :*: (S1 ('MetaSel ('Just "pattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "replacement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))) :+: C1 ('MetaCons "LetterCase" 'PrefixI 'True) ((S1 ('MetaSel ('Just "indirect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "parameter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Parameter)) :*: (S1 ('MetaSel ('Just "letterCaseOp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LetterCaseOp) :*: (S1 ('MetaSel ('Just "convertAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "pattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))))))))

data AltOp Source #

An alternation operator.

Constructors

AltDefault

-, :-

AltAssign

'=', :=

AltError

?, :?

AltReplace

+, :+

Instances

Instances details
Data AltOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AltOp -> c AltOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AltOp #

toConstr :: AltOp -> Constr #

dataTypeOf :: AltOp -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AltOp) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AltOp) #

gmapT :: (forall b. Data b => b -> b) -> AltOp -> AltOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AltOp -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AltOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> AltOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AltOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AltOp -> m AltOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AltOp -> m AltOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AltOp -> m AltOp #

Bounded AltOp Source # 
Instance details

Defined in Language.Bash.Word

Enum AltOp Source # 
Instance details

Defined in Language.Bash.Word

Generic AltOp Source # 
Instance details

Defined in Language.Bash.Word

Associated Types

type Rep AltOp :: Type -> Type #

Methods

from :: AltOp -> Rep AltOp x #

to :: Rep AltOp x -> AltOp #

Read AltOp Source # 
Instance details

Defined in Language.Bash.Word

Show AltOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

showsPrec :: Int -> AltOp -> ShowS #

show :: AltOp -> String #

showList :: [AltOp] -> ShowS #

Eq AltOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

(==) :: AltOp -> AltOp -> Bool #

(/=) :: AltOp -> AltOp -> Bool #

Ord AltOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

compare :: AltOp -> AltOp -> Ordering #

(<) :: AltOp -> AltOp -> Bool #

(<=) :: AltOp -> AltOp -> Bool #

(>) :: AltOp -> AltOp -> Bool #

(>=) :: AltOp -> AltOp -> Bool #

max :: AltOp -> AltOp -> AltOp #

min :: AltOp -> AltOp -> AltOp #

Pretty AltOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: AltOp -> Doc ann #

prettyList :: [AltOp] -> Doc ann #

type Rep AltOp Source # 
Instance details

Defined in Language.Bash.Word

type Rep AltOp = D1 ('MetaData "AltOp" "Language.Bash.Word" "language-bash-0.11.1-inplace" 'False) ((C1 ('MetaCons "AltDefault" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AltAssign" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AltError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AltReplace" 'PrefixI 'False) (U1 :: Type -> Type)))

data LetterCaseOp Source #

A letter case operator.

Constructors

ToLower 
ToUpper 

Instances

Instances details
Data LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LetterCaseOp -> c LetterCaseOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LetterCaseOp #

toConstr :: LetterCaseOp -> Constr #

dataTypeOf :: LetterCaseOp -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LetterCaseOp) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LetterCaseOp) #

gmapT :: (forall b. Data b => b -> b) -> LetterCaseOp -> LetterCaseOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LetterCaseOp -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LetterCaseOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> LetterCaseOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LetterCaseOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LetterCaseOp -> m LetterCaseOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LetterCaseOp -> m LetterCaseOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LetterCaseOp -> m LetterCaseOp #

Bounded LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Enum LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Generic LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Associated Types

type Rep LetterCaseOp :: Type -> Type #

Read LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Show LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Eq LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Ord LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Pretty LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: LetterCaseOp -> Doc ann #

prettyList :: [LetterCaseOp] -> Doc ann #

type Rep LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

type Rep LetterCaseOp = D1 ('MetaData "LetterCaseOp" "Language.Bash.Word" "language-bash-0.11.1-inplace" 'False) (C1 ('MetaCons "ToLower" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ToUpper" 'PrefixI 'False) (U1 :: Type -> Type))

data Direction Source #

A string direction.

Constructors

Front 
Back 

Instances

Instances details
Data Direction Source # 
Instance details

Defined in Language.Bash.Word

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Direction -> c Direction #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Direction #

toConstr :: Direction -> Constr #

dataTypeOf :: Direction -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Direction) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Direction) #

gmapT :: (forall b. Data b => b -> b) -> Direction -> Direction #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Direction -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Direction -> r #

gmapQ :: (forall d. Data d => d -> u) -> Direction -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Direction -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Direction -> m Direction #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Direction -> m Direction #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Direction -> m Direction #

Bounded Direction Source # 
Instance details

Defined in Language.Bash.Word

Enum Direction Source # 
Instance details

Defined in Language.Bash.Word

Generic Direction Source # 
Instance details

Defined in Language.Bash.Word

Associated Types

type Rep Direction :: Type -> Type #

Read Direction Source # 
Instance details

Defined in Language.Bash.Word

Show Direction Source # 
Instance details

Defined in Language.Bash.Word

Eq Direction Source # 
Instance details

Defined in Language.Bash.Word

Ord Direction Source # 
Instance details

Defined in Language.Bash.Word

Pretty Direction Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: Direction -> Doc ann #

prettyList :: [Direction] -> Doc ann #

type Rep Direction Source # 
Instance details

Defined in Language.Bash.Word

type Rep Direction = D1 ('MetaData "Direction" "Language.Bash.Word" "language-bash-0.11.1-inplace" 'False) (C1 ('MetaCons "Front" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Back" 'PrefixI 'False) (U1 :: Type -> Type))

Process

data ProcessSubstOp Source #

A process substitution.

Constructors

ProcessIn
<
ProcessOut
>

Instances

Instances details
Data ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ProcessSubstOp -> c ProcessSubstOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ProcessSubstOp #

toConstr :: ProcessSubstOp -> Constr #

dataTypeOf :: ProcessSubstOp -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ProcessSubstOp) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProcessSubstOp) #

gmapT :: (forall b. Data b => b -> b) -> ProcessSubstOp -> ProcessSubstOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ProcessSubstOp -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ProcessSubstOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> ProcessSubstOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ProcessSubstOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ProcessSubstOp -> m ProcessSubstOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ProcessSubstOp -> m ProcessSubstOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ProcessSubstOp -> m ProcessSubstOp #

Bounded ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Enum ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Generic ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Associated Types

type Rep ProcessSubstOp :: Type -> Type #

Read ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Show ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Eq ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Ord ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Pretty ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Methods

pretty :: ProcessSubstOp -> Doc ann #

prettyList :: [ProcessSubstOp] -> Doc ann #

type Rep ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

type Rep ProcessSubstOp = D1 ('MetaData "ProcessSubstOp" "Language.Bash.Word" "language-bash-0.11.1-inplace" 'False) (C1 ('MetaCons "ProcessIn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ProcessOut" 'PrefixI 'False) (U1 :: Type -> Type))

Manipulation

stringToWord :: String -> Word Source #

Convert a string to an unquoted word.

wordToString :: Word -> Maybe String Source #

If a word is a plain, unquoted string (e.g. the result of stringToWord), returns Just that string; otherwise, returns Nothing.

unquote :: Word -> String Source #

Remove all quoting characters from a word.