Syntactic sugar to encourage use of named arguments

It seems to be called a “pun” because it’s about using the same identifier in different namespaces. Apparently this kind of Haskell code is also referred to as punning:

data Point a = Point a a

where the first “Point” is a “type constructor” (something like the name of the type) and the second “Point” the “data constructor” (something like a constructor).

1 Like