Safe Haskell | None |
---|---|
Language | Haskell2010 |
Highlight.Common.Options
Synopsis
- data IgnoreCase
- class HasIgnoreCase r where
- ignoreCaseParser :: Parser IgnoreCase
- data Recursive
- class HasRecursive r where
- recursiveLens :: Lens' r Recursive
- recursiveParser :: Parser Recursive
- newtype RawRegex = RawRegex {
- unRawRegex :: String
- class HasRawRegex r where
- rawRegexLens :: Lens' r RawRegex
- rawRegexParser :: Parser RawRegex
- newtype InputFilename = InputFilename {}
- class HasInputFilenames r where
- inputFilenamesLens :: Lens' r [InputFilename]
- inputFilenamesParser :: Parser [InputFilename]
- data CommonOptions = CommonOptions {}
- class HasCommonOptions r where
- commonOptionsParser :: Parser CommonOptions
- defaultCommonOptions :: CommonOptions
Documentation
data IgnoreCase Source #
Whether or not the case of a regular expression should be ignored.
Similar to grep
's --ignore-case
option.
Constructors
IgnoreCase | |
DoNotIgnoreCase |
Instances
Eq IgnoreCase Source # | |
Defined in Highlight.Common.Options | |
Read IgnoreCase Source # | |
Defined in Highlight.Common.Options Methods readsPrec :: Int -> ReadS IgnoreCase # readList :: ReadS [IgnoreCase] # readPrec :: ReadPrec IgnoreCase # readListPrec :: ReadPrec [IgnoreCase] # | |
Show IgnoreCase Source # | |
Defined in Highlight.Common.Options Methods showsPrec :: Int -> IgnoreCase -> ShowS # show :: IgnoreCase -> String # showList :: [IgnoreCase] -> ShowS # |
class HasIgnoreCase r where Source #
Minimal complete definition
Nothing
Methods
ignoreCaseLens :: Lens' r IgnoreCase Source #
default ignoreCaseLens :: HasCommonOptions r => Lens' r IgnoreCase Source #
Instances
HasIgnoreCase CommonOptions Source # | |
Defined in Highlight.Common.Options Methods | |
HasIgnoreCase Options Source # | |
Defined in Highlight.Highlight.Options Methods |
Whether or not files should be searched recursively. Similar to grep
's
--recursive
option.
Constructors
Recursive | |
NotRecursive |
class HasRecursive r where Source #
Minimal complete definition
Nothing
Methods
recursiveLens :: Lens' r Recursive Source #
default recursiveLens :: HasCommonOptions r => Lens' r Recursive Source #
Instances
HasRecursive CommonOptions Source # | |
Defined in Highlight.Common.Options Methods | |
HasRecursive Options Source # | |
Defined in Highlight.Highlight.Options |
The raw, pre-compiled regular expression passed in on the command line by the user.
Constructors
RawRegex | |
Fields
|
class HasRawRegex r where Source #
Minimal complete definition
Nothing
Methods
rawRegexLens :: Lens' r RawRegex Source #
default rawRegexLens :: HasCommonOptions r => Lens' r RawRegex Source #
Instances
HasRawRegex CommonOptions Source # | |
Defined in Highlight.Common.Options Methods | |
HasRawRegex Options Source # | |
Defined in Highlight.Highlight.Options |
newtype InputFilename Source #
An input file passed in on the command line by the user.
Constructors
InputFilename | |
Fields |
Instances
Eq InputFilename Source # | |
Defined in Highlight.Common.Options Methods (==) :: InputFilename -> InputFilename -> Bool # (/=) :: InputFilename -> InputFilename -> Bool # | |
Read InputFilename Source # | |
Defined in Highlight.Common.Options Methods readsPrec :: Int -> ReadS InputFilename # readList :: ReadS [InputFilename] # | |
Show InputFilename Source # | |
Defined in Highlight.Common.Options Methods showsPrec :: Int -> InputFilename -> ShowS # show :: InputFilename -> String # showList :: [InputFilename] -> ShowS # | |
IsString InputFilename Source # | |
Defined in Highlight.Common.Options Methods fromString :: String -> InputFilename # |
class HasInputFilenames r where Source #
Minimal complete definition
Nothing
Methods
inputFilenamesLens :: Lens' r [InputFilename] Source #
default inputFilenamesLens :: HasCommonOptions r => Lens' r [InputFilename] Source #
Instances
HasInputFilenames CommonOptions Source # | |
Defined in Highlight.Common.Options Methods inputFilenamesLens :: Lens' CommonOptions [InputFilename] Source # | |
HasInputFilenames Options Source # | |
Defined in Highlight.Highlight.Options Methods inputFilenamesLens :: Lens' Options [InputFilename] Source # |
data CommonOptions Source #
A set of options that are common to both the highlight
and hrep
applications.
Constructors
CommonOptions | |
Instances
class HasCommonOptions r where Source #
Methods
Instances
HasCommonOptions CommonOptions Source # | |
Defined in Highlight.Common.Options Methods commonOptionsLens :: Lens' CommonOptions CommonOptions Source # | |
HasCommonOptions Options Source # | |
Defined in Highlight.Highlight.Options Methods |
defaultCommonOptions :: CommonOptions Source #
A default set of CommonOptions
. Defined as the following:
>>>
:{
let opts = CommonOptions { commonOptionsIgnoreCase = DoNotIgnoreCase , commonOptionsRecursive = NotRecursive , commonOptionsRawRegex = RawRegex { unRawRegex = "" } , commonOptionsInputFilenames = [] } :}
>>>
opts == defaultCommonOptions
True