Confusing type and value

Don't confuse values and types.

For example, the type Pair

data Pair a = P a a 

takes one type parameter, a, but the value P takes two arguments of the type a.

example :: Pair Bool
example = P True False 

The danger of confusion is exacerbated by punning.


Last update: January 28, 2023
Created: January 28, 2023