mirror of
https://github.com/sol/hpack.git
synced 2024-10-04 03:38:00 +03:00
hpack: A modern format for Haskell packages
driver | ||
src/Hpack | ||
test | ||
.ghci | ||
.gitignore | ||
.travis.yml | ||
hpack.cabal | ||
LICENSE | ||
package.yaml | ||
README.md | ||
Setup.lhs |
hpack: An alternative format for Haskell packages
Examples
- Given this package.yaml running
hpack
will generate hpack.cabal - Given this package.yaml running
hpack
will generate getopt-generics.cabal - Given this package.yaml running
hpack
will generate sensei.cabal - Given this package.yaml running
hpack
will generate base-orphans.cabal
Documentation
Documentation is mostly missing so far, sorry for that!
- Slides from my talk about
hpack
at the Singapore Haskell meetup: http://typeful.net/talks/hpack
File globbing
At place where you can specify a list of files you can also use glob patterns. Glob patters and ordinary file names can be freely mixed, e.g.:
extra-source-files:
- static/*.js
- static/site.css
Glob patterns are expanded according to the following rules:
?
and*
are expanded according to POSIX (they match arbitrary characters, except for directory separators)**
is expanded in azsh
-like fashion (matching across directory separators)?
,*
and**
do not match a.
at the beginning of a file/directory
Vim integration
To run hpack
automatically on modifications to package.yaml
add the
following to your ~/.vimrc
:
autocmd BufWritePost package.yaml silent !hpack --silent