📘
📘
📘
📘
HPM Education - Haskell
Search…
⌃K
📘
📘
📘
📘
HPM Education - Haskell
Search…
⌃K
Introduction to Haskell
Introduction
Functions
Functional Programming vs Imperative Programming
Installing Haskell
Haskell Modules
Loading Modules into GHCi
Expressions
Laziness
Immutability
Types in Haskell
Introduction
Basic Types
Static Type Check
Polymorphic and Overloaded Types
Data Structure Types
Function Types
Defining Functions / Working with Functions
The Layout Rule
Local Definitions
The Infix Operator
Conditionals
Pattern Matching
Lambda functions
Function Operators
List Comprehensions
List Comprehensions
Higher-order Functions
Introduction
The map Function
The filter Function
Recursion
Introduction
4 Steps to Defining Recursive Functions
Recursion Practice
Folds
Cutom Types
Declaring Types
Type Synonyms
Data Declarations
Newtype declarations
Type Classes
Introduction
Basic Classes
Derived Instances
Exercise – Making a Card Deck Type
Interactive Programming
Introduction
Input / Output Actions
Sequencing Actions
Exercise - Numbers Guessing Game
Functors, Applicatives and Monads
Introduction
Functors
Applicative Functors
Monads
References / Further Reading
Powered By GitBook

Declaring Types

We have already explored the basic types of Haskell in Basic Types, so now we will look into how we can define our own types. There are three different ways in which we can define new types in Haskell – Type synonyms (or Type aliases), Data declarations, and Newtype declarations.
Previous
Fold Left (foldl)
Next
Type Synonyms
Last modified 3mo ago
Copy link