Distribution.Simple.Glob.Internal

Cabal-3.16.0.0: A framework for packaging Haskell software

Copyright | Isaac Jones Simon Marlow 2003-2004
License | BSD3 portions Copyright (c) 2007, Galois Inc.
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | None
Language | Haskell2010

Distribution.Simple.Glob.Internal

Description

Internal module for simple file globbing. Please import Distribution.Simple.Glob instead.

Synopsis

- data Glob
  - = GlobDir !GlobPieces !Glob
  - | GlobDirRecursive !GlobPieces
  - | GlobFile !GlobPieces
  - | GlobDirTrailing
- type GlobPieces = [GlobPiece]
- data GlobPiece
  - = WildCard
  - | Literal String
  - | Union [GlobPieces]
- dispGlobPieces :: GlobPieces -> Doc
- isGlobEscapedChar :: Char -> Bool

# Documentation

data Glob Source #

A filepath specified by globbing.

Constructors

GlobDir !GlobPieces !Glob |
    dirGlob/glob
GlobDirRecursive !GlobPieces | `**/glob`, where `**` denotes recursively traversing all directories and matching filenames on glob.
GlobFile !GlobPieces | A file glob.
GlobDirTrailing | Trailing dir; a glob ending in `/`.

#### Instances

Instances details

Parsec Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods parsec :: CabalParsing m => m Glob Source #
Pretty Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods pretty :: Glob -> Doc Source # prettyVersioned :: CabalSpecVersion -> Glob -> Doc Source #
Structured Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods structure :: Proxy Glob -> Structure Source # structureHash' :: Tagged Glob MD5
Binary Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods put :: Glob -> Put # get :: Get Glob # putList :: [Glob] -> Put #
Eq Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods (==) :: Glob -> Glob -> Bool # (/=) :: Glob -> Glob -> Bool #
Generic Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Associated Types
type Rep Glob |
Instance details Defined in Distribution.Simple.Glob.Internal type Rep Glob = D1 ('MetaData "Glob" "Distribution.Simple.Glob.Internal" "Cabal-3.16.0.0-558c" 'False) ((C1 ('MetaCons "GlobDir" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Glob)) :+: C1 ('MetaCons "GlobDirRecursive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces))) :+: (C1 ('MetaCons "GlobFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces)) :+: C1 ('MetaCons "GlobDirTrailing" 'PrefixI 'False) (U1 :: Type -> Type)))
Methods from :: Glob -> Rep Glob x # to :: Rep Glob x -> Glob #
Show Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods showsPrec :: Int -> Glob -> ShowS # show :: Glob -> String # showList :: [Glob] -> ShowS #
type Rep Glob Source # |
Instance details Defined in Distribution.Simple.Glob.Internal type Rep Glob = D1 ('MetaData "Glob" "Distribution.Simple.Glob.Internal" "Cabal-3.16.0.0-558c" 'False) ((C1 ('MetaCons "GlobDir" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Glob)) :+: C1 ('MetaCons "GlobDirRecursive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces))) :+: (C1 ('MetaCons "GlobFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces)) :+: C1 ('MetaCons "GlobDirTrailing" 'PrefixI 'False) (U1 :: Type -> Type)))

type GlobPieces = [GlobPiece] Source #

A single directory or file component of a globbed path

data GlobPiece Source #

A piece of a globbing pattern

Constructors

WildCard | A wildcard `*`
Literal String | A literal string `dirABC`
Union [GlobPieces] | A union of patterns, e.g. `dir{a,*.txt,c}...`

#### Instances

Instances details

Structured GlobPiece Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods structure :: Proxy GlobPiece -> Structure Source # structureHash' :: Tagged GlobPiece MD5
Binary GlobPiece Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods put :: GlobPiece -> Put # get :: Get GlobPiece # putList :: [GlobPiece] -> Put #
Eq GlobPiece Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods (==) :: GlobPiece -> GlobPiece -> Bool # (/=) :: GlobPiece -> GlobPiece -> Bool #
Generic GlobPiece Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Associated Types
type Rep GlobPiece |
Instance details Defined in Distribution.Simple.Glob.Internal type Rep GlobPiece = D1 ('MetaData "GlobPiece" "Distribution.Simple.Glob.Internal" "Cabal-3.16.0.0-558c" 'False) (C1 ('MetaCons "WildCard" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "Union" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GlobPieces]))))
Methods from :: GlobPiece -> Rep GlobPiece x # to :: Rep GlobPiece x -> GlobPiece #
Show GlobPiece Source # |
Instance details Defined in Distribution.Simple.Glob.Internal Methods showsPrec :: Int -> GlobPiece -> ShowS # show :: GlobPiece -> String # showList :: [GlobPiece] -> ShowS #
type Rep GlobPiece Source # |
Instance details Defined in Distribution.Simple.Glob.Internal type Rep GlobPiece = D1 ('MetaData "GlobPiece" "Distribution.Simple.Glob.Internal" "Cabal-3.16.0.0-558c" 'False) (C1 ('MetaCons "WildCard" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "Union" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GlobPieces]))))

dispGlobPieces :: GlobPieces -> Doc Source #

isGlobEscapedChar :: Char -> Bool Source #