Dan Piponi wrote:
No, definitely the new one. The old one is:

newtype ListT m a = ListT { runListT :: m [a] }

which treats the entire list as one uninterleavable lump.

The new one is:

data MList' m a = MNil | a `MCons` MList m a
type MList m a  = m (MList' m a)
newtype ListT m a = ListT { runListT :: MList m a }

OK.

Note the definition of MList' is isomorphic to a use of Maybe.

Yes, and in fact

http://www.haskell.org/hawiki/ListTDoneRight_2fAlternative1

uses exactly your type.

But the old broken ListT happens to work fine here.
See my earlier post in this thread.

Regards,
Yitz
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to