What is () in Haskell, exactly?
问题 I'm reading Learn You a Haskell , and in the monad chapters, it seems to me that () is being treated as a sort of "null" for every type. When I check the type of () in GHCi, I get >> :t () () :: () which is an extremely confusing statement. It seems that () is a type all to itself. I'm confused as to how it fits into the language, and how it seems to be able to stand for any type. 回答1: tl;dr () does not add a "null" value to every type, hell no; () is a "dull" value in a type of its own: () .