[doc update
ekmett@gmail.com**20090413083810
Ignore-this: 30eba1fe9b8562fe54dab69fdf5493b7
] {
hunk ./doc/html/monad-cps/Control-Monad-CPS-Codensity.html 1
-
-
-
font is a little too small in MSIE */
-TT { font-size: 100%; }
-PRE { font-size: 100%; }
-
-LI P { margin: 0pt }
-
-TD {
- border-width: 0px;
-}
-
-TABLE.narrow {
- border-width: 0px;
-}
-
-TD.s8 { height: 8px; }
-TD.s15 { height: 15px; }
-
-SPAN.keyword { text-decoration: underline; }
-
-/* Resize the buttom image to match the text size */
-IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em }
-
-/* --------- Contents page ---------- */
-
-DIV.node {
- padding-left: 3em;
-}
-
-DIV.cnode {
- padding-left: 1.75em;
-}
-
-SPAN.pkg {
- position: absolute;
- left: 50em;
-}
-
-/* --------- Documentation elements ---------- */
-
-TD.children {
- padding-left: 25px;
- }
-
-TD.synopsis {
- padding: 2px;
- background-color: #f0f0f0;
- font-family: monospace
- }
-
-TD.decl {
- padding: 2px;
- background-color: #f0f0f0;
- font-family: monospace;
- vertical-align: top;
- }
-
-TD.topdecl {
- padding: 2px;
- background-color: #f0f0f0;
- font-family: monospace;
- vertical-align: top;
-}
-
-TABLE.declbar {
- border-spacing: 0px;
- }
-
-TD.declname {
- width: 100%;
- }
-
-TD.declbut {
- padding-left: 5px;
- padding-right: 5px;
- border-left-width: 1px;
- border-left-color: #000099;
- border-left-style: solid;
- white-space: nowrap;
- font-size: small;
- }
-
-/*
- arg is just like decl, except that wrapping is not allowed. It is
- used for function and constructor arguments which have a text box
- to the right, where if wrapping is allowed the text box squashes up
- the declaration by wrapping it.
-*/
-TD.arg {
- padding: 2px;
- background-color: #f0f0f0;
- font-family: monospace;
- vertical-align: top;
- white-space: nowrap;
- }
-
-TD.recfield { padding-left: 20px }
-
-TD.doc {
- padding-top: 2px;
- padding-left: 10px;
- }
-
-TD.ndoc {
- padding: 2px;
- }
-
-TD.rdoc {
- padding: 2px;
- padding-left: 10px;
- width: 100%;
- }
-
-TD.body {
- padding-left: 10px
- }
-
-TD.pkg {
- width: 100%;
- padding-left: 10px
-}
-
-TABLE.indexsearch TR.indexrow {
- display: none;
-}
-TABLE.indexsearch TR.indexshow {
- display: table-row;
-}
-
-TD.indexentry {
- vertical-align: top;
- padding-right: 10px
- }
-
-TD.indexannot {
- vertical-align: top;
- padding-left: 20px;
- white-space: nowrap
- }
-
-TD.indexlinks {
- width: 100%
- }
-
-/* ------- Section Headings ------- */
-
-TD.section1 {
- padding-top: 15px;
- font-weight: bold;
- font-size: 150%
- }
-
-TD.section2 {
- padding-top: 10px;
- font-weight: bold;
- font-size: 130%
- }
-
-TD.section3 {
- padding-top: 5px;
- font-weight: bold;
- font-size: 110%
- }
-
-TD.section4 {
- font-weight: bold;
- font-size: 100%
- }
-
-/* -------------- The title bar at the top of the page */
-
-TD.infohead {
- color: #ffffff;
- font-weight: bold;
- padding-right: 10px;
- text-align: left;
-}
-
-TD.infoval {
- color: #ffffff;
- padding-right: 10px;
- text-align: left;
-}
-
-TD.topbar {
- background-color: #000099;
- padding: 5px;
-}
-
-TD.title {
- color: #ffffff;
- padding-left: 10px;
- width: 100%
- }
-
-TD.topbut {
- padding-left: 5px;
- padding-right: 5px;
- border-left-width: 1px;
- border-left-color: #ffffff;
- border-left-style: solid;
- white-space: nowrap;
- }
-
-TD.topbut A:link {
- color: #ffffff
- }
-
-TD.topbut A:visited {
- color: #ffff00
- }
-
-TD.topbut A:hover {
- background-color: #6060ff;
- }
-
-TD.topbut:hover {
- background-color: #6060ff
- }
-
-TD.modulebar {
- background-color: #0077dd;
- padding: 5px;
- border-top-width: 1px;
- border-top-color: #ffffff;
- border-top-style: solid;
- }
-
-/* --------- The page footer --------- */
-
-TD.botbar {
- background-color: #000099;
- color: #ffffff;
- padding: 5px
- }
-TD.botbar A:link {
- color: #ffffff;
- text-decoration: underline
- }
-TD.botbar A:visited {
- color: #ffff00
- }
-TD.botbar A:hover {
- background-color: #6060ff
- }
-
rmfile ./doc/html/monad-cps/haddock.css
binary ./doc/html/monad-cps/haskell_icon.gif
oldhex
*47494638376110001000f70f00000000800000008000808000000080800080008080c0c0c08080
*80ff000000ff00ffff000000ffff00ff00ffffffffff0000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*0021f90401000000002c000000001000100007086c0001007840b0a0418202073e38b0b021c387
*07143e2440c0a143040e091cd0787021c686151f84347800e343901d4b12646870e44a930d0952
*3ca832a6cc990555b2bc2992e4c79d3847ea2c88b3a7c89a2c8b8aa43874e941a60810003840b5
*aa55aa511346ddca75abc080003b
newhex
*
rmfile ./doc/html/monad-cps/haskell_icon.gif
hunk ./doc/html/monad-cps/index.html 1
-
-
-monad-cps-0.0.3: CPS implementations of common monads. monad-cps-0.0.3: CPS implementations of common monads. Contents Index
monad-cps-0.0.3: CPS implementations of common monads. .
- Modules Control Monad
Produced by Haddock version 2.3.0
rmfile ./doc/html/monad-cps/index.html
binary ./doc/html/monad-cps/minus.gif
oldhex
*47494638396109000900910000fefefe8282820202020000002c00000000090009000002118c8f
*a00bc6eb5e0b40583b6596f1a11f14003b
newhex
*
rmfile ./doc/html/monad-cps/minus.gif
binary ./doc/html/monad-cps/monad-cps.haddock
oldhex
*0d0cface0004000000000000110d0000000000000ade2d00000000000000000000000000000000
*000000000000000100000000000000010000000000000000000000000000000100000000000000
*020000000000000000000000000000000100000000000000030000000000000000000000000000
*000100000000000000040000000000000000000000000000000100000000000000050000000000
*000000000000000000000100000000000000060000000000000000000000000000000200000000
*000000070000000000000000000000000000000200000000000000080000000000000000000000
*0000000002000000000000000900000000000000000000000000000002000000000000000a0000
*0000000000000000000000000003000000000000000b0000000000000000000000000000000300
*0000000000000c00000000000000000000000000000003000000000000000d0000000000000000
*0000000000000003000000000000000e0000000000000000000000000000000400000000000000
*0f0000000000000000000000000000000400000000000000100000000000000000000000000000
*000400000000000000110000000000000000000000000000000500000000000000120000000000
*000000000000000000000500000000000000130000000000000000000000000000000500000000
*000000140000000000000000000000000000000500000000000000150000000000000000000000
*000000000600000000000000160000000000000000000000000000000600000000000000170000
*000000000000000000000000000600000000000000180000000000000000000000000000000600
*0000000000001900000000000000000000000000000007000000000000001a0000000000000000
*0000000000000007000000000000001b0000000000000000000000000000000700000000000000
*1c00000000000000000000000000000007000000000000001d0000000000000000000000000000
*0007000000000000001e00000000000000000000000000000008000000000000001f0000000000
*000000000000000000000800000000000000200000000000000000000000000000000800000000
*000000210000000000000000000000000000000800000000000000220000000000000000000000
*000000000800000000000000230000000000000000000000000000000800000000000000240000
*000000000000000000000000000800000000000000250000000000000000000000000000000800
*000000000000260000000000000000000000000000000800000000000000270000000000000000
*000000000000000800000000000000280000000000000000000000000000000800000000000000
*2900000000000000000000000000000009000000000000002a0000000000000000000000000000
*0009000000000000002b00000000000000000000000000000009000000000000002c0000000000
*00000000000000000000090a0000000000000000000000000000000100000000000c0000000000
*00002d000000000000002e000000000000002f0000000000000030000000000000003100000000
*000000320000000000000000000000000000000100000000000000020000000000000003000000
*000000000400000000000000050600000000000000010000000000000002000000000000000300
*000000000000040000000000000000000000000000000500000000000000000000000000000002
*000000000014000000000000003300000000000000340000000000000035000000000000003600
*0000000000003700000000000000380000000000000039000000000000003a000000000000003b
*000000000000003c000000000000002d000000000000002e000000000000002f00000000000000
*300000000000000031000000000000003200000000000000060000000000000007000000000000
*000800000000000000090400000000000000060000000000000007000000000000000800000000
*000000090000000000000000000000000000000300000000000800000000000000340000000000
*00003500000000000000360000000000000037000000000000000a000000000000000b00000000
*0000000c000000000000000d04000000000000000a000000000000000b000000000000000c0000
*00000000000d00000000000000000000000000000004000000000003000000000000000e000000
*000000000f000000000000001003000000000000000e000000000000000f000000000000001000
*000000000000000000000000000005000000000004000000000000001100000000000000120000
*000000000013000000000000001404000000000000001100000000000000120000000000000013
*000000000000001400000000000000000000000000000006000000000004000000000000001500
*000000000000160000000000000017000000000000001804000000000000001500000000000000
*160000000000000017000000000000001800000000000000000000000000000007000000000005
*0000000000000019000000000000001a000000000000001b000000000000001c00000000000000
*1d050000000000000019000000000000001a000000000000001b000000000000001c0000000000
*00001d0000000000000000000000000000000800000000000d000000000000003d000000000000
*003e000000000000001e000000000000001f000000000000002000000000000000210000000000
*000022000000000000002300000000000000240000000000000025000000000000002600000000
*0000002700000000000000280b0000000000000021000000000000002200000000000000230000
*000000000024000000000000002500000000000000260000000000000027000000000000001e00
*0000000000001f0000000000000020000000000000002800000000000000000000000000000009
*00000000000900000000000000380000000000000039000000000000003a000000000000003b00
*0000000000003c0000000000000029000000000000002a000000000000002b000000000000002c
*04000000000000002a000000000000002b0000000000000029000000000000002c000000000000
*0000000000000000000a00000000003a000000000000003d000000000000003e00000000000000
*340000000000000035000000000000003600000000000000370000000000000038000000000000
*0039000000000000003a000000000000003b000000000000003c000000000000002d0000000000
*00002e000000000000002f00000000000000300000000000000031000000000000003200000000
*000000000000000000000001000000000000000200000000000000030000000000000004000000
*0000000005000000000000000a000000000000000b000000000000000c000000000000000d0000
*00000000000e000000000000000f00000000000000100000000000000011000000000000001200
*000000000000130000000000000014000000000000001500000000000000160000000000000017
*00000000000000180000000000000019000000000000001a000000000000001b00000000000000
*1c000000000000001d000000000000001e000000000000001f0000000000000020000000000000
*002100000000000000220000000000000023000000000000002400000000000000250000000000
*000026000000000000002700000000000000280000000000000029000000000000002a00000000
*0000002b000000000000002c00000000000000003f000000000000000000000000000000010300
*0000000000000b0000000000000000000000000000000103000000000000000c00000000000000
*00000000000000000101000000000000000c000000000000000000000000000000010000000000
*0000000d0000000000000000000000000000000100000000000000000e00000000000000000000
*00000000000100000000000000000f000000000000000000000000000000020300000000000000
*100000000000000000000000000000000201000000000000001000000000000000000000000000
*000002000000000000000011000000000000000000000000000000020000000000000000120000
*000000000000000000000000000303000000000000001300000000000000000000000000000003
*010000000000000013000000000000000000000000000000030000000000000000140000000000
*000000000000000000000300000000000000001500000000000000000000000000000004030000
*000000000016000000000000000000000000000000040100000000000000160000000000000000
*000000000000000400000000000000001700000000000000000000000000000005030000000000
*000018000000000000000000000000000000050100000000000000180000000000000000000000
*00000000050000000000000000190000000000000000000000000000000500000000000000001a
*0000000000000000000000000000000603000000000000001b0000000000000000000000000000
*000601000000000000001b0000000000000000000000000000000600000000000000001c000000
*0000000000000000000000000600000000000000001d0000000000000000000000000000000703
*000000000000001e0000000000000000000000000000000701000000000000001e000000000000
*0000000000000000000700000000000000001f0000000000000000000000000000000700000000
*000000002000000000000000000000000000000007000000000000000021000000000000000000
*000000000000080300000000000000220000000000000000000000000000000801000000000000
*002200000000000000000000000000000008000000000000000023000000000000000000000000
*000000080300000000000000240000000000000000000000000000000800000000000000002500
*000000000000000000000000000008000000000000000026000000000000000000000000000000
*080000000000000000270000000000000000000000000000000800000000000000002800000000
*000000000000000000000008000000000000000029000000000000000000000000000000080000
*0000000000002a0000000000000000000000000000000800000000000000002b00000000000000
*00000000000000000903000000000000002c000000000000000000000000000000090300000000
*0000002d0000000000000000000000000000000900000000000000002e00000000000000000000
*00000000000900000000000000002f000000000000003000000000000000310000000000000000
*320000000000000030000000000000003100000000000000003300000000000000300000000000
*000031000000000000000034000000000000003000000000000000310000000000000000350000
*000000000030000000000000003100000000000000003600000000000000300000000000000031
*030000000000000037000000000000003000000000000000380300000000000000390000000000
*000030000000000000003a00000000000000003b0000000000000030000000000000003a000000
*00000000003c0000000000000030000000000000003a00000000000000003d0000000000000030
*000000000000003a03000000000000003e0000000000000030000000000000003f000000000000
*0000400000000000000030000000000000003f0000000000000000410000000000000030000000
*000000003f0000000000000000420000000000000030000000000000003f000000000000000043
*0000000000000030000000000000003f0300000000000000440000000000000030000000000000
*004500000000000000004600000000000000300000000000000045030000000000000047000000
*0000000048000000000000000f6d6f6e61642d6370732d302e302e330000000000000018436f6e
*74726f6c2e4d6f6e61642e4350532e5772697465720000000000000015436f6e74726f6c2e4d6f
*6e61642e4350532e5257530000000000000018436f6e74726f6c2e4d6f6e61642e4350532e5265
*616465720000000000000015436f6e74726f6c2e4d6f6e61642e4350532e52616e000000000000
*0017436f6e74726f6c2e4d6f6e61642e4350532e4d61796265000000000000001a436f6e74726f
*6c2e4d6f6e61642e4350532e4964656e74697479000000000000001b436f6e74726f6c2e4d6f6e
*61642e4350532e436f64656e736974790000000000000016436f6e74726f6c2e4d6f6e61642e43
*50532e436f6e740000000000000017436f6e74726f6c2e4d6f6e61642e4350532e537461746500
*00000000000011436f6e74726f6c2e4d6f6e61642e435053000000000000000757726974657227
*000000000000000657726974657200000000000000096765745772697465720000000000000009
*72756e577269746572000000000000000a72756e57726974657227000000000000000352575300
*00000000000006676574525753000000000000000672756e525753000000000000000652656164
*65720000000000000009676574526561646572000000000000000972756e526561646572000000
*000000000352616e000000000000000667657452616e00000000000000064d6179626527000000
*00000000096765744d6179626527000000000000000972756e4d61796265270000000000000008
*4964656e74697479000000000000000b6765744964656e74697479000000000000000b72756e49
*64656e746974790000000000000009436f64656e73697479000000000000000c676574436f6465
*6e73697479000000000000000c72756e436f64656e73697479000000000000000f72756e436f64
*656e736974794170700000000000000005436f6e74270000000000000008676574436f6e742700
*00000000000004436f6e74000000000000000772756e436f6e7400000000000000066964436f6e
*7400000000000000076d6170436f6e74000000000000000877697468436f6e7400000000000000
*05736869667400000000000000057265736574000000000000000872756e436f6e742700000000
*0000000653746174652700000000000000055374617465000000000000000872756e5374617465
*000000000000000972756e537461746527000000000000000b6d746c2d312e312e302e32000000
*000000001a436f6e74726f6c2e4d6f6e61642e5772697465722e436c6173730000000000000006
*63656e736f7200000000000000076c697374656e73000000000000000470617373000000000000
*00066c697374656e000000000000000474656c6c000000000000000b4d6f6e6164577269746572
*0000000000000017436f6e74726f6c2e4d6f6e61642e5257532e436c6173730000000000000008
*4d6f6e6164525753000000000000001a436f6e74726f6c2e4d6f6e61642e5265616465722e436c
*617373000000000000000461736b7300000000000000056c6f63616c000000000000000361736b
*000000000000000b4d6f6e61645265616465720000000000000019436f6e74726f6c2e4d6f6e61
*642e53746174652e436c61737300000000000000046765747300000000000000066d6f64696679
*00000000000000037075740000000000000003676574000000000000000a4d6f6e616453746174
*650000000000000018436f6e74726f6c2e4d6f6e61642e436f6e742e436c617373000000000000
*000663616c6c434300000000000000094d6f6e6164436f6e74
newhex
*
rmfile ./doc/html/monad-cps/monad-cps.haddock
binary ./doc/html/monad-cps/plus.gif
oldhex
*47494638396109000900910000fefefe8282820202020000002c00000000090009000002148c8f
*a00bb6b29c82ca897b5b7871cfce74085200003b
newhex
*
rmfile ./doc/html/monad-cps/plus.gif
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-Codensity.html 1
-
-
-
-
-src/Control/Monad/CPS/Codensity.hs
-
-
-
-module Control . Monad . CPS . Codensity
- ( Codensity ( Codensity , getCodensity )
- , runCodensity , runCodensityApp
- ) where
-
-import Control . Monad
-import Control . Monad . Trans
-import Control . Applicative
-
-newtype Codensity f a = Codensity { getCodensity :: forall o . ( a -> f o ) -> f o }
-
-instance Functor ( Codensity f ) where
- fmap f ( Codensity g ) = Codensity ( \ k -> g ( \ a -> k ( f a ) ) )
-
-instance Applicative ( Codensity f ) where
- pure = return
- ( <*> ) = ap
-
-instance Monad ( Codensity f ) where
- return a = Codensity ( \ k -> k a )
- Codensity g >>= f = Codensity ( \ k -> g ( \ a -> getCodensity ( f a ) k ) )
-
-runCodensity :: Monad f => Codensity f a -> f a
-runCodensity ( Codensity f ) = f return
-
-runCodensityApp :: Applicative f => Codensity f a -> f a
-runCodensityApp ( Codensity f ) = f pure
-
-instance MonadTrans Codensity where
- lift m = Codensity ( m >>= )
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-Codensity.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-Cont.html 1
-
-
-
-
-src/Control/Monad/CPS/Cont.hs
-
-
-
-module Control . Monad . CPS . Cont
- ( Cont
- , runCont
- , idCont
- , mapCont
- , withCont
- , shift
- , reset
- , Cont' ( .. )
- , runCont'
- , module Control . Monad . Cont . Class
- ) where
-
-import Control . Applicative
-import Control . Monad
-import Control . Monad . CPS . Codensity
-import Unsafe . Coerce
-import Control . Monad . Cont . Class
-
-newtype Cont r a = Cont { getCont :: forall o . ( a -> r ) -> ( r -> o ) -> o }
-
-instance Functor ( Cont r ) where
- fmap f ( Cont g ) = Cont ( \ k -> g ( k . f ) )
-
-instance Applicative ( Cont r ) where
- pure = return
- ( <*> ) = ap
-
-instance Monad ( Cont r ) where
- return a = Cont ( \ k z -> z ( k a ) )
- Cont g >>= f = Cont ( \ k -> g ( \ a -> getCont ( f a ) k id ) )
-
-runCont :: Cont r a -> ( a -> r ) -> r
-runCont ( Cont g ) = flip g id
-
-idCont :: Cont a a -> a
-idCont = flip runCont id
-
-mapCont :: ( r -> r ) -> Cont r a -> Cont r a
-mapCont f ( Cont g ) = Cont ( \ k -> g ( f . k ) )
-
-
-withCont :: ( ( b -> r ) -> ( a -> r ) ) -> Cont r a -> Cont r b
-withCont f ( Cont g ) = Cont ( g . f )
-
-
-instance MonadCont ( Cont r ) where
- callCC f = Cont ( \ k -> getCont ( f ( \ a -> Cont ( \ _ h -> ( h . k ) a ) ) ) k )
-
-shift :: ( ( a -> Cont s r ) -> Cont r r ) -> Cont r a
-shift f = Cont ( \ k -> getCont ( f ( \ a -> Cont ( \ e h -> ( h . e . k ) a ) ) ) id )
-
-reset :: Cont a a -> Cont r a
-reset m = Cont ( \ k z -> ( z . k ) ( runCont m id ) )
-
-
-newtype Cont' r a = Cont' { getCont' :: Codensity ( Const r ) a }
- deriving ( Functor , Applicative , Monad )
-
-instance MonadCont ( Cont' r ) where
- callCC f = Cont' ( Codensity ( \ k -> getCodensity ( getCont' ( f ( \ a -> Cont' ( Codensity ( \ _ -> Const ( getConst ( ( k a ) ) ) ) ) ) ) ) k ) )
-
-runCont' :: Cont' r a -> ( a -> r ) -> r
-runCont' ( Cont' f ) k = getConst ( getCodensity f ( Const . k ) )
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-Cont.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-Identity.html 1
-
-
-
-
-src/Control/Monad/CPS/Identity.hs
-
-
-
-module Control . Monad . CPS . Identity
- ( Identity ( Identity , getIdentity )
- , runIdentity
- ) where
-
-import Control . Monad
-import Control . Applicative
-
-newtype Identity a = Identity { getIdentity :: forall o . ( a -> o ) -> o }
-
-instance Functor Identity where
-
- fmap f ( Identity g ) = Identity ( \ k -> g ( k . f ) )
-
-instance Applicative Identity where
- pure = return
- ( <*> ) = ap
-
-instance Monad Identity where
- return a = Identity ( \ k -> k a )
- Identity g >>= f = Identity ( \ k -> g ( \ a -> getIdentity ( f a ) k ) )
-
-runIdentity :: Identity a -> a
-runIdentity ( Identity f ) = f id
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-Identity.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-Maybe.html 1
-
-
-
-
-src/Control/Monad/CPS/Maybe.hs
-
-
-
-module Control . Monad . CPS . Maybe
- ( Maybe' ( Maybe' , getMaybe' )
- , runMaybe'
- ) where
-
-import Control . Applicative
-import Control . Monad
-
-newtype Maybe' a = Maybe' { getMaybe' :: forall o . ( a -> o ) -> o -> o }
-
-runMaybe' :: Maybe' a -> ( a -> b ) -> b -> b
-runMaybe' = getMaybe'
-
-instance Functor Maybe' where
- fmap f ( Maybe' g ) = Maybe' ( \ k -> g ( k . f ) )
-
-instance Applicative Maybe' where
- pure = return
- ( <*> ) = ap
-
-instance Monad Maybe' where
- return a = Maybe' ( \ k _ -> k a )
- Maybe' f >>= g = Maybe' ( \ k z -> f ( \ a -> getMaybe' ( g a ) k z ) z )
-
-
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-Maybe.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-RWS.html 1
-
-
-
-
-src/Control/Monad/CPS/RWS.hs
-
-
-
-
-module Control . Monad . CPS . RWS
- ( RWS ( RWS , getRWS )
- , module Control . Monad . RWS . Class
- , runRWS
- ) where
-
-import Data . Monoid ( Monoid ( .. ) )
-import Control . Applicative
-import Control . Monad
-import Control . Monad . RWS . Class
-
-newtype RWS r w s a = RWS { getRWS :: forall o . ( a -> w -> s -> o ) -> r -> s -> o }
-
-instance Monoid w => Functor ( RWS r w s ) where
- fmap f ( RWS g ) = RWS ( \ k -> g ( \ a -> k ( f a ) ) )
-
-instance Monoid w => Applicative ( RWS r w s ) where
- pure = return
- ( <*> ) = ap
-
-instance Monoid w => Monad ( RWS r w s ) where
- return a = RWS ( \ k _ -> k a mempty )
- RWS g >>= f = RWS ( \ k r -> g ( \ a w -> getRWS ( f a ) ( \ b w' -> k b ( w `mappend` w' ) ) r ) r )
-
-runRWS :: RWS r w s a -> r -> s -> ( a , w , s )
-runRWS ( RWS f ) = f (,,)
-
-instance Monoid w => MonadState s ( RWS r w s ) where
- get = RWS ( \ k r s -> k s mempty s )
- put s = RWS ( \ k _ _ -> k () mempty s )
-
-instance Monoid w => MonadWriter w ( RWS r w s ) where
- tell w = RWS ( \ k _ -> k () w )
- listen ( RWS f ) = RWS ( \ k -> f ( \ a w -> k ( a , w ) w ) )
- pass ( RWS f ) = RWS ( \ k -> f ( \ ( a , p ) w -> k a ( p w ) ) )
-
-instance Monoid w => MonadReader r ( RWS r w s ) where
- ask = RWS ( \ k r -> k r mempty )
- local f ( RWS g ) = RWS ( \ k r -> g k ( f r ) )
-
-instance Monoid w => MonadRWS r w s ( RWS r w s )
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-RWS.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-Ran.html 1
-
-
-
-
-src/Control/Monad/CPS/Ran.hs
-
-
-
-module Control . Monad . CPS . Ran
- ( Ran ( Ran , getRan )
- ) where
-
-newtype Ran g h a = Ran { getRan :: forall b . ( a -> g b ) -> h b }
-
-instance Functor ( Ran g h ) where
- fmap f m = Ran ( \ k -> getRan m ( k . f ) )
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-Ran.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-Reader.html 1
-
-
-
-
-src/Control/Monad/CPS/Reader.hs
-
-
-
-module Control . Monad . CPS . Reader
- ( module Control . Monad . Reader . Class
- , Reader ( Reader , getReader )
- , runReader
- ) where
-
-import Control . Applicative
-import Control . Monad
-import Control . Monad . Reader . Class
-
-newtype Reader r a = Reader { getReader :: forall o . ( a -> o ) -> r -> o }
-
-instance Functor ( Reader r ) where
- fmap f ( Reader g ) = Reader ( \ k -> g ( \ a -> k ( f a ) ) )
-
-instance Monad ( Reader r ) where
- return a = Reader ( \ k _ -> k a )
- Reader g >>= f = Reader ( \ k r -> g ( \ a -> getReader ( f a ) k r ) r )
-
-runReader :: Reader r a -> r -> a
-runReader ( Reader g ) = g id
-
-instance MonadReader r ( Reader r ) where
- ask = Reader id
- local f ( Reader g ) = Reader ( \ k -> g k . f )
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-Reader.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-State.html 1
-
-
-
-
-src/Control/Monad/CPS/State.hs
-
-
-
-
-module Control . Monad . CPS . State
- ( module Control . Monad . State . Class
- , State
- , runState
- , State'
- , runState'
- ) where
-
-import Control . Monad
-import Control . Monad . CPS . Codensity
-import Control . Monad . State . Class
-import Control . Applicative
-
-newtype State s a = State { getState :: forall o . ( a -> s -> o ) -> s -> o }
-
-instance Functor ( State s ) where
- fmap f ( State g ) = State ( \ k -> g ( \ a -> k ( f a ) ) )
-
-instance Applicative ( State s ) where
- pure = return
- ( <*> ) = ap
-
-instance Monad ( State s ) where
- return a = State ( \ k -> k a )
- State g >>= f = State ( \ k -> g ( \ a -> getState ( f a ) k ) )
-
-runState :: State s a -> s -> ( a , s )
-runState ( State g ) = g (,)
-
-instance MonadState s ( State s ) where
- get = State ( \ k s -> k s s )
- put s = State ( \ k _ -> k () s )
-
-newtype State' s a = State' { getState' :: Codensity ( ( -> ) s ) a }
- deriving ( Functor , Applicative , Monad )
-
-instance MonadState s ( State' s ) where
- get = State' ( Codensity ( \ k s -> k s s ) )
- put s = State' ( Codensity ( \ k s -> k () s ) )
-
-runState' :: State' s a -> s -> ( a , s )
-runState' = flip getCodensity (,) . getState'
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-State.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS-Writer.html 1
-
-
-
-
-src/Control/Monad/CPS/Writer.hs
-
-
-
-
-module Control . Monad . CPS . Writer
- ( module Control . Monad . Writer . Class
- , Writer ( Writer , getWriter )
- , runWriter
- , Writer'
- , runWriter'
- ) where
-
-import Control . Applicative
-import Control . Monad
-import Control . Monad . Writer . Class
-import Data . Monoid ( Monoid ( .. ) )
-
-
-newtype Writer w a = Writer { getWriter :: forall o . ( a -> w -> o ) -> o }
-
-instance Functor ( Writer w ) where
- fmap f ( Writer g ) = Writer ( \ k -> g ( \ a w -> k ( f a ) w ) )
-
-instance Monoid w => Applicative ( Writer w ) where
- pure = return
- ( <*> ) = ap
-
-instance Monoid w => Monad ( Writer w ) where
- return a = Writer ( \ k -> k a mempty )
- Writer g >>= f = Writer ( \ k -> g ( \ a w -> getWriter ( f a ) ( \ a w' -> k a ( w `mappend` w' ) ) ) )
-
-runWriter :: Writer w a -> ( a , w )
-runWriter ( Writer g ) = g (,)
-
-instance Monoid w => MonadWriter w ( Writer w ) where
- tell w = Writer ( \ k -> k () w )
- listen ( Writer f ) = Writer ( \ g -> f ( \ a w -> g ( a , w ) w ) )
- pass ( Writer f ) = Writer ( \ g -> f ( \ ( a , p ) w -> g a ( p w ) ) )
-
-
-newtype Writer' w a = Writer' { getWriter' :: forall o . ( a -> w -> o ) -> w -> o }
-
-instance Monoid w => Functor ( Writer' w ) where
- fmap f ( Writer' g ) = Writer' ( \ k -> g ( \ a -> k ( f a ) ) )
-
-instance Monoid w => Applicative ( Writer' w ) where
- pure = return
- ( <*> ) = ap
-
-instance Monoid w => Monad ( Writer' w ) where
- return a = Writer' ( \ k -> k a )
- Writer' g >>= f = Writer' ( \ k -> g ( \ a -> getWriter' ( f a ) k ) )
-
-runWriter' :: Monoid w => Writer' w a -> ( a , w )
-runWriter' ( Writer' g ) = g (,) mempty
-
-instance Monoid w => MonadWriter w ( Writer' w ) where
- tell w' = Writer' ( \ k w -> k () ( w `mappend` w' ) )
- listen ( Writer' f ) = Writer' ( \ k -> f ( \ a w -> k ( a , w ) w ) )
- pass ( Writer' f ) = Writer' ( \ k -> f ( \ ( a , p ) w -> k a ( p w ) ) )
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS-Writer.html
hunk ./doc/html/monad-cps/src/Control-Monad-CPS.html 1
-
-
-
-
-src/Control/Monad/CPS.hs
-
-
-
-module Control . Monad . CPS
- ( module Control . Monad . CPS . Codensity
- , module Control . Monad . CPS . Cont
- , module Control . Monad . CPS . Identity
- , module Control . Monad . CPS . Maybe
- , module Control . Monad . CPS . Ran
- , module Control . Monad . CPS . Reader
- , module Control . Monad . CPS . State
- , module Control . Monad . CPS . Writer
- ) where
-
-import Control . Monad . CPS . Codensity
-import Control . Monad . CPS . Cont
-import Control . Monad . CPS . Identity
-import Control . Monad . CPS . Maybe
-import Control . Monad . CPS . Ran
-import Control . Monad . CPS . Reader
-import Control . Monad . CPS . State
-import Control . Monad . CPS . Writer
-
-
rmfile ./doc/html/monad-cps/src/Control-Monad-CPS.html
hunk ./doc/html/monad-cps/src/hscolour.css 1
-.hs-keyglyph, .hs-layout {color: red;}
-.hs-keyword {color: blue;}
-.hs-comment, .hs-comment a {color: green;}
-.hs-str, .hs-chr {color: teal;}
-.hs-keyword, .hs-conid, .hs-varid, .hs-conop, .hs-varop, .hs-num, .hs-cpp, .hs-sel, .hs-definition {}
rmfile ./doc/html/monad-cps/src/hscolour.css
rmdir ./doc/html/monad-cps/src
rmdir ./doc/html/monad-cps
adddir ./doc/html/monad-ran
adddir ./doc/html/monad-ran/src
addfile ./doc/html/monad-ran/Control-Monad-Ran-Codensity.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-Codensity.html 1
+
+
+Control.Monad.Ran.Codensity monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Control.Monad.Ran.Codensity
Documentation Constructors Codensity getCodensity :: forall o. (a -> f o) -> f o
Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran-Cont.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-Cont.html 1
+
+
+Control.Monad.Ran.Cont monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Documentation Instances
Constructors Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran-Identity.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-Identity.html 1
+
+
+Control.Monad.Ran.Identity monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Control.Monad.Ran.Identity
Documentation Constructors Identity' getIdentity' :: forall o. (a -> o) -> o
Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran-Maybe.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-Maybe.html 1
+
+
+Control.Monad.Ran.Maybe monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Documentation Constructors Maybe' getMaybe' :: forall o. (a -> o) -> o -> o
Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran-RWS.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-RWS.html 1
+
+
+Control.Monad.Ran.RWS monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Documentation Constructors RWS getRWS :: forall o. (a -> w -> s -> o) -> r -> s -> o
Instances
runRWS :: RWS r w s a -> r -> s -> (a, w, s)Source
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran-Reader.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-Reader.html 1
+
+
+Control.Monad.Ran.Reader monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Documentation Constructors Reader getReader :: forall o. (a -> o) -> r -> o
Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran-State.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-State.html 1
+
+
+Control.Monad.Ran.State monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Documentation Instances
Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran-Writer.html
hunk ./doc/html/monad-ran/Control-Monad-Ran-Writer.html 1
+
+
+Control.Monad.Ran.Writer monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Documentation Constructors Writer getWriter :: forall o. (a -> w -> o) -> o
Instances
Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/Control-Monad-Ran.html
hunk ./doc/html/monad-ran/Control-Monad-Ran.html 1
+
+
+Control.Monad.Ran monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Source code Contents Index
Synopsis Documentation the right Kan extension of h along g
+ Constructors Ran getRan :: forall b. (a -> g b) -> h b
Instances
class RanIso g h m | m -> g h where Source
Methods Instances
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/doc-index.html
hunk ./doc/html/monad-ran/doc-index.html 1
+
+
+monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions (Index) monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Contents Index
ask Control.Monad.Ran.RWS, Control.Monad.Ran.Reader asks Control.Monad.Ran.RWS, Control.Monad.Ran.Reader callCC Control.Monad.Ran.Cont censor Control.Monad.Ran.Writer, Control.Monad.Ran.RWS Codensity 1 (Type/Class) Control.Monad.Ran.Codensity 2 (Data Constructor) Control.Monad.Ran.Codensity Cont Control.Monad.Ran.Cont Cont' 1 (Type/Class) Control.Monad.Ran.Cont 2 (Data Constructor) Control.Monad.Ran.Cont fromRan Control.Monad.Ran get Control.Monad.Ran.RWS, Control.Monad.Ran.State getCodensity Control.Monad.Ran.Codensity getCont' Control.Monad.Ran.Cont getIdentity' Control.Monad.Ran.Identity getMaybe' Control.Monad.Ran.Maybe getRan Control.Monad.Ran getReader Control.Monad.Ran.Reader getRWS Control.Monad.Ran.RWS gets Control.Monad.Ran.RWS, Control.Monad.Ran.State getWriter Control.Monad.Ran.Writer idCont Control.Monad.Ran.Cont Identity' 1 (Type/Class) Control.Monad.Ran.Identity 2 (Data Constructor) Control.Monad.Ran.Identity listen Control.Monad.Ran.Writer, Control.Monad.Ran.RWS listens Control.Monad.Ran.Writer, Control.Monad.Ran.RWS local Control.Monad.Ran.RWS, Control.Monad.Ran.Reader mapCont Control.Monad.Ran.Cont Maybe' 1 (Type/Class) Control.Monad.Ran.Maybe 2 (Data Constructor) Control.Monad.Ran.Maybe modify Control.Monad.Ran.RWS, Control.Monad.Ran.State MonadCont Control.Monad.Ran.Cont MonadReader Control.Monad.Ran.RWS, Control.Monad.Ran.Reader MonadRWS Control.Monad.Ran.RWS MonadState Control.Monad.Ran.RWS, Control.Monad.Ran.State MonadWriter Control.Monad.Ran.Writer, Control.Monad.Ran.RWS pass Control.Monad.Ran.Writer, Control.Monad.Ran.RWS put Control.Monad.Ran.RWS, Control.Monad.Ran.State Ran 1 (Type/Class) Control.Monad.Ran 2 (Data Constructor) Control.Monad.Ran RanIso Control.Monad.Ran Reader 1 (Type/Class) Control.Monad.Ran.Reader 2 (Data Constructor) Control.Monad.Ran.Reader reset Control.Monad.Ran.Cont runCodensity Control.Monad.Ran.Codensity runCodensityApp Control.Monad.Ran.Codensity runCont Control.Monad.Ran.Cont runCont' Control.Monad.Ran.Cont runIdentity' Control.Monad.Ran.Identity runMaybe' Control.Monad.Ran.Maybe runReader Control.Monad.Ran.Reader runRWS Control.Monad.Ran.RWS runState Control.Monad.Ran.State runState' Control.Monad.Ran.State runWriter Control.Monad.Ran.Writer runWriter' Control.Monad.Ran.Writer RWS 1 (Type/Class) Control.Monad.Ran.RWS 2 (Data Constructor) Control.Monad.Ran.RWS shift Control.Monad.Ran.Cont State Control.Monad.Ran.State State' Control.Monad.Ran.State tell Control.Monad.Ran.Writer, Control.Monad.Ran.RWS toRan Control.Monad.Ran withCont Control.Monad.Ran.Cont Writer 1 (Type/Class) Control.Monad.Ran.Writer 2 (Data Constructor) Control.Monad.Ran.Writer Writer' Control.Monad.Ran.Writer
addfile ./doc/html/monad-ran/haddock-util.js
hunk ./doc/html/monad-ran/haddock-util.js 1
+// Haddock JavaScript utilities
+function toggle(button,id)
+{
+ var n = document.getElementById(id).style;
+ if (n.display == "none")
+ {
+ button.src = "minus.gif";
+ n.display = "block";
+ }
+ else
+ {
+ button.src = "plus.gif";
+ n.display = "none";
+ }
+}
+
+
+var max_results = 75; // 50 is not enough to search for map in the base libraries
+var shown_range = null;
+var last_search = null;
+
+function quick_search()
+{
+ perform_search(false);
+}
+
+function full_search()
+{
+ perform_search(true);
+}
+
+
+function perform_search(full)
+{
+ var text = document.getElementById("searchbox").value.toLowerCase();
+ if (text == last_search && !full) return;
+ last_search = text;
+
+ var table = document.getElementById("indexlist");
+ var status = document.getElementById("searchmsg");
+ var children = table.firstChild.childNodes;
+
+ // first figure out the first node with the prefix
+ var first = bisect(-1);
+ var last = (first == -1 ? -1 : bisect(1));
+
+ if (first == -1)
+ {
+ table.className = "";
+ status.innerHTML = "No results found, displaying all";
+ }
+ else if (first == 0 && last == children.length - 1)
+ {
+ table.className = "";
+ status.innerHTML = "";
+ }
+ else if (last - first >= max_results && !full)
+ {
+ table.className = "";
+ status.innerHTML = "More than " + max_results + ", press Search to display";
+ }
+ else
+ {
+ // decide what you need to clear/show
+ if (shown_range)
+ setclass(shown_range[0], shown_range[1], "indexrow");
+ setclass(first, last, "indexshow");
+ shown_range = [first, last];
+ table.className = "indexsearch";
+ status.innerHTML = "";
+ }
+
+
+ function setclass(first, last, status)
+ {
+ for (var i = first; i <= last; i++)
+ {
+ children[i].className = status;
+ }
+ }
+
+
+ // do a binary search, treating 0 as ...
+ // return either -1 (no 0's found) or location of most far match
+ function bisect(dir)
+ {
+ var first = 0, finish = children.length - 1;
+ var mid, success = false;
+
+ while (finish - first > 3)
+ {
+ mid = Math.floor((finish + first) / 2);
+
+ var i = checkitem(mid);
+ if (i == 0) i = dir;
+ if (i == -1)
+ finish = mid;
+ else
+ first = mid;
+ }
+ var a = (dir == 1 ? first : finish);
+ var b = (dir == 1 ? finish : first);
+ for (var i = b; i != a - dir; i -= dir)
+ {
+ if (checkitem(i) == 0) return i;
+ }
+ return -1;
+ }
+
+
+ // from an index, decide what the result is
+ // 0 = match, -1 is lower, 1 is higher
+ function checkitem(i)
+ {
+ var s = getitem(i).toLowerCase().substr(0, text.length);
+ if (s == text) return 0;
+ else return (s > text ? -1 : 1);
+ }
+
+
+ // from an index, get its string
+ // this abstracts over alternates
+ function getitem(i)
+ {
+ for ( ; i >= 0; i--)
+ {
+ var s = children[i].firstChild.firstChild.data;
+ if (s.indexOf(' ') == -1)
+ return s;
+ }
+ return ""; // should never be reached
+ }
+}
addfile ./doc/html/monad-ran/haddock.css
hunk ./doc/html/monad-ran/haddock.css 1
+/* -------- Global things --------- */
+
+BODY {
+ background-color: #ffffff;
+ color: #000000;
+ font-family: sans-serif;
+ }
+
+A:link { color: #0000e0; text-decoration: none }
+A:visited { color: #0000a0; text-decoration: none }
+A:hover { background-color: #e0e0ff; text-decoration: none }
+
+TABLE.vanilla {
+ width: 100%;
+ border-width: 0px;
+ /* I can't seem to specify cellspacing or cellpadding properly using CSS... */
+}
+
+TABLE.vanilla2 {
+ border-width: 0px;
+}
+
+/* font is a little too small in MSIE */
+TT { font-size: 100%; }
+PRE { font-size: 100%; }
+
+LI P { margin: 0pt }
+
+TD {
+ border-width: 0px;
+}
+
+TABLE.narrow {
+ border-width: 0px;
+}
+
+TD.s8 { height: 8px; }
+TD.s15 { height: 15px; }
+
+SPAN.keyword { text-decoration: underline; }
+
+/* Resize the buttom image to match the text size */
+IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em }
+
+/* --------- Contents page ---------- */
+
+DIV.node {
+ padding-left: 3em;
+}
+
+DIV.cnode {
+ padding-left: 1.75em;
+}
+
+SPAN.pkg {
+ position: absolute;
+ left: 50em;
+}
+
+/* --------- Documentation elements ---------- */
+
+TD.children {
+ padding-left: 25px;
+ }
+
+TD.synopsis {
+ padding: 2px;
+ background-color: #f0f0f0;
+ font-family: monospace
+ }
+
+TD.decl {
+ padding: 2px;
+ background-color: #f0f0f0;
+ font-family: monospace;
+ vertical-align: top;
+ }
+
+TD.topdecl {
+ padding: 2px;
+ background-color: #f0f0f0;
+ font-family: monospace;
+ vertical-align: top;
+}
+
+TABLE.declbar {
+ border-spacing: 0px;
+ }
+
+TD.declname {
+ width: 100%;
+ }
+
+TD.declbut {
+ padding-left: 5px;
+ padding-right: 5px;
+ border-left-width: 1px;
+ border-left-color: #000099;
+ border-left-style: solid;
+ white-space: nowrap;
+ font-size: small;
+ }
+
+/*
+ arg is just like decl, except that wrapping is not allowed. It is
+ used for function and constructor arguments which have a text box
+ to the right, where if wrapping is allowed the text box squashes up
+ the declaration by wrapping it.
+*/
+TD.arg {
+ padding: 2px;
+ background-color: #f0f0f0;
+ font-family: monospace;
+ vertical-align: top;
+ white-space: nowrap;
+ }
+
+TD.recfield { padding-left: 20px }
+
+TD.doc {
+ padding-top: 2px;
+ padding-left: 10px;
+ }
+
+TD.ndoc {
+ padding: 2px;
+ }
+
+TD.rdoc {
+ padding: 2px;
+ padding-left: 10px;
+ width: 100%;
+ }
+
+TD.body {
+ padding-left: 10px
+ }
+
+TD.pkg {
+ width: 100%;
+ padding-left: 10px
+}
+
+TABLE.indexsearch TR.indexrow {
+ display: none;
+}
+TABLE.indexsearch TR.indexshow {
+ display: table-row;
+}
+
+TD.indexentry {
+ vertical-align: top;
+ padding-right: 10px
+ }
+
+TD.indexannot {
+ vertical-align: top;
+ padding-left: 20px;
+ white-space: nowrap
+ }
+
+TD.indexlinks {
+ width: 100%
+ }
+
+/* ------- Section Headings ------- */
+
+TD.section1 {
+ padding-top: 15px;
+ font-weight: bold;
+ font-size: 150%
+ }
+
+TD.section2 {
+ padding-top: 10px;
+ font-weight: bold;
+ font-size: 130%
+ }
+
+TD.section3 {
+ padding-top: 5px;
+ font-weight: bold;
+ font-size: 110%
+ }
+
+TD.section4 {
+ font-weight: bold;
+ font-size: 100%
+ }
+
+/* -------------- The title bar at the top of the page */
+
+TD.infohead {
+ color: #ffffff;
+ font-weight: bold;
+ padding-right: 10px;
+ text-align: left;
+}
+
+TD.infoval {
+ color: #ffffff;
+ padding-right: 10px;
+ text-align: left;
+}
+
+TD.topbar {
+ background-color: #000099;
+ padding: 5px;
+}
+
+TD.title {
+ color: #ffffff;
+ padding-left: 10px;
+ width: 100%
+ }
+
+TD.topbut {
+ padding-left: 5px;
+ padding-right: 5px;
+ border-left-width: 1px;
+ border-left-color: #ffffff;
+ border-left-style: solid;
+ white-space: nowrap;
+ }
+
+TD.topbut A:link {
+ color: #ffffff
+ }
+
+TD.topbut A:visited {
+ color: #ffff00
+ }
+
+TD.topbut A:hover {
+ background-color: #6060ff;
+ }
+
+TD.topbut:hover {
+ background-color: #6060ff
+ }
+
+TD.modulebar {
+ background-color: #0077dd;
+ padding: 5px;
+ border-top-width: 1px;
+ border-top-color: #ffffff;
+ border-top-style: solid;
+ }
+
+/* --------- The page footer --------- */
+
+TD.botbar {
+ background-color: #000099;
+ color: #ffffff;
+ padding: 5px
+ }
+TD.botbar A:link {
+ color: #ffffff;
+ text-decoration: underline
+ }
+TD.botbar A:visited {
+ color: #ffff00
+ }
+TD.botbar A:hover {
+ background-color: #6060ff
+ }
+
addfile ./doc/html/monad-ran/haskell_icon.gif
binary ./doc/html/monad-ran/haskell_icon.gif
oldhex
*
newhex
*47494638376110001000f70f00000000800000008000808000000080800080008080c0c0c08080
*80ff000000ff00ffff000000ffff00ff00ffffffffff0000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*000000000000000000000000000000000000000000000000000000000000000000000000000000
*0021f90401000000002c000000001000100007086c0001007840b0a0418202073e38b0b021c387
*07143e2440c0a143040e091cd0787021c686151f84347800e343901d4b12646870e44a930d0952
*3ca832a6cc990555b2bc2992e4c79d3847ea2c88b3a7c89a2c8b8aa43874e941a60810003840b5
*aa55aa511346ddca75abc080003b
addfile ./doc/html/monad-ran/index.html
hunk ./doc/html/monad-ran/index.html 1
+
+
+monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions Contents Index
monad-ran-0.0.5: Implementations of common monads and monad transformers as right-kan extensions .
+ Modules Control Monad
Produced by Haddock version 2.3.0
addfile ./doc/html/monad-ran/minus.gif
binary ./doc/html/monad-ran/minus.gif
oldhex
*
newhex
*47494638396109000900910000fefefe8282820202020000002c00000000090009000002118c8f
*a00bc6eb5e0b40583b6596f1a11f14003b
addfile ./doc/html/monad-ran/monad-ran.haddock
binary ./doc/html/monad-ran/monad-ran.haddock
oldhex
*
newhex
*0d0cface000400000000000010960000000000000a1c3000000000000000000000000000000000
*000000000000000100000000000000010000000000000000000000000000000100000000000000
*020000000000000000000000000000000100000000000000030000000000000000000000000000
*000100000000000000040000000000000000000000000000000100000000000000050000000000
*000000000000000000000100000000000000060000000000000000000000000000000200000000
*000000070000000000000000000000000000000200000000000000080000000000000000000000
*0000000002000000000000000900000000000000000000000000000002000000000000000a0000
*0000000000000000000000000003000000000000000b0000000000000000000000000000000300
*0000000000000c00000000000000000000000000000003000000000000000d0000000000000000
*0000000000000003000000000000000e0000000000000000000000000000000400000000000000
*0f0000000000000000000000000000000400000000000000100000000000000000000000000000
*000400000000000000110000000000000000000000000000000400000000000000120000000000
*000000000000000000000500000000000000130000000000000000000000000000000500000000
*000000140000000000000000000000000000000500000000000000150000000000000000000000
*000000000500000000000000160000000000000000000000000000000500000000000000170000
*000000000000000000000000000500000000000000180000000000000000000000000000000600
*0000000000001900000000000000000000000000000006000000000000001a0000000000000000
*0000000000000006000000000000001b0000000000000000000000000000000600000000000000
*1c00000000000000000000000000000006000000000000001d0000000000000000000000000000
*0007000000000000001e00000000000000000000000000000007000000000000001f0000000000
*000000000000000000000700000000000000200000000000000000000000000000000700000000
*000000210000000000000000000000000000000700000000000000220000000000000000000000
*000000000700000000000000230000000000000000000000000000000700000000000000240000
*000000000000000000000000000700000000000000250000000000000000000000000000000700
*000000000000260000000000000000000000000000000700000000000000270000000000000000
*000000000000000700000000000000280000000000000000000000000000000800000000000000
*2900000000000000000000000000000008000000000000002a0000000000000000000000000000
*0008000000000000002b00000000000000000000000000000008000000000000002c0000000000
*0000000000000000000009000000000000002d0000000000000000000000000000000900000000
*0000002e00000000000000000000000000000009000000000000002f0000000000000000000000
*0000000009090000000000000000000000000000000100000000000c0000000000000030000000
*000000003100000000000000320000000000000033000000000000003400000000000000350000
*000000000000000000000000000100000000000000020000000000000003000000000000000400
*000000000000050600000000000000010000000000000002000000000000000300000000000000
*040000000000000000000000000000000500000000000000000000000000000002000000000014
*000000000000003600000000000000370000000000000038000000000000003900000000000000
*3a000000000000003b000000000000003c000000000000003d000000000000003e000000000000
*003f00000000000000300000000000000031000000000000003200000000000000330000000000
*000034000000000000003500000000000000060000000000000007000000000000000800000000
*000000090400000000000000060000000000000007000000000000000800000000000000090000
*000000000000000000000000000300000000000800000000000000370000000000000038000000
*0000000039000000000000003a000000000000000a000000000000000b000000000000000c0000
*00000000000d04000000000000000a000000000000000b000000000000000c000000000000000d
*00000000000000000000000000000004000000000004000000000000000e000000000000000f00
*00000000000010000000000000001104000000000000000e000000000000000f00000000000000
*100000000000000011000000000000000000000000000000050000000001000000000000001503
*01021b000000740000006800000065000000200000007200000069000000670000006800000074
*000000200000004b000000610000006e0000002000000065000000780000007400000065000000
*6e00000073000000690000006f0000006e000000200000006f0000006600000020010702010000
*006801020700000020000000610000006c0000006f0000006e0000006700000020010702010000
*006702010000000a06000000000000001200000000000000130000000000000014000000000000
*001500000000000000160000000000000017060000000000000015000000000000001600000000
*000000170000000000000012000000000000001300000000000000140000000000000000000000
*000000000600000000000500000000000000180000000000000019000000000000001a00000000
*0000001b000000000000001c0500000000000000180000000000000019000000000000001a0000
*00000000001b000000000000001c0000000000000000000000000000000700000000000d000000
*00000000400000000000000041000000000000001d000000000000001e000000000000001f0000
*000000000020000000000000002100000000000000220000000000000023000000000000002400
*00000000000025000000000000002600000000000000270b000000000000002000000000000000
*210000000000000022000000000000002300000000000000240000000000000025000000000000
*0026000000000000001d000000000000001e000000000000001f00000000000000270000000000
*0000000000000000000008000000000009000000000000003b000000000000003c000000000000
*003d000000000000003e000000000000003f000000000000002800000000000000290000000000
*00002a000000000000002b040000000000000029000000000000002a0000000000000028000000
*000000002b00000000000000000000000000000009000000000004000000000000002c00000000
*0000002d000000000000002e000000000000002f04000000000000002c000000000000002d0000
*00000000002e000000000000002f00000000000000420000000000000000000000000000000103
*000000000000000a0000000000000000000000000000000103000000000000000b000000000000
*0000000000000000000101000000000000000b0000000000000000000000000000000100000000
*000000000c0000000000000000000000000000000100000000000000000d000000000000000000
*0000000000000100000000000000000e0000000000000000000000000000000203000000000000
*000f0000000000000000000000000000000201000000000000000f000000000000000000000000
*000000020000000000000000100000000000000000000000000000000200000000000000001100
*000000000000000000000000000003030000000000000012000000000000000000000000000000
*030100000000000000120000000000000000000000000000000300000000000000001300000000
*000000000000000000000003000000000000000014000000000000000000000000000000040300
*000000000000150000000000000000000000000000000401000000000000001500000000000000
*000000000000000004000000000000000016000000000000000000000000000000040000000000
*000000170000000000000000000000000000000503000000000000001800000000000000000000
*000000000005000000000000000019000000000000000000000000000000050000000000000000
*1a0000000000000000000000000000000503000000000000001b00000000000000000000000000
*00000501000000000000001b0000000000000000000000000000000500000000000000001c0000
*000000000000000000000000000603000000000000001d00000000000000000000000000000006
*01000000000000001d0000000000000000000000000000000600000000000000001e0000000000
*000000000000000000000600000000000000001f00000000000000000000000000000006000000
*000000000020000000000000000000000000000000070300000000000000210000000000000000
*000000000000000701000000000000002100000000000000000000000000000007000000000000
*000022000000000000000000000000000000070300000000000000230000000000000000000000
*000000000700000000000000002400000000000000000000000000000007000000000000000025
*000000000000000000000000000000070000000000000000260000000000000000000000000000
*000700000000000000002700000000000000000000000000000007000000000000000028000000
*000000000000000000000000070000000000000000290000000000000000000000000000000700
*000000000000002a0000000000000000000000000000000803000000000000002b000000000000
*0000000000000000000803000000000000002c0000000000000000000000000000000800000000
*000000002d0000000000000000000000000000000800000000000000002e000000000000000000
*0000000000000903000000000000002f0000000000000000000000000000000901000000000000
*002f00000000000000000000000000000009000000000000000030000000000000000000000000
*000000090000000000000000310000000000000032000000000000003300000000000000003400
*000000000000320000000000000033000000000000000035000000000000003200000000000000
*330000000000000000360000000000000032000000000000003300000000000000003700000000
*000000320000000000000033000000000000000038000000000000003200000000000000330300
*000000000000390000000000000032000000000000003a03000000000000003b00000000000000
*32000000000000003c00000000000000003d0000000000000032000000000000003c0000000000
*0000003e0000000000000032000000000000003c00000000000000003f00000000000000320000
*00000000003c030000000000000040000000000000003200000000000000410000000000000000
*420000000000000032000000000000004100000000000000004300000000000000320000000000
*000041000000000000000044000000000000003200000000000000410000000000000000450000
*000000000032000000000000004103000000000000004600000000000000320000000000000047
*000000000000000048000000000000003200000000000000470300000000000000490000000000
*00004a000000000000000f6d6f6e61642d72616e2d302e302e350000000000000018436f6e7472
*6f6c2e4d6f6e61642e52616e2e5772697465720000000000000015436f6e74726f6c2e4d6f6e61
*642e52616e2e5257530000000000000018436f6e74726f6c2e4d6f6e61642e52616e2e52656164
*65720000000000000017436f6e74726f6c2e4d6f6e61642e52616e2e4d61796265000000000000
*0011436f6e74726f6c2e4d6f6e61642e52616e000000000000001b436f6e74726f6c2e4d6f6e61
*642e52616e2e436f64656e736974790000000000000016436f6e74726f6c2e4d6f6e61642e5261
*6e2e436f6e740000000000000017436f6e74726f6c2e4d6f6e61642e52616e2e53746174650000
*00000000001a436f6e74726f6c2e4d6f6e61642e52616e2e4964656e7469747900000000000000
*075772697465722700000000000000065772697465720000000000000009676574577269746572
*000000000000000972756e577269746572000000000000000a72756e5772697465722700000000
*000000035257530000000000000006676574525753000000000000000672756e52575300000000
*000000065265616465720000000000000009676574526561646572000000000000000972756e52
*656164657200000000000000064d617962652700000000000000096765744d6179626527000000
*000000000972756e4d6179626527000000000000000652616e49736f0000000000000005746f52
*616e000000000000000766726f6d52616e000000000000000352616e0000000000000006676574
*52616e0000000000000009436f64656e73697479000000000000000c676574436f64656e736974
*79000000000000000c72756e436f64656e73697479000000000000000f72756e436f64656e7369
*74794170700000000000000005436f6e74270000000000000008676574436f6e74270000000000
*000004436f6e74000000000000000772756e436f6e7400000000000000066964436f6e74000000
*00000000076d6170436f6e74000000000000000877697468436f6e740000000000000005736869
*667400000000000000057265736574000000000000000872756e436f6e74270000000000000006
*53746174652700000000000000055374617465000000000000000872756e537461746500000000
*0000000972756e53746174652700000000000000094964656e7469747927000000000000000c67
*65744964656e7469747927000000000000000c72756e4964656e7469747927000000000000000b
*6d746c2d312e312e302e32000000000000001a436f6e74726f6c2e4d6f6e61642e577269746572
*2e436c617373000000000000000663656e736f7200000000000000076c697374656e7300000000
*000000047061737300000000000000066c697374656e000000000000000474656c6c0000000000
*00000b4d6f6e61645772697465720000000000000017436f6e74726f6c2e4d6f6e61642e525753
*2e436c61737300000000000000084d6f6e6164525753000000000000001a436f6e74726f6c2e4d
*6f6e61642e5265616465722e436c617373000000000000000461736b7300000000000000056c6f
*63616c000000000000000361736b000000000000000b4d6f6e6164526561646572000000000000
*0019436f6e74726f6c2e4d6f6e61642e53746174652e436c617373000000000000000467657473
*00000000000000066d6f6469667900000000000000037075740000000000000003676574000000
*000000000a4d6f6e616453746174650000000000000018436f6e74726f6c2e4d6f6e61642e436f
*6e742e436c617373000000000000000663616c6c434300000000000000094d6f6e6164436f6e74
*
addfile ./doc/html/monad-ran/plus.gif
binary ./doc/html/monad-ran/plus.gif
oldhex
*
newhex
*47494638396109000900910000fefefe8282820202020000002c00000000090009000002148c8f
*a00bb6b29c82ca897b5b7871cfce74085200003b
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-Codensity.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-Codensity.html 1
+
+
+
+
+src/Control/Monad/Ran/Codensity.hs
+
+
+
+module Control . Monad . Ran . Codensity
+ ( Codensity ( Codensity , getCodensity )
+ , runCodensity , runCodensityApp
+ ) where
+
+import Control . Monad
+import Control . Monad . Trans
+import Control . Monad . Ran
+import Control . Applicative
+
+newtype Codensity f a = Codensity { getCodensity :: forall o . ( a -> f o ) -> f o }
+
+instance Functor ( Codensity f ) where
+ fmap f ( Codensity g ) = Codensity ( \ k -> g ( \ a -> k ( f a ) ) )
+
+instance Applicative ( Codensity f ) where
+ pure = return
+ ( <*> ) = ap
+
+instance Monad ( Codensity f ) where
+ return a = Codensity ( \ k -> k a )
+ Codensity g >>= f = Codensity ( \ k -> g ( \ a -> getCodensity ( f a ) k ) )
+
+runCodensity :: Monad f => Codensity f a -> f a
+runCodensity ( Codensity f ) = f return
+
+runCodensityApp :: Applicative f => Codensity f a -> f a
+runCodensityApp ( Codensity f ) = f pure
+
+instance MonadTrans Codensity where
+ lift m = Codensity ( m >>= )
+
+instance RanIso f f ( Codensity f ) where
+ toRan x = Ran ( getCodensity x )
+ fromRan x = Codensity ( getRan x )
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-Cont.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-Cont.html 1
+
+
+
+
+src/Control/Monad/Ran/Cont.hs
+
+
+
+module Control . Monad . Ran . Cont
+ ( Cont
+ , runCont
+ , idCont
+ , mapCont
+ , withCont
+ , shift
+ , reset
+ , Cont' ( .. )
+ , runCont'
+ , module Control . Monad . Cont . Class
+ ) where
+
+import Control . Applicative
+import Control . Monad
+import Control . Monad . Ran . Codensity
+import Unsafe . Coerce
+import Control . Monad . Cont . Class
+
+newtype Cont r a = Cont { getCont :: forall o . ( a -> r ) -> ( r -> o ) -> o }
+
+instance Functor ( Cont r ) where
+ fmap f ( Cont g ) = Cont ( \ k -> g ( k . f ) )
+
+instance Applicative ( Cont r ) where
+ pure = return
+ ( <*> ) = ap
+
+instance Monad ( Cont r ) where
+ return a = Cont ( \ k z -> z ( k a ) )
+ Cont g >>= f = Cont ( \ k -> g ( \ a -> getCont ( f a ) k id ) )
+
+runCont :: Cont r a -> ( a -> r ) -> r
+runCont ( Cont g ) = flip g id
+
+idCont :: Cont a a -> a
+idCont = flip runCont id
+
+mapCont :: ( r -> r ) -> Cont r a -> Cont r a
+mapCont f ( Cont g ) = Cont ( \ k -> g ( f . k ) )
+
+
+withCont :: ( ( b -> r ) -> ( a -> r ) ) -> Cont r a -> Cont r b
+withCont f ( Cont g ) = Cont ( g . f )
+
+
+instance MonadCont ( Cont r ) where
+ callCC f = Cont ( \ k -> getCont ( f ( \ a -> Cont ( \ _ h -> ( h . k ) a ) ) ) k )
+
+shift :: ( ( a -> Cont s r ) -> Cont r r ) -> Cont r a
+shift f = Cont ( \ k -> getCont ( f ( \ a -> Cont ( \ e h -> ( h . e . k ) a ) ) ) id )
+
+reset :: Cont a a -> Cont r a
+reset m = Cont ( \ k z -> ( z . k ) ( runCont m id ) )
+
+
+newtype Cont' r a = Cont' { getCont' :: Codensity ( Const r ) a }
+ deriving ( Functor , Applicative , Monad )
+
+instance MonadCont ( Cont' r ) where
+ callCC f = Cont' ( Codensity ( \ k -> getCodensity ( getCont' ( f ( \ a -> Cont' ( Codensity ( \ _ -> Const ( getConst ( ( k a ) ) ) ) ) ) ) ) k ) )
+
+runCont' :: Cont' r a -> ( a -> r ) -> r
+runCont' ( Cont' f ) k = getConst ( getCodensity f ( Const . k ) )
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-Identity.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-Identity.html 1
+
+
+
+
+src/Control/Monad/Ran/Identity.hs
+
+
+
+module Control . Monad . Ran . Identity
+ ( Identity' ( Identity' , getIdentity' )
+ , runIdentity'
+ ) where
+
+import Control . Monad
+import Control . Monad . Identity
+import Control . Applicative
+import Control . Monad . Ran
+
+newtype Identity' a = Identity' { getIdentity' :: forall o . ( a -> o ) -> o }
+
+instance Functor Identity' where
+ fmap f ( Identity' g ) = Identity' ( \ k -> g ( k . f ) )
+
+instance Applicative Identity' where
+ pure = return
+ ( <*> ) = ap
+
+instance Monad Identity' where
+ return a = Identity' ( \ k -> k a )
+ Identity' g >>= f = Identity' ( \ k -> g ( \ a -> getIdentity' ( f a ) k ) )
+
+runIdentity' :: Identity' a -> a
+runIdentity' ( Identity' f ) = f id
+
+
+instance RanIso Identity Identity Identity' where
+ toRan ( Identity' f ) = Ran ( \ b -> Identity ( f ( runIdentity . b ) ) )
+ fromRan ( Ran f ) = Identity' ( \ b -> runIdentity ( f ( Identity . b ) ) )
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-Maybe.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-Maybe.html 1
+
+
+
+
+src/Control/Monad/Ran/Maybe.hs
+
+
+
+module Control . Monad . Ran . Maybe
+ ( Maybe' ( Maybe' , getMaybe' )
+ , runMaybe'
+ ) where
+
+import Control . Applicative
+import Control . Monad
+
+newtype Maybe' a = Maybe' { getMaybe' :: forall o . ( a -> o ) -> o -> o }
+
+runMaybe' :: Maybe' a -> ( a -> b ) -> b -> b
+runMaybe' = getMaybe'
+
+instance Functor Maybe' where
+ fmap f ( Maybe' g ) = Maybe' ( \ k -> g ( k . f ) )
+
+instance Applicative Maybe' where
+ pure = return
+ ( <*> ) = ap
+
+instance Monad Maybe' where
+ return a = Maybe' ( \ k _ -> k a )
+ Maybe' f >>= g = Maybe' ( \ k z -> f ( \ a -> getMaybe' ( g a ) k z ) z )
+
+
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-RWS.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-RWS.html 1
+
+
+
+
+src/Control/Monad/Ran/RWS.hs
+
+
+
+
+module Control . Monad . Ran . RWS
+ ( RWS ( RWS , getRWS )
+ , module Control . Monad . RWS . Class
+ , runRWS
+ ) where
+
+import Data . Monoid ( Monoid ( .. ) )
+import Control . Applicative
+import Control . Monad
+import Control . Monad . RWS . Class
+
+newtype RWS r w s a = RWS { getRWS :: forall o . ( a -> w -> s -> o ) -> r -> s -> o }
+
+instance Monoid w => Functor ( RWS r w s ) where
+ fmap f ( RWS g ) = RWS ( \ k -> g ( \ a -> k ( f a ) ) )
+
+instance Monoid w => Applicative ( RWS r w s ) where
+ pure = return
+ ( <*> ) = ap
+
+instance Monoid w => Monad ( RWS r w s ) where
+ return a = RWS ( \ k _ -> k a mempty )
+ RWS g >>= f = RWS ( \ k r -> g ( \ a w -> getRWS ( f a ) ( \ b w' -> k b ( w `mappend` w' ) ) r ) r )
+
+runRWS :: RWS r w s a -> r -> s -> ( a , w , s )
+runRWS ( RWS f ) = f (,,)
+
+instance Monoid w => MonadState s ( RWS r w s ) where
+ get = RWS ( \ k r s -> k s mempty s )
+ put s = RWS ( \ k _ _ -> k () mempty s )
+
+instance Monoid w => MonadWriter w ( RWS r w s ) where
+ tell w = RWS ( \ k _ -> k () w )
+ listen ( RWS f ) = RWS ( \ k -> f ( \ a w -> k ( a , w ) w ) )
+ pass ( RWS f ) = RWS ( \ k -> f ( \ ( a , p ) w -> k a ( p w ) ) )
+
+instance Monoid w => MonadReader r ( RWS r w s ) where
+ ask = RWS ( \ k r -> k r mempty )
+ local f ( RWS g ) = RWS ( \ k r -> g k ( f r ) )
+
+instance Monoid w => MonadRWS r w s ( RWS r w s )
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-Reader.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-Reader.html 1
+
+
+
+
+src/Control/Monad/Ran/Reader.hs
+
+
+
+module Control . Monad . Ran . Reader
+ ( module Control . Monad . Reader . Class
+ , Reader ( Reader , getReader )
+ , runReader
+ ) where
+
+import Control . Applicative
+import Control . Monad
+import Control . Monad . Reader . Class
+
+newtype Reader r a = Reader { getReader :: forall o . ( a -> o ) -> r -> o }
+
+instance Functor ( Reader r ) where
+ fmap f ( Reader g ) = Reader ( \ k -> g ( \ a -> k ( f a ) ) )
+
+instance Monad ( Reader r ) where
+ return a = Reader ( \ k _ -> k a )
+ Reader g >>= f = Reader ( \ k r -> g ( \ a -> getReader ( f a ) k r ) r )
+
+runReader :: Reader r a -> r -> a
+runReader ( Reader g ) = g id
+
+instance MonadReader r ( Reader r ) where
+ ask = Reader id
+ local f ( Reader g ) = Reader ( \ k -> g k . f )
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-State.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-State.html 1
+
+
+
+
+src/Control/Monad/Ran/State.hs
+
+
+
+
+module Control . Monad . Ran . State
+ ( module Control . Monad . State . Class
+ , State
+ , runState
+ , State'
+ , runState'
+ ) where
+
+import Control . Monad
+import Control . Monad . Ran . Codensity
+import Control . Monad . State . Class
+import Control . Applicative
+
+newtype State s a = State { getState :: forall o . ( a -> s -> o ) -> s -> o }
+
+instance Functor ( State s ) where
+ fmap f ( State g ) = State ( \ k -> g ( \ a -> k ( f a ) ) )
+
+instance Applicative ( State s ) where
+ pure = return
+ ( <*> ) = ap
+
+instance Monad ( State s ) where
+ return a = State ( \ k -> k a )
+ State g >>= f = State ( \ k -> g ( \ a -> getState ( f a ) k ) )
+
+runState :: State s a -> s -> ( a , s )
+runState ( State g ) = g (,)
+
+instance MonadState s ( State s ) where
+ get = State ( \ k s -> k s s )
+ put s = State ( \ k _ -> k () s )
+
+newtype State' s a = State' { getState' :: Codensity ( ( -> ) s ) a }
+ deriving ( Functor , Applicative , Monad )
+
+instance MonadState s ( State' s ) where
+ get = State' ( Codensity ( \ k s -> k s s ) )
+ put s = State' ( Codensity ( \ k s -> k () s ) )
+
+runState' :: State' s a -> s -> ( a , s )
+runState' = flip getCodensity (,) . getState'
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran-Writer.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran-Writer.html 1
+
+
+
+
+src/Control/Monad/Ran/Writer.hs
+
+
+
+
+module Control . Monad . Ran . Writer
+ ( module Control . Monad . Writer . Class
+ , Writer ( Writer , getWriter )
+ , runWriter
+ , Writer'
+ , runWriter'
+ ) where
+
+import Control . Applicative
+import Control . Monad
+import Control . Monad . Writer . Class
+import Data . Monoid ( Monoid ( .. ) )
+
+
+newtype Writer w a = Writer { getWriter :: forall o . ( a -> w -> o ) -> o }
+
+instance Functor ( Writer w ) where
+ fmap f ( Writer g ) = Writer ( \ k -> g ( \ a w -> k ( f a ) w ) )
+
+instance Monoid w => Applicative ( Writer w ) where
+ pure = return
+ ( <*> ) = ap
+
+instance Monoid w => Monad ( Writer w ) where
+ return a = Writer ( \ k -> k a mempty )
+ Writer g >>= f = Writer ( \ k -> g ( \ a w -> getWriter ( f a ) ( \ a w' -> k a ( w `mappend` w' ) ) ) )
+
+runWriter :: Writer w a -> ( a , w )
+runWriter ( Writer g ) = g (,)
+
+instance Monoid w => MonadWriter w ( Writer w ) where
+ tell w = Writer ( \ k -> k () w )
+ listen ( Writer f ) = Writer ( \ g -> f ( \ a w -> g ( a , w ) w ) )
+ pass ( Writer f ) = Writer ( \ g -> f ( \ ( a , p ) w -> g a ( p w ) ) )
+
+
+newtype Writer' w a = Writer' { getWriter' :: forall o . ( a -> w -> o ) -> w -> o }
+
+instance Monoid w => Functor ( Writer' w ) where
+ fmap f ( Writer' g ) = Writer' ( \ k -> g ( \ a -> k ( f a ) ) )
+
+instance Monoid w => Applicative ( Writer' w ) where
+ pure = return
+ ( <*> ) = ap
+
+instance Monoid w => Monad ( Writer' w ) where
+ return a = Writer' ( \ k -> k a )
+ Writer' g >>= f = Writer' ( \ k -> g ( \ a -> getWriter' ( f a ) k ) )
+
+runWriter' :: Monoid w => Writer' w a -> ( a , w )
+runWriter' ( Writer' g ) = g (,) mempty
+
+instance Monoid w => MonadWriter w ( Writer' w ) where
+ tell w' = Writer' ( \ k w -> k () ( w `mappend` w' ) )
+ listen ( Writer' f ) = Writer' ( \ k -> f ( \ a w -> k ( a , w ) w ) )
+ pass ( Writer' f ) = Writer' ( \ k -> f ( \ ( a , p ) w -> k a ( p w ) ) )
+
+
addfile ./doc/html/monad-ran/src/Control-Monad-Ran.html
hunk ./doc/html/monad-ran/src/Control-Monad-Ran.html 1
+
+
+
+
+src/Control/Monad/Ran.hs
+
+
+
+module Control . Monad . Ran
+ ( Ran ( Ran , getRan )
+ , RanIso , toRan , fromRan
+ ) where
+
+
+newtype Ran g h a = Ran { getRan :: forall b . ( a -> g b ) -> h b }
+
+
+instance Functor ( Ran g h ) where
+ fmap f m = Ran ( \ k -> getRan m ( k . f ) )
+
+runRan :: Ran g h a -> ( a -> g b ) -> h b
+runRan = getRan
+
+
+class RanIso g h m | m -> g h where
+ toRan :: m a -> Ran g h a
+ fromRan :: Ran g h a -> m a
+
+
+
+
addfile ./doc/html/monad-ran/src/hscolour.css
hunk ./doc/html/monad-ran/src/hscolour.css 1
+.hs-keyglyph, .hs-layout {color: red;}
+.hs-keyword {color: blue;}
+.hs-comment, .hs-comment a {color: green;}
+.hs-str, .hs-chr {color: teal;}
+.hs-keyword, .hs-conid, .hs-varid, .hs-conop, .hs-varop, .hs-num, .hs-cpp, .hs-sel, .hs-definition {}
addfile ./monad-ran-0.0.5.tar.gz
binary ./monad-ran-0.0.5.tar.gz
oldhex
*
newhex
*1f8b0800000000000003ed3cfd73da4896f3b3aafc3ff4ed562d620b1883637b2f37718500b175
*6b8317f0f852b55519010254d6072589102737fffbbdf7bad5ea160263c7e35c76e94a45adfe78
*dfddef75eb613f0cec4935b283ea61edb076fcf34f7f403984727a7c4c4f28f927d5ebf5fae9e1
*f1e9abd35730ae5e3f3eadffc48eff0862f26519277604a47c2b9c3c733f48f173fabfb45a9dee
*a0f3ac38501e27af5e6dd2ffd161fd24a7ffc6f1e9c94fec4584f86faeff56b8b88fdcd93c61e6
*b8cc1a8787ffc93a93951d4dd8df7d27498cb5febfb12b3b49d8551845e1ca687a1ea3ee98454e
*ec449f9c49cd30facec48d93c81d2d13370c981d4cd83276981bb0385c4663875a466e6047f76c
*1a467e5c612b3799b330a267b84c0c3f9cb853776c23800ab323872d9cc87793c499b045147e72
*275049e67602ff3900c4f3c2951bccd8380c262e4e8a7192013cbc360c06e5af4ca72a66e13425
*671c4e1ce683250013890d64224c7b147ec22ec13f01612c081377ec5460841b330fe021181569
*30c9510448c79eedfa4e54db44096054a49152026c4e96409d24469020497a3c310242461213cc
*4ec2f1d27782c44e15f633e822849e88f976e244aeedc552ee020aa98c262bcc481ebb8e4bd371
*4060fb0e9266c5b63d66ff1d064e0cb4677da40bc226590c38c4308a81807b3672d082809b9039
*c1045a1d341620c80f13877149810d4e80d24f92c0297473d9c4e13459a11109f362f1c219a37d
*c15417ad2e42cb0ab88dc531e76378610dd8a0f77e78dbec7718d4affbbd5fad76a7cdde7d60c3
*8b0e6bf5ae3ff4adf38b21bbe85db63bfd016b76dbd0da1df6ad7737c35e7f60fca93980997fa2
*8e66f703ebfccf75bf3318b05e9f5957d797160003e8fd66776875061566755b97376dab7b5e61
*0080757b43e3d2bab286306cd8ab10d2f569acf79e5d75faad0b786dbeb32eade107c2f7de1a76
*11d7fb5edf68b2eb667f68b56e2e9b7d767dd3bfee0d3a0cd96a5b83d665d3baeab46b801d30b2
*ceaf9dee900d2e9a97973a9746efb6dbe923e92a8bec5d875d5acd77971d44444cb6ad7ea73544
*6eb25a0b0407e45d568cc175a765410564d1015e9afd0f150173d0f9c70d0c824ed66e5e35cf81
*35f30189804a5a37fdce15920c6218dcbc1b0cade1cdb0c3ce7bbd36c979d0e9ff0a4e6df05fec
*b2372061dd0c3a15a3dd1c3609318000494137d4dfdd0c2c9299d51d76fafd9beba1d5eb9641bd
*b72015a0b10953db24dc5e1759051be9f4fa1f1028ca80645f61b7171d68efa33c49524d14c100
*24d61aaac3001f087068643cb26ee7fcd23aef745b1deced21945b6bd02983aaac010eb0082d28
*1f70de10cba822a0caa0aa62b0155224b3deb366fb570bc9168341f5034b980989ac7521c45d33
*beb737da97972ef9f84fbed7c6f6c8f69e05c703f15fe3f8f03817ffbd7a7574b48fff5ea2a0fb
*7dcdf4226de0c0f8e444e80db51164280706d947551f70f686d56b2707c668e97a936a72bf5060
*0f5c7fe139078607214b10eb48df0dda47b2a73a753dd92dce23882e71666174afce6b6198107a
*0786bd04b71ee97c28616a458b6901561a41293330bc55a650a85ba156752e45c807860f412206
*8a8e82531bf68b7387cfb73318e9d5c6a17f766080a18d5ccf4d54169ccf1072b81479011bf17d
*102e62375619b1506a32348b7984e7838ab89a789047559680ca628c204127cc8e79605ebdb303
*4003d10dea293e30264e3c8edc45a2aab57660a0f84711c4a007103dcde32a0f8dab13372272e2
*688c1db3f9b81ad2dc94c86aaf811d5ce3136701e119eff2138fdb439dfde52fec17a8d0c08c94
*14fbd5d24bdc6b3bb2fd21184ccbb3e3d88113c181c10aca7bcff9ec8e3c07550fa0e2caf66156
*00520fc6cea6717d3bb86b20da8d08b1b3074ab23116dd846d198c5126b6d7260138c1d8dd88f2
*dc01b3b13df78b33e93a2b5c236d8c5a213a2f96e3c88e1d2eb845082170154e464bcfc13e61fe
*b52bd47e0d58d980716d5cad05071e504272ff881941b2f3600ba0278f817e65df8f9c9d47f71d
*1b02fddd87df0e761e3b8065b63b21b7706c70a2831f396ccafbff81932c17356f1e3f238e87ee
*ffea874739ff7f74b4bfff799972c6c02d8751c2daea213ef5d5670c3d1d7bfd9a593d669665c3
*1b38694f6dd8b7afe0ed7bb3b02fdf50f2eb1ffcfcb37f0378fcfd7fe3e8e4707fffff12a548ff
*c2d13d9b1d3c5effafb069afff1728dbf44f81ce3358c1e3f57f7c7874b2d7ff4b9487f58f81ee
*b78583288f6ddfffea27f9ef7f27f5c6e13efe7b89c24f93eb671b3a0199783e36f16039731278
*94a9b582ad561c565812621f7d6749a794d96aee448e6154abec7fe9030fff54f577f516022f31
*decedf32db0b83197b3b7b6b04fc248c90d98ccd990d2126d6bf328e1943d06908c7668f8d6acc
*b459f50cc68dcaf89cb311fb9d11c666213637064c2bfb1e1e6c6ec7770e40a1237b185598f3c9
*811153a482ae5288aec8c16f6b1536ba670bbc987020341ec381d670c57d423a9f9982e2946f94
*c1d4b7176cca7cc183f9cf3b229733e233f38ed5d8b45c368c681908de32be61e41a7be9c03702
*88611863bc26118aa0993e88dbe7f3e60a2da422c4e073d819224e2a57dd1a0930da30be560d56
*cd300df17a2907de73a749361f6901aecf146443419cadaa583672090da59a872921e68cfdd6fb
*8d9d33bfcccc39d52fb06ea3a6c9b4defa6f51b16e1cfa61b498bb63fc3668ef666d862446e099
*96899656e8e31d0b903371c6a20e04cd9839657699fd6e64fa3753039855a42d0014e05d5a8604
*bd661919a61a6f32794719de256644d643f4668a1f955b827a89d9a532bd9a2afdf80efdf45e2a
*e31882f08699125bb9662a18ca84a2b119077fa3577cdf09a968499ba88d53d2009dbf6148520d
*6a394e53b136170b8f3efb7f72d8b4c2d4d71989576d019211cb4c15f162098b57153035f007df
*d47ef9eb599913d260261a70b3c11bcb4ca584b642e657a461137ade4aabdee4d68976a9cc5397
*81a89b99c9ab9492019eebbdb0c253c3cfc65ce4c7c805a12cf1746f186aeb9aafaf4d6cc9159d
*63ad80d8c8499611c24b577c4d3451afcfcecedeb03be81e7b2875335c388168fde76734096a80
*9def73d9a8fefe235f98fd8b959de2bf6f3c033c21fe3f3edec7ff2f5276d3bffc5ef0a493c003
*f17ffd14fa34fd37607c7d1fffbf44d914ff679f88c44940be9bd9c7237439f22d3d1c40acaa8c
*50dfc075eb670471f5ac212f6cac91a72aeec27838d7a1c40859a827c980008c077be9fb578d0f
*e5a811a6478d290bcbe2a9458132d6538017c47b4a3706310aeaf46c00154274c7c3b0b21a5168
*11cf064422ea515c721ae600010a2ce1e33740114ede2e22f10ec832f86730c90bf9f7e9568634
*c9f210f34e1c7d348973c2a61887e88a22a9dbfa789d7e2441306ee4cc0d216b11e54ef071e23a
*0a0a207392e4015436543f18d10950a19ae2a1825871aa9b88a6121edc7d4e8f929a383f97b558
*efb38e4d9c3761d0f6f5bfcbfecf3f743ef51ae8a1fb9f93fa69ceff9f1e9d1eeff7ff97285fab
*7f6697cdeef94df3bcc3aeec993bbeb0e37985dd04a3f0b333192e179e13b33f43ccbed15370e3
*60c24f140e13f643b91dc24df026933fc893f0aae246788336be94ef2d6df528aa23d8ddd968d4
*a69f47edc4c6eed09dd0190a9e66ad863b59b54a4b334bbe99503a31324519d2e448a674150663
*786ab6ed31dff117b04cc14160aa071bd9b3993d73a4b712425dd1662c5ebe66522a72522b3a67
*919fdae0a552a0452e4af4917f12756d2f5f29ee092094f5ad10c5b25a3b9e17e17b84a7924085
*d72a02a7b82c9d6af05742c6dca252fea4cfdac8642664ce2c75945298e68afd2694f61b3497cb
*c29b657a515447977960076565842669405bd9244ae25a022be43ec1abcc5501ef26ea4838a218
*33dbd3e9534dbf33eefe32d691dc15d72f290baffe1e980a3316e5743ac86781b3f9bae0eb0053
*d1f22b24a63c1b16061edeb0dec768cc722d007fa0d171b204f3be2720f8d3057d6594b4a55152
*d746e981c5b15a5f21aad873aba5a44a5c5f2c2575b594768ae51e582aa5675e2b1abcb5a552ca
*c57692abdc1a59674d91b51ed3291a5089527556b0264a3989d2aa10abf7318ba354b43a4a393e
*567285ac2d6556b0624aaadd4b494cb53d71e39ad93c59593577caaa7971ffbf5bfcd7bf1d7cc3
*37c007e2bfc6aba37afefbdff1c93efe7b91f20cf11f18471afc41d5c4744b3c7bdc0ed250ae78
*2698941a0fe227aedb416134b731f67a96682f2324fb44051ce1b612f32f54f0c63f504165936b
*8933ff1265ef0f3b1989aa2826c34eda10b1f24deea510cd36f7b2ddbb148253fc4b4aefc7a248
*8cb8922e261d1aad4761d42542b0910cc14605fb7684fff8f754ae2355839a4ac8f55480f07430
*f1228ef866657b3046d9c100a7987fa058f2c390a198131ca7b17e2c1c04fefe5013d247e992b2
*913bb9bd423a645098d3c27a4c285957eceb41cfb669d2068fb6850f9ec7cd36ad023bbecbdb07
*3e5453f2c2311ca58a568a30275a24d10364485b51e8f877f944b59bff4f13fa9f16043c74ff8f
*ce3e77ff735a6fecfdff4b948d5e3d5579eadad3f792296b746b23df948b1bd9f6d4ebfe14c063
*3d3c7d0c906e5c92413e297bfbaa925de4d1c5254ad11d4a366fdd5d677db41565af99eb96a93f
*85b7fb45c07777d2e0988b00286e798d2279a9af902e3d7311fdf2f8a7746a07404daeaa02609a
*ad0f50e425fcaf3ba16b83acdde53707d21633bbc85da1af8d281405bf4ccfe3e5395a23a450ce
*06a64c8558d0daa85cd6afdb2907649a57348151679a8a61a460bef7a257ca8ee73ff2d47fd0fd
*7fbd71b27effdfd8efff2f52369fea7870b6ed565f58857a8ae34da6f8851e05f154559c830af8
*79efed357ab2c35c1a65d2c184bf7ccd28dbbcff475b6ed253a085a736dec7c3515edff1ec4647
*ab02c8eac92a03f851dbc153acd9c12a1b19e577efb48f6fddeaf149ca44115b2a0b5b19a17139
*a39d5be74409ee0b3812b13def7127b9607e8b00b903fdffb483fed865b7fd9f7e9ffbe41bc007
*f77f08f673fb7ffdd5feef3fbc48d9b8ff93cac5ee4ff592c91f78b9c76bcaa6ce1bbe6d4f973b
*360746db9da8d27e2dea9be375b15f33dac9b2d1129c4cade789f514aa8d94b16f322c057bbe18
*b4bedf8b0edaae447dd7807f0de6a3a2fdb5d98a9f5008d1fd84e898929f98e923bf641740dc4f
*a47d33ee27be94e11f85e8c35ebbf75a8fcd3bc124ac1467e0fffc210c9c89cd3cc7f76dfc186e
*b3200caa17e8058478ff63bfa57f97b26bfe67903cfd03d003fbffd1717dedfee7b0b1cfff7c91
*b225ff3348d2e81feb6a76a77c7327ca0b6c87ca1be6be28aff1dc9d4a184eeca4751c52c2af39
*3afc34cfa7903cb2c6ecd4f1cc87082df7550cb909627bea40bb138d37dc3c29442929a720c348
*e45342f52ba5ef41a5c08745fcb735d103f74f2687599c640a3d22bf146abbfaa002888ff24205
*f3b53c52410af9962f488c5d4e1349915e258754235a491fc576715271273279948b518a583a77
*2ec8480e52e432f5dc457a58996810ecf4864ab48bb1290c9c21cc9b7e2d1565885402d2ba1cbb
*4d2b53d00ade9a8137dd3efc8bfc94f1255564bab8881873a4d88f10c126d246d9d40264337eb8
*c2cc9d2da3140eeed64fb08acc359b80b39dd76aad6b3a53b050b9e8fdc8e6c4d09cc444876578
*1a066d248c339e8d8f756de8aa11737646ed28a81d053d181fd81e6e5e79bb919878afbfa63e52
*1dc031538bf2852983acd5ac40ea137fc514f3a66cfadbb43ca397ff91af78ceffacec6a7eaffc
*995a3766cb2070c64e1cdbd1bdb60195941da894e6ba6395785052aa839854463fb1448d4dc49f
*a592bf75ac28db468594bd45fb255dfdaafe0529e67ad6b8962c2e09d515949bf851b4c7493a03
*6b7c9be1454938976ca762d9b46b945226a665fa595b0659a3719aca8d2fe5efedcc9f50768bff
*e8c3f71f75fe6fd44ff3bfff3f6d1cee7fffff22e519f27f7856c4b68b626e3eea3d31b564219f
*fa4af552aeefc95f120bc3b9cdd4edf243a2340b0437555ea74d95570b223b2535a8202b480676
*02ec7ab229ef2007ccab8ffed1d01ae87c80b72dbc5b9bac44771a3de28a41902be3ba629aa5c0
*f4cf8752889990d5cc1d9eb623262a722948a356b275d638e0b93a4c234e26ebe4b274b211591a
*0da6e768d65052cda1a4d843decb9ad5b3724c3ef6c92e5667ab549483247a720e56e1b080c54d
*c3895d453925a99dd236f59464b8adf9f40afe8903299c1fd161eecbbeeccbbefc8b94ff036146
*3403006a0000
}