CHAPTER 2

image

Declaring the Data Model

You already know how to get a working installation of the Haskell Platform and of the EclipseFP development environment. The next step toward your Time Machine Store is to create the initial set of values and functions that will represent the data in the system: clients, machines, and orders.

This chapter will give you the basic ingredients for creating these values and functions. In a first approximation, you will create functions operating on basic types. You already know numbers, and you will add lists and tuples to the mix. Afterward, you will see how to create your own algebraic data types (ADTs) to better ...

Get Beginning Haskell: A Project-Based Approach 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.