Changes between Initial Version and Version 3 of Ticket #12767


Ignore:
Timestamp:
Nov 20, 2016 5:37:09 PM (3 years ago)
Author:
Iceland_jack
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12767 – Description

    initial v3  
    22
    33{{{#!hs
     4import qualified Control.Monad.Cont   as C
     5import           Control.Monad.Cont   hiding (runCont)
     6import qualified Control.Monad.Writer as W
     7import           Control.Monad.Writer hiding (runWriter)
     8import qualified Control.Monad.Reader as R
     9import           Control.Monad.Reader hiding (runReader)
     10import qualified Control.Monad.State  as S
     11import           Control.Monad.State  hiding (runState)
     12
    413pattern Cont :: ((a -> r) -> r) -> Cont r a
    5 pattern Cont a <- (runCont -> a)
    6   where Cont a = cont a
     14pattern Cont {runCont} <- (C.runCont -> runCont)
     15  where Cont a          = cont a
    716
    817pattern Writer :: (a, w) -> Writer w a
    9 pattern Writer a <- (runWriter -> a)
    10   where Writer a = WriterT (Identity a)
     18pattern Writer {runWriter} <- (W.runWriter -> runWriter)
     19  where Writer a            = WriterT (Identity a)
    1120
    1221pattern Reader :: (r -> a) -> Reader r a
    13 pattern Reader a <- (runReader -> a)
    14   where Reader a = reader a
     22pattern Reader {runReader} <- (R.runReader -> runReader)
     23  where Reader a            = reader a
    1524
    1625pattern State :: (s -> (a, s)) -> State s a
    17 pattern State a <- (runState -> a)
    18   where State a = state a
     26pattern State {runState} <- (S.runState -> runState)
     27  where State a           = state a
    1928}}}
    2029