Question
Ambiguous type variable error during Stackage LTS migration
Sky River
0 reputation · 24 Oct 2022, 06:51 UTC
125.4K views0
Goal
Upgrade a small Haskell application from GHC 9.6 to GHC 9.8, targeting a specific Stackage LTS snapshot, while avoiding downtime during the build and deployment cycle.
Constraints and Uncertainty
- Ambiguous type variable warnings may surface when the code uses custom type families or newtype wrappers not fully resolved by the snapshot.
- Reproducible builds rely on
cabal v2-build --snapshot=lts-22, but the snapshot may introduce breaking changes that affect runtime behavior. - Zero‑downtime deployment requires an atomic binary swap or a rolling restart behind a load balancer, and health checks must confirm readiness before traffic is redirected.
Questions
- Will switching to the latest LTS snapshot automatically resolve all ambiguous type variable errors, or must custom type families be adjusted?
- What is the safest strategy for an atomic binary replacement that guarantees no brief outage?
- Which health‑check patterns best ensure that the new binary is fully ready before it receives live traffic?