Skip to Content
Learn You a Haskell for Great Good!
book

Learn You a Haskell for Great Good!

by Miran Lipovaca
April 2011
Beginner
400 pages
12h 45m
English
No Starch Press
Content preview from Learn You a Haskell for Great Good!

Chapter 6. Modules

A Haskell module is essentially a file that defines some functions, types, and type classes. A Has-kell program is a collection of modules.

image with no caption

A module can have many functions and types defined inside it, and it exports some of them. This means that it makes them available for the outside world to see and use.

Having code split up into several modules has many advantages. If a module is generic enough, the functions it exports can be used in a multitude of different programs. If your own code is separated into self-contained modules that don’t rely on each other too much (we also say they are loosely coupled), you can reuse them later. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Haskell

Effective Haskell

Rebecca Skinner
Learning Go

Learning Go

Jon Bodner

Publisher Resources

ISBN: 9781457100406Errata Page