- representation of "the real world" where you can send data, control things, etc;
- representation of early return error semantics, like you have with exceptions;
- encapsulation of different execution threads, so you only interface with the group;
- encapsulation of a computer architecture, so something compiled for your GPU runs on the GPU, and something compiled for your CPU run on your CPU;
- encapsulation of transactions, so you can have a multi-threaded software changing whatever shared value you want and none of that leaks to the larger software;
- data structure, like libraries that encode hardware description into them.
That list is not in any way comprehensive. It's just stuff that I can remember right now.
Comments
Some uses you'll find in Haskell:
- representation of "the real world" where you can send data, control things, etc;
- representation of early return error semantics, like you have with exceptions;
- encapsulation of different execution threads, so you only interface with the group;
- encapsulation of a computer architecture, so something compiled for your GPU runs on the GPU, and something compiled for your CPU run on your CPU;
- encapsulation of transactions, so you can have a multi-threaded software changing whatever shared value you want and none of that leaks to the larger software;
- data structure, like libraries that encode hardware description into them.
That list is not in any way comprehensive. It's just stuff that I can remember right now.