| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sun, 18 Jan 2026 07:37:09 GMT
X-Served-By: cache-dfw-kdfw8210154-DFW, cache-bom-vanm7210086-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768721829.750978,VS0,VE797
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
hgrep: Search Haskell source code from the command line
hgrep: Search Haskell source code from the command line
Modules
[Index]
Downloads
- hgrep-0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.0, 0.1 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | ansi-terminal (>=0.6.3 && <0.8), base (>=4.9 && <4.11), bytestring (>=0.10.4 && <0.12), ghc (>=7.10.2 && <8.3), ghc-exactprint (>=0.5.4.0 && <0.6), hgrep, hscolour (>=1.24 && <1.25), lens (>=4.15 && <4.16), optparse-applicative (>=0.13 && <0.15), pcre-heavy (>=1.0 && <1.1), template-haskell (>=2.11 && <2.13) [details] |
| Tested with | ghc ==8.0.1, ghc ==8.0.2, ghc ==8.2.1 |
| License | BSD-3-Clause |
| Author | Tim Humphries |
| Maintainer | tim@utf8.me |
| Uploaded | by TimHumphries at 2017-10-04T10:40:20Z |
| Category | Language |
| Home page | https://github.com/thumphries/hgrep |
| Bug tracker | https://github.com/thumphries/hgrep |
| Source repo | head: git clone git://github.com/thumphries/hgrep.git |
| Distributions | |
| Executables | hgrep |
| Downloads | 1523 total (5 in the last 30 days) |
| Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2017-10-04 [all 1 reports] |
Readme for hgrep-0.1
[back to package description]hgrep
Search Haskell source code from the command line.
Powered by ghc-exactprint.
Usage
$> hgrep
Usage: hgrep [-e|--regex] EXPRESSION [FILE]
hgrep requires an expression and a set of files to search across.
An expression can be one of
- The name of a type, e.g.
FooBar - The name of an expression, e.g.
foo - A regular expression (via the
-eflag), e.g.-e Foo$
Each file will be parsed and searched. Results will be printed to the console, with syntax highlighting where possible.
Searching for top-level expressions
$> hgrep main main/hgrep.hs
main/hgrep.hs:16:1-13
-- | Run the program.
main :: IO ()
main/hgrep.hs:(17,1)-(18:27)
main = do
putStrLn "Hello, world!"
Searching for type declarations
$> hgrep PrintOpts src/**/*.hs
src/Language/Haskell/HGrep/Internal/Data.hs:(40,1)-(42,28)
data PrintOpts = PrintOpts {
poColourOpts :: ColourOpts
} deriving (Eq, Ord, Show)
Searching with a regular expression
$> hgrep -e 'Opts$' src/**/*.hs
src/Language/Haskell/HGrep/Internal/Data.hs:(57,1)-(59,28)
data PrintOpts = PrintOpts {
poColourOpts :: ColourOpts
} deriving (Eq, Ord, Show)
src/Language/Haskell/HGrep/Internal/Data.hs:(61,1)-(64,26)
defaultPrintOpts :: PrintOpts
src/Language/Haskell/HGrep/Internal/Data.hs:(67,1)-(70,5)
defaultPrintOpts =
PrintOpts {
poColourOpts = DefaultColours
}