2020-04-24 03:48:49 +03:00
|
|
|
|
# implicit-hie
|
2020-05-01 03:59:13 +03:00
|
|
|
|
```bash
|
|
|
|
|
cd your-stack-or-cabal-package
|
2020-05-09 06:08:30 +03:00
|
|
|
|
gen-hie > hie.yaml
|
2020-05-01 03:59:13 +03:00
|
|
|
|
```
|
2020-05-04 22:52:56 +03:00
|
|
|
|
`gen-hie` should be run the root of a cabal or stack project.
|
|
|
|
|
The config type (cabal or stack) is determined by the existence of
|
|
|
|
|
`dist-newstyle`, `.stack-work`, `stack.yaml`, if none are found the default is cabal.
|
|
|
|
|
|
|
|
|
|
# Cabal Multi project example
|
|
|
|
|
```bash
|
|
|
|
|
❯ git clone https://github.com/well-typed/optics.git
|
|
|
|
|
❯ cd optics
|
|
|
|
|
❯ gen-hie
|
2020-05-09 06:08:30 +03:00
|
|
|
|
cradle:
|
|
|
|
|
cabal:
|
|
|
|
|
- path: "indexed-profunctors/src"
|
|
|
|
|
component: "lib:indexed-profunctors"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics-th/src"
|
|
|
|
|
component: "lib:optics-th"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics-th/tests"
|
|
|
|
|
component: "optics-th:test:optics-th-tests"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics-vl/src"
|
|
|
|
|
component: "lib:optics-vl"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "codegen/./Subtypes.hs"
|
|
|
|
|
component: "optics-codegen:exe:optics-codegen-subtypes"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics-core/src"
|
|
|
|
|
component: "lib:optics-core"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics-sop/src"
|
|
|
|
|
component: "lib:optics-sop"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics-extra/src"
|
|
|
|
|
component: "lib:optics-extra"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "template-haskell-optics/src"
|
|
|
|
|
component: "lib:template-haskell-optics"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics/src"
|
|
|
|
|
component: "lib:optics"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "optics/tests"
|
|
|
|
|
component: "optics:test:optics-tests"
|
2020-05-09 06:14:26 +03:00
|
|
|
|
|
2020-05-09 06:08:30 +03:00
|
|
|
|
- path: "metametapost/src/Cli.hs"
|
|
|
|
|
component: "metametapost:exe:metametapost-optics"
|
|
|
|
|
|
2020-05-04 22:52:56 +03:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
All common Cabal and Stack configurations should just work.
|
|
|
|
|
If you use more advanced features, the generated config may not be complete.
|
|
|
|
|
|
|
|
|
|
- [x] multi component cabal, stack projects
|
|
|
|
|
- [x] multiple executables under a single path
|
|
|
|
|
- [ ] multiple paths provided to `hs-source-dirs`
|
|
|
|
|
- [ ] common stanzas
|
|
|
|
|
|
2020-05-04 23:03:25 +03:00
|
|
|
|
### Work, Twitter
|
|
|
|
|
<!-- - If you value my contributions to Haskell tooling, FP oriented GC, or open source FP in general, please consider sponsoring me via Github. -->
|
2020-05-04 22:52:56 +03:00
|
|
|
|
- I'm currently looking for work as a Haskell or Rust developer. I can be reached via email or a twitter message.
|
|
|
|
|
- Follow me on twitter [@AviDessauer](https://twitter.com/AviDessauer).
|