Earlier quoted context omitted.
The IO monad (in Haskell) will always be the same, no matter how much I/O you perform. A unique File type, for instance, will be different before and after I/O, reflecting that side effects are not idempotent. In other words, a change in mutable state is reflected in a change of type.
I'd love to see an example of this (the wikipedia page is not very clear to me). Is there a Clean or Idris program somewhere I can have a look at?
https://www.mercurylang.org/information/doc-latest/mercury_r...
useful for things like file descriptors. The type system will, for example prevent sharing of your file descriptors between threads.