[Haskell-cafe] wondering about a MonadIO instance for a heap data type

Qi Qi qiqi789 at gmail.com
Thu Jul 12 00:19:26 CEST 2012


I was wondering about creating an instance of MonadIO for a heap data.
Any hints?

data Heap a = E | T Int a (Heap a) (Heap a)
     deriving (Eq, Ord, Read, Show)

The reason is that I want to use liftIO during a heapsort to print out
intermediate results.


Qi Qi

More information about the Haskell-Cafe mailing list