O'Reilly logo

Learn You a Haskell for Great Good! by Miran Lipovaca

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required