yesodweb / yesodweb/persistent
Persistent TH generates splice so large that GHCI runs out labels
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
This is with around 70 tables, generally with <10 fields each.
The compile times are also quite long.
It seems like the newest GHC's increase the amount of bits used for labels to avoid this problem, but a lot of libraries (and GHCJS) are not up to date enough to use these GHC's.
I was wondering if it would be possible to tweak things so that less code is generated while maintaining the same functionality.
It seems like manually writing out instances is pretty verbose too. Opaleye seems to be more concise in this regard, so it might be a useful reference.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the persistent Template Haskell generation with around 70 tables and fewer than 10 fields each, then inspect the generated splice and its behavior in GHCi. Compare the generated code with concise manually written instances and Opaleye as a reference; done means preserving the same functionality while avoiding GHCi label exhaustion and reducing compile times.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100