Lesson 51 of 55
9 mins readPython Production Architecture: Cabal & Stack
In Plain English
Learn how production Haskell applications are organized, configured, and built using Cabal packages, Stack reproducible resolvers (LTS Haskell), and clean directory structures (src/, app/, test/).
Deep Dive: How It Works
Package Tools: Cabal (the core build system) and Stack (curated LTS snapshot package manager).
Directory Layout: src/ for core library modules, app/ for Main executable, test/ for test suites.
GHC Flags: -Wall (enable all warnings), -O2 (maximum optimization), -threaded (multi-threaded runtime).
Core Rules to Remember

Cabal & Stack Ecosystem: Standard tools for package management and reproducible compilation.

GHC Optimization Flags: Use -O2 -threaded -rtsopts for maximum production performance.
Live Interactive Example
Hit Run Code to see it liveProduction Project Blueprint
Python 3.12
1
2
3
4
5
6
7
8
9
Output Console
Click "Run Code" to view the rendered output.
How it works: Summary of the production packaging standards in Haskell.
Your Turn: Micro Challenge
No pressure! Edit the starter code below and test your solution with instant feedback.
Micro Exercise
Confirm Architecture Standards
Print `"Production Haskell architecture verified 100%"`.
1
2
3
4
Sandbox Output
Click "Run & Check" to test your solution.
Finished reading and practicing?
Mark this lesson as completed to update your course progress.