Working with Basic Haskell Types
The names of types in Haskell always start with a capital letter, for example, Integer, not integer. You’ll learn about several different built-in types throughout this chapter, but to get started let’s take a look at a few of the most common types:
-
Integer: A signed integer value. It’s unbounded, meaning it can be arbitrarily large. Integer literals are written as numbers, as in 1234 or -1234.
-
Int: A signed integer value. Its size (32-bit or 64-bit) depends on your platform. Int literals are written as numbers, as in 1234 or -1234.
-
Word: An unsigned integer value. It’s the same size as an Int. Word literals are written as numbers, as in 1234.
-
Float: A single-precision IEEE floating-point value. Float literals ...
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.
Read now
Unlock full access