4 Haskell development with modules, packages, and projects
This chapter covers
- Best practices in structuring programs with modules
- Using custom preludes
- Ideas and approaches behind packaging Haskell projects
- Tools for package and project management
The code in Haskell (data types, function definitions, and so on) is organized into modules. One special module, Prelude
, is imported into every module by default and exports the most important definitions. Modules form packages, which may contain libraries intended to be used by other packages, standalone applications, or both. One special package, base
, contains the definitions from the standard library (as defined by the Haskell 2010 Language Report, https://www.haskell.org/onlinereport/ haskell2010/ ...
Get Haskell in Depth now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.