Hacker News new | past | comments | ask | show | jobs | submit login

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.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: