The type keyword declares a type synonym, or type alias. The below are all Integer types, but we can give them different names to make them easier for human eyes to distinguish in type signatures.
type Numerator = Integer
type Denominator = Integer
type Quotient = Integer
dividedBy :: Numerator
-> Denominator
-> Quotient
dividedBy = div
type is used to make types easier for humans to distinguish.
The
type
keyword declares a type synonym, or type alias. The below are all Integer types, but we can give them different names to make them easier for human eyes to distinguish in type signatures.type
is used to make types easier for humans to distinguish.