wfreturns the action that creates the file. loadWorldaccepts a file, not an action. I think this should work: wf >>= loadWorld.
MutableIO Filerepresents a mutable file, whereas IOMutableis an action that returns a mutable file. IOMutabledefined as (taken from source):
--- This is an abbreviation for @ST RealWorld (Mutable RealWorld d)@
type IOMutable d = IO (MutableIO d)
Similarly STMutabledefined as,
--- The type of 'ST' actions that return a mutable value of type _d_
--- This is an abbreviation for @ST s (Mutable s d)@
type STMutable s d = ST s (Mutable s d)
source
share