There are a number of other subtleties associated with this, such as requiring
parameters to the data constructors to be eager, what classes are
allowed in the deriving, use of field names in the constructors
and what the context actually does. Please refer to the specific articles for more on each of those.

What this means is that the type Maybe has one type variable, represented by the a and two constructorsJust and Nothing. (Note that Haskell requires type names and constructor names to begin with an uppercase letter). The Just constructor takes one parameter, of type a.

As another example, consider binary Trees. They could be represented by:

data Tree a = Branch (Tree a)(Tree a)| Leaf a

Here, one of the constructors, Branch of Tree takes two trees as
parameters to the constructor, while Leaf takes a value of type a. This type of recursion is a very common pattern in Haskell.

2 Type and newtype

The other two ways one may introduce types to Haskell programs are via the

type

and

newtype

statements.

type

introduces a synonym for a type and uses the same data
constructors.

newtype

introduces a renaming of a type and

requires you to provide new constructors.

When using a

type

declaration, the type synonym and its base type

are interchangeble almost everywhere (There are some restrictions when dealing with instance declarations). For example, if you had the declaration:

this would no longer be the case. Functions would have to be declared that
actually were defined on FirstName. Often, one creates a deconstructor
at the same time which helps alleviate this requirement. e.g.:

Each of these uses a deriving clause to allow us to convert them from / to String and Int, test them for equality and ordering. With types like this,
where there are no type variables, equality is based upon which constructor is used and order is determined by the order you wrote them, e.g. Three is less than Queen.

In this definition, we use fields, which give us ready made functions to
access the two parts of a Card. Again, type variables were not
used, but the data constructor requires its two parameters to be of
specific types, CardValue and Suit.

The deriving clause here only specifies three of our desired classes, we supply instance declarations for Ord and Enum: