
Dnia śro 4. czerwca 2003 20:38, Iavor Diatchki napisał:
well, in the old library there didn't seem to be a particular structure (perhaps this is what you mean by diagonal). for example: * the instance that StateT is a writer (if underlying monad is a writer) is in State.hs * the instance that ReaderT is a writer (if underlying monad is a writer) is in Writer.hs
It can't be done consistently without recursive modules and without orphan instances. So there is an arbitrary ordering among modules (roughly from less to more sophisticated), each module uses preceding modules, and defines instances applying to itself and used modules in both directions. If some pair of abilities don't mix in either direction, it doesn't need to be ordered. It's transparent for the user, matters only for development. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/