3 ms·
Yup. Here's an example. There is no function print :: String -> () (The type () implies "no interesting return value"). This function could only be writ
by tel 11y ago
Yup. Here's an example.
There is no function
print :: String -> ()
(The type () implies "no interesting return value").
This function could only be written via deliberate subversion of the type system. Instead it must be
print :: String -> IO ()
Which is similar, but the return is marked by this IO type. Essentially this restricts you to ensure that side effecting functions are executed in explicit sequence and cannot "poison" pure types.