https://github.com/konn/backpack-conditional-demo
https://github.com/konn/backpack-conditional-demo
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/konn/backpack-conditional-demo
- Owner: konn
- Created: 2020-09-04T09:52:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-04T14:55:22.000Z (over 4 years ago)
- Last Synced: 2025-01-23T17:35:27.979Z (4 months ago)
- Language: Haskell
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
This repo explores the possibilities to achieve a module-wise conditional building without resorting to CPPs.## `only-reexported-modules`
Uses `reexported-modules` section of Cabal to achieve conditional building.### Pros
* Works both with Stack and Cabal
* No extension required### Cons
* The package using `reexported-modules` cannot call the re-exported module with the renamed module name.## separate-backpacks
### Pros
* Can statically check module signatures
* Underlying packages can refer to the switched modules.### Cons
* Won't work with Stack
* Too many separate packages!## backpack-single
### Pros
* Same as the separate one
* Only one user-facing library package!
### Cons
* Haddock doesn't support reexported-modules
* Stack won't work