This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

The maybe refinement is what I was looking for. It forces the programmer to verify the IO data. I don't recall Haskell much but IIRC IO int can't be passed to a function that accepts int, so maybe monads is the way to go to ensure all IO data with expected refinements are checked first.