Changes between Version 8 and Version 9 of Proposals/transformers

Show
Ignore:
Timestamp:
09/15/10 00:33:00 (4 years ago)
Author:
ross (IP: 81.98.180.212)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Proposals/transformers

    v8 v9  
    5555reader :: (r -> a) -> Reader r a 
    5656reader f = ReaderT (Identity . f) 
     57 
     58runReader :: Reader r a -> r -> a 
     59runReader m = runIdentity . runReaderT m 
    5760}}} 
    5861 ''Rationale:'' This avoids repetition in the interfaces of both transformers and the proposed mtl-2.  It makes transformers more useful on its own, and also saves clients of mtl from defining instances for both {{{State s}}} and {{{StateT s Identity}}} and ensuring that they are consistent.