@WeijunZhou That is entirely up to you. Often a time limit will be specified in the challenge text, the accepted answer is changed periodically, or answers are not accepted at all
Conceptually the IO monad is a language that is interpreted by the RTS, which happens to have access to the real world. And Haskell is pure because it will produce the same IO program every time.
An IO a is actually a description of how to get an a from the real world. The main function is evaluated by the RTS, in the same way you have to call runState to get the a out of State a
@R.Kap I think that is a good compromise, because then you still have the ability to skim trough ranges for unused bytes. Thanks for adding the search, I think we needed that badly :)