Cover by Miran Lipovaca

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

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

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required