Skip to content

Documentation shouldn't call things functions that aren't functions

Referring to non-function values (particularly of type IO) as "functions" is often a sign that beginners haven't fully grasped some concepts about purity, so I think it's important to clean up our own language.

For example, in the Prelude docs we have a section called "Input functions" in which only one of the four values is a function:

getChar :: IO Char
getLine :: IO String
getContents :: IO String
interact :: (String -> String) -> IO ()

In that case, I suggest we rename the sections "Input functions" and "Output functions" to simply "Input" and "Output".

Edited by Chris Martin
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information