I decided to make it because nothing like the
globDir function, my main use case at the time, already existed. There were/are some libraries that provide globbing functionality, but nothing with as complete a feature set.
The pattern syntax is based on a subset of Zsh’s.
It tries to optimize the given pattern and should be noticeably faster than a naïve character-by-character matcher—something I was using before I decided to do this properly. I haven’t benchmarked it (yet, at least), though.
A bunch of tests are included with the package: as usual, feel free to contribute and/or complain.
Assuming you have the
cabal-install tool installed and working, the easiest way to obtain Glob is with the
cabal install glob command.
Otherwise, you can download the source from Hackage, where you can also browse the documentation.
As a last resort, the source package for the latest version, 0.7.2, is also available here:
A changelog is also available for your reading pleasure:
The full list of dependencies, as listed in the
.cabal file, is as follows:
base >= 4 && < 5
containers < 0.6
directory < 1.3
dlist >= 0.4 && < 0.6
filepath >= 1.1 && < 1.4
transformers >= 0.2 && < 0.4
Win32 == 2.*, for Windows operating systems
These should all be found in any reasonably up-to-date Haskell distribution.