I’m trying to write a function that takes an IO Bool and does stuff based on what this is, but I can’t figure out how to evaluate the IO Bool. I tried saying do cond and do {cond==True} but got the error Couldn't match expected type 'Bool' against inferred type 'a b'. Can someone direct me to a solution?
I’m trying to write a function that takes an IO Bool and does stuff
Share
You’ll need to unpack/pull the bool out of IO before you can use it. Here’s an example: