https://wiki.haskell.org/index.php?title=Monad_Transformers&feed=atom&action=history
Monad Transformers - Revision history
2024-03-19T09:06:38Z
Revision history for this page on the wiki
MediaWiki 1.35.5
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=62511&oldid=prev
Palik: /* See also */ no domain catamorph.de anymore
2018-06-17T19:37:37Z
<p><span dir="auto"><span class="autocomment">See also: </span> no domain catamorph.de anymore</span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:37, 17 June 2018</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 30:</td>
<td colspan="2" class="diff-lineno">Line 30:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [<del class="diffchange diffchange-inline">http</del>://<del class="diffchange diffchange-inline">catamorph</del>.de/<del class="diffchange diffchange-inline">publications</del>/<del class="diffchange diffchange-inline">2004</del>-<del class="diffchange diffchange-inline">10</del>-<del class="diffchange diffchange-inline">01</del>-<del class="diffchange diffchange-inline">monad</del>-<del class="diffchange diffchange-inline">transformers</del>.<del class="diffchange diffchange-inline">html</del> Monad Transformers Step by Step]</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [<ins class="diffchange diffchange-inline">https</ins>://<ins class="diffchange diffchange-inline">page.mi.fu-berlin</ins>.de/<ins class="diffchange diffchange-inline">scravy</ins>/<ins class="diffchange diffchange-inline">realworldhaskell/materialien/monad</ins>-<ins class="diffchange diffchange-inline">transformers</ins>-<ins class="diffchange diffchange-inline">step</ins>-<ins class="diffchange diffchange-inline">by</ins>-<ins class="diffchange diffchange-inline">step</ins>.<ins class="diffchange diffchange-inline">pdf</ins> Monad Transformers Step by Step]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[All About Monads]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[All About Monads]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
</tr>
</table>
Palik
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=59622&oldid=prev
Oltolm: update link to paper
2015-04-03T09:36:29Z
<p>update link to paper</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:36, 3 April 2015</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 30:</td>
<td colspan="2" class="diff-lineno">Line 30:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [http://<del class="diffchange diffchange-inline">www</del>.<del class="diffchange diffchange-inline">cs.virginia.edu</del>/<del class="diffchange diffchange-inline">~wh5a</del>/<del class="diffchange diffchange-inline">personal/Transformers</del>.<del class="diffchange diffchange-inline">pdf</del> Monad Transformers Step by Step]<del class="diffchange diffchange-inline"> (PDF)</del></div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://<ins class="diffchange diffchange-inline">catamorph</ins>.<ins class="diffchange diffchange-inline">de</ins>/<ins class="diffchange diffchange-inline">publications</ins>/<ins class="diffchange diffchange-inline">2004-10-01-monad-transformers</ins>.<ins class="diffchange diffchange-inline">html</ins> Monad Transformers Step by Step]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[All About Monads]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[All About Monads]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
</tr>
</table>
Oltolm
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=59215&oldid=prev
Freizl: Correct link for Monad Transformers Step by Step
2015-01-18T20:24:00Z
<p>Correct link for Monad Transformers Step by Step</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:24, 18 January 2015</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 30:</td>
<td colspan="2" class="diff-lineno">Line 30:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [http://www.<del class="diffchange diffchange-inline">grabmueller</del>.<del class="diffchange diffchange-inline">de/martin</del>/<del class="diffchange diffchange-inline">www</del>/<del class="diffchange diffchange-inline">pub</del>/Transformers.pdf Monad Transformers Step by Step] (PDF)</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://www.<ins class="diffchange diffchange-inline">cs</ins>.<ins class="diffchange diffchange-inline">virginia.edu</ins>/<ins class="diffchange diffchange-inline">~wh5a</ins>/<ins class="diffchange diffchange-inline">personal</ins>/Transformers.pdf Monad Transformers Step by Step] (PDF)</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[All About Monads]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[All About Monads]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
</tr>
<!-- diff cache key wikidb_haskell:diff:wikidiff2:1.12:old-40846:rev-59215:1.10.0 -->
</table>
Freizl
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=40846&oldid=prev
WillNess: turning all <hask> tags into <code> tags... I dont know how to fix the BUG of <hask> tag where there's NO SPACE after it, totally unreadable!
2011-07-06T11:59:55Z
<p>turning all <hask> tags into <code> tags... I dont know how to fix the BUG of <hask> tag where there's NO SPACE after it, totally unreadable!</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:59, 6 July 2011</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>There are currently several packages that implement similar interfaces to [[Monad Transformers Explained|monad transformers]] (besides an additional package with a similar goal but different API named [[MonadLib]]):</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>There are currently several packages that implement similar interfaces to [[Monad Transformers Explained|monad transformers]] (besides an additional package with a similar goal but different API named [[MonadLib]]):</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/transformers transformers]: provides the classes <<del class="diffchange diffchange-inline">hask</del>>MonadTrans</<del class="diffchange diffchange-inline">hask</del>> and <<del class="diffchange diffchange-inline">hask</del>>MonadIO</<del class="diffchange diffchange-inline">hask</del>>, as well as concrete monad transformers such as <<del class="diffchange diffchange-inline">hask</del>>StateT</<del class="diffchange diffchange-inline">hask</del>>. The monad <<del class="diffchange diffchange-inline">hask</del>>State s a</<del class="diffchange diffchange-inline">hask</del>> is only a type synonym for <<del class="diffchange diffchange-inline">hask</del>>StateT s Identity a</<del class="diffchange diffchange-inline">hask</del>>. Thus both <<del class="diffchange diffchange-inline">hask</del>>State</<del class="diffchange diffchange-inline">hask</del>> and <<del class="diffchange diffchange-inline">hask</del>>StateT</<del class="diffchange diffchange-inline">hask</del>> can be accessed by the same methods like <<del class="diffchange diffchange-inline">hask</del>>put</<del class="diffchange diffchange-inline">hask</del>> and <<del class="diffchange diffchange-inline">hask</del>>get</<del class="diffchange diffchange-inline">hask</del>>. However, this only works if <<del class="diffchange diffchange-inline">hask</del>>StateT</<del class="diffchange diffchange-inline">hask</del>> is the top-most transformer in a monad transformer stack. This package is Haskell 98 and thus can be also used with [[JHC]].</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/transformers transformers]: provides the classes <<ins class="diffchange diffchange-inline">code</ins>>MonadTrans</<ins class="diffchange diffchange-inline">code</ins>> and <<ins class="diffchange diffchange-inline">code</ins>>MonadIO</<ins class="diffchange diffchange-inline">code</ins>>, as well as concrete monad transformers such as <<ins class="diffchange diffchange-inline">code</ins>>StateT</<ins class="diffchange diffchange-inline">code</ins>>. The monad <<ins class="diffchange diffchange-inline">code</ins>>State s a</<ins class="diffchange diffchange-inline">code</ins>> is only a type synonym for <<ins class="diffchange diffchange-inline">code</ins>>StateT s Identity a</<ins class="diffchange diffchange-inline">code</ins>>. Thus both <<ins class="diffchange diffchange-inline">code</ins>>State</<ins class="diffchange diffchange-inline">code</ins>> and <<ins class="diffchange diffchange-inline">code</ins>>StateT</<ins class="diffchange diffchange-inline">code</ins>> can be accessed by the same methods like <<ins class="diffchange diffchange-inline">code</ins>>put</<ins class="diffchange diffchange-inline">code</ins>> and <<ins class="diffchange diffchange-inline">code</ins>>get</<ins class="diffchange diffchange-inline">code</ins>>. However, this only works if <<ins class="diffchange diffchange-inline">code</ins>>StateT</<ins class="diffchange diffchange-inline">code</ins>> is the top-most transformer in a monad transformer stack. This package is Haskell 98 and thus can be also used with [[JHC]].</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/mtl mtl] (Monad Transformer Library) comes in two versions:</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/mtl mtl] (Monad Transformer Library) comes in two versions:</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>** version 1 was the first implementation, containing the classes <<del class="diffchange diffchange-inline">hask</del>>MonadTrans</<del class="diffchange diffchange-inline">hask</del>> and <<del class="diffchange diffchange-inline">hask</del>>MonadIO</<del class="diffchange diffchange-inline">hask</del>>, concrete monad transformers such as <<del class="diffchange diffchange-inline">hask</del>>StateT</<del class="diffchange diffchange-inline">hask</del>> and [[multi-parameter type class]]es with [[functional dependencies]] such as <<del class="diffchange diffchange-inline">hask</del>>MonadState</<del class="diffchange diffchange-inline">hask</del>>. Monads like <<del class="diffchange diffchange-inline">hask</del>>State</<del class="diffchange diffchange-inline">hask</del>> and their transformer counterparts like <<del class="diffchange diffchange-inline">hask</del>>StateT</<del class="diffchange diffchange-inline">hask</del>> are distinct types and can be accessed uniformly only through a type class abstraction like <<del class="diffchange diffchange-inline">hask</del>>MonadState</<del class="diffchange diffchange-inline">hask</del>>. This version is now obsolete.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>** version 1 was the first implementation, containing the classes <<ins class="diffchange diffchange-inline">code</ins>>MonadTrans</<ins class="diffchange diffchange-inline">code</ins>> and <<ins class="diffchange diffchange-inline">code</ins>>MonadIO</<ins class="diffchange diffchange-inline">code</ins>>, concrete monad transformers such as <<ins class="diffchange diffchange-inline">code</ins>>StateT</<ins class="diffchange diffchange-inline">code</ins>> and [[multi-parameter type class]]es with [[functional dependencies]] such as <<ins class="diffchange diffchange-inline">code</ins>>MonadState</<ins class="diffchange diffchange-inline">code</ins>>. Monads like <<ins class="diffchange diffchange-inline">code</ins>>State</<ins class="diffchange diffchange-inline">code</ins>> and their transformer counterparts like <<ins class="diffchange diffchange-inline">code</ins>>StateT</<ins class="diffchange diffchange-inline">code</ins>> are distinct types and can be accessed uniformly only through a type class abstraction like <<ins class="diffchange diffchange-inline">code</ins>>MonadState</<ins class="diffchange diffchange-inline">code</ins>>. This version is now obsolete.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>** version 2 re-exports the classes and monad transformers of the transformers package, and adds [[multi-parameter type class]]es with [[functional dependencies]] such as <<del class="diffchange diffchange-inline">hask</del>>MonadState</<del class="diffchange diffchange-inline">hask</del>>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>** version 2 re-exports the classes and monad transformers of the transformers package, and adds [[multi-parameter type class]]es with [[functional dependencies]] such as <<ins class="diffchange diffchange-inline">code</ins>>MonadState</<ins class="diffchange diffchange-inline">code</ins>>.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>*:Version 2 of the MTL has some small [[Incompatibilities between MTL 1 and MTL 2|incompatibilities]] relative to version 1. See "[[Upgrading from MTL 1 to MTL 2]]" for instructions on how to make code written for version 1 work with version 2.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>*:Version 2 of the MTL has some small [[Incompatibilities between MTL 1 and MTL 2|incompatibilities]] relative to version 1. See "[[Upgrading from MTL 1 to MTL 2]]" for instructions on how to make code written for version 1 work with version 2.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:Because of the functional dependencies, MTL can currently (2010-03) only used in [[Hugs]] and [[GHC]]. MTL was the first implementation.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:Because of the functional dependencies, MTL can currently (2010-03) only used in [[Hugs]] and [[GHC]]. MTL was the first implementation.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 23:</td>
<td colspan="2" class="diff-lineno">Line 23:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Many package using <code>MTL</code> can be ported to <code>transformers</code> with only slight modifications.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Many package using <code>MTL</code> can be ported to <code>transformers</code> with only slight modifications.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Modules require the <code>Trans</code> infix,</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Modules require the <code>Trans</code> infix,</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>e.g. <<del class="diffchange diffchange-inline">hask</del>>import Control.Monad.State ...</<del class="diffchange diffchange-inline">hask</del>> must be replaced by <<del class="diffchange diffchange-inline">hask</del>>import Control.Monad.Trans.State ...</<del class="diffchange diffchange-inline">hask</del>>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>e.g. <<ins class="diffchange diffchange-inline">code</ins>>import Control.Monad.State ...</<ins class="diffchange diffchange-inline">code</ins>> must be replaced by <<ins class="diffchange diffchange-inline">code</ins>>import Control.Monad.Trans.State ...</<ins class="diffchange diffchange-inline">code</ins>>.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Since <<del class="diffchange diffchange-inline">hask</del>>State</<del class="diffchange diffchange-inline">hask</del>> is only a type synonym, there is no longer a constructor named <<del class="diffchange diffchange-inline">hask</del>>State</<del class="diffchange diffchange-inline">hask</del>>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since <<ins class="diffchange diffchange-inline">code</ins>>State</<ins class="diffchange diffchange-inline">code</ins>> is only a type synonym, there is no longer a constructor named <<ins class="diffchange diffchange-inline">code</ins>>State</<ins class="diffchange diffchange-inline">code</ins>>.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>For constructing you must use the function <<del class="diffchange diffchange-inline">hask</del>>state</<del class="diffchange diffchange-inline">hask</del>> and instead of matching patterns you must call <<del class="diffchange diffchange-inline">hask</del>>runState</<del class="diffchange diffchange-inline">hask</del>>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>For constructing you must use the function <<ins class="diffchange diffchange-inline">code</ins>>state</<ins class="diffchange diffchange-inline">code</ins>> and instead of matching patterns you must call <<ins class="diffchange diffchange-inline">code</ins>>runState</<ins class="diffchange diffchange-inline">code</ins>>.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
</tr>
</table>
WillNess
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=38794&oldid=prev
RossPaterson: /* Shall I use MTL or transformers? */
2011-02-16T14:56:10Z
<p><span dir="auto"><span class="autocomment">Shall I use MTL or transformers?</span></span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:56, 16 February 2011</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 16:</td>
<td colspan="2" class="diff-lineno">Line 16:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Shall I use MTL or transformers? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Shall I use MTL or transformers? ==</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Transformers is Haskell 98 and thus more portable.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Transformers is Haskell 98 and thus more portable<ins class="diffchange diffchange-inline">, and doesn't tie you to functional dependencies</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>But <del class="diffchange diffchange-inline">this also means</del> it lacks the monad classes,<del class="diffchange diffchange-inline"> so</del> you'll have to lift operations to the composite monad yourself ([http://hackage.haskell.org/packages/archive/transformers/latest/doc/html/Control-Monad-Trans-Class.html#g:2 examples]).</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>But <ins class="diffchange diffchange-inline">because</ins> it lacks the monad classes, you'll have to lift operations to the composite monad yourself ([http://hackage.haskell.org/packages/archive/transformers/latest/doc/html/Control-Monad-Trans-Class.html#g:2 examples]).</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How to move from MTL to transformers? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How to move from MTL to transformers? ==</div></td>
</tr>
</table>
RossPaterson
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=38790&oldid=prev
RossPaterson: add caveat about lifting operations
2011-02-16T12:58:22Z
<p>add caveat about lifting operations</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:58, 16 February 2011</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>*:Version 2 of the MTL has some small [[Incompatibilities between MTL 1 and MTL 2|incompatibilities]] relative to version 1. See "[[Upgrading from MTL 1 to MTL 2]]" for instructions on how to make code written for version 1 work with version 2.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>*:Version 2 of the MTL has some small [[Incompatibilities between MTL 1 and MTL 2|incompatibilities]] relative to version 1. See "[[Upgrading from MTL 1 to MTL 2]]" for instructions on how to make code written for version 1 work with version 2.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:Because of the functional dependencies, MTL can currently (2010-03) only used in [[Hugs]] and [[GHC]]. MTL was the first implementation.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:Because of the functional dependencies, MTL can currently (2010-03) only used in [[Hugs]] and [[GHC]]. MTL was the first implementation.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/monads-fd monads-fd]: this was the prototype of the new mtl implementation. It is now obsolete, and simply re-exports mtl.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/monads-fd monads-fd]: this was the prototype of the new mtl implementation. It is now obsolete, and simply re-exports mtl<ins class="diffchange diffchange-inline"> version 2</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/monads-tf monads-tf]: Provides a different abstraction using [[type families]]. Unfortunately the module names of <code>mtl</code> and <code>monads-tf</code> clash, so you can currently not import both packages in one package.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/monads-tf monads-tf]: Provides a different abstraction using [[type families]]. Unfortunately the module names of <code>mtl</code> and <code>monads-tf</code> clash, so you can currently not import both packages in one package.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 17:</td>
<td colspan="2" class="diff-lineno">Line 17:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Transformers is Haskell 98 and thus more portable.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Transformers is Haskell 98 and thus more portable.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>But this also means it lacks the monad classes, so you'll have to lift operations to the composite monad yourself ([http://hackage.haskell.org/packages/archive/transformers/latest/doc/html/Control-Monad-Trans-Class.html#g:2 examples]).</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How to move from MTL to transformers? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How to move from MTL to transformers? ==</div></td>
</tr>
</table>
RossPaterson
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=38785&oldid=prev
Henk-Jan van Tuyl: Changed link to "All About Monads"
2011-02-16T12:09:56Z
<p>Changed link to "All About Monads"</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:09, 16 February 2011</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 30:</td>
<td colspan="2" class="diff-lineno">Line 30:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://www.grabmueller.de/martin/www/pub/Transformers.pdf Monad Transformers Step by Step] (PDF)</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://www.grabmueller.de/martin/www/pub/Transformers.pdf Monad Transformers Step by Step] (PDF)</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [<del class="diffchange diffchange-inline">http://www.haskell.org/all_about_monads/html/ </del>All About Monads]</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [<ins class="diffchange diffchange-inline">[</ins>All About Monads<ins class="diffchange diffchange-inline">]</ins>]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-December/012914.html</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-December/012914.html</div></td>
</tr>
<!-- diff cache key wikidb_haskell:diff:wikidiff2:1.12:old-37909:rev-38785:1.10.0 -->
</table>
Henk-Jan van Tuyl
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=37909&oldid=prev
RossPaterson: update for mtl-2
2010-12-15T13:34:07Z
<p>update for mtl-2</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:34, 15 December 2010</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>There are currently <del class="diffchange diffchange-inline">two sets of</del> packages that implement similar interfaces to [[Monad Transformers Explained|monad transformers]]<del class="diffchange diffchange-inline">,</del></div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>There are currently <ins class="diffchange diffchange-inline">several</ins> packages that implement similar interfaces to [[Monad Transformers Explained|monad transformers]]<ins class="diffchange diffchange-inline"> (besides an additional package with a similar goal but different API named [[MonadLib]]):</ins></div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>besides a third package with a similar goal but different API named [[MonadLib]]:</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/<del class="diffchange diffchange-inline">mtl</del> <del class="diffchange diffchange-inline">MTL</del>]<del class="diffchange diffchange-inline"> - Monad Transformers Library</del>: provides <del class="diffchange diffchange-inline">concrete</del> <del class="diffchange diffchange-inline">monad transformers like</del> <hask><del class="diffchange diffchange-inline">StateT</del></hask> and <del class="diffchange diffchange-inline">abstractions</del> <del class="diffchange diffchange-inline">using</del> <del class="diffchange diffchange-inline">[[multi-parameter</del> <del class="diffchange diffchange-inline">type</del> <del class="diffchange diffchange-inline">class]]es</del> <del class="diffchange diffchange-inline">with</del> <del class="diffchange diffchange-inline">[[functional</del> <del class="diffchange diffchange-inline">dependencies]]</del> <del class="diffchange diffchange-inline">like</del> <hask><del class="diffchange diffchange-inline">MonadState</del></hask>. <del class="diffchange diffchange-inline">Monads</del> <del class="diffchange diffchange-inline">like</del> <hask>State</hask> <del class="diffchange diffchange-inline">and</del> <del class="diffchange diffchange-inline">their</del> <del class="diffchange diffchange-inline">transformer</del> <del class="diffchange diffchange-inline">counterparts</del> <del class="diffchange diffchange-inline">like</del> <hask>StateT</hask> <del class="diffchange diffchange-inline">are</del> <del class="diffchange diffchange-inline">distinct</del> <del class="diffchange diffchange-inline">types</del> and can be accessed <del class="diffchange diffchange-inline">uniformly</del> <del class="diffchange diffchange-inline">only</del> <del class="diffchange diffchange-inline">through</del> <del class="diffchange diffchange-inline">a</del> <del class="diffchange diffchange-inline">type</del> <del class="diffchange diffchange-inline">class</del> <del class="diffchange diffchange-inline">abstraction like</del> <hask><del class="diffchange diffchange-inline">MonadState</del></hask>. <del class="diffchange diffchange-inline">Because</del> <del class="diffchange diffchange-inline">of</del> <del class="diffchange diffchange-inline">the</del> <del class="diffchange diffchange-inline">functional</del> <del class="diffchange diffchange-inline">dependencies,</del> <del class="diffchange diffchange-inline">MTL</del> <del class="diffchange diffchange-inline">can</del> <del class="diffchange diffchange-inline">currently</del> <del class="diffchange diffchange-inline">(2010</del>-<del class="diffchange diffchange-inline">03)</del> <del class="diffchange diffchange-inline">only used</del> in <del class="diffchange diffchange-inline">[[Hugs]]</del> <del class="diffchange diffchange-inline">and</del> <del class="diffchange diffchange-inline">[[GHC]]</del>. <del class="diffchange diffchange-inline">MTL</del> <del class="diffchange diffchange-inline">was</del> <del class="diffchange diffchange-inline">the</del> <del class="diffchange diffchange-inline">first</del> <del class="diffchange diffchange-inline">implementation</del>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/<ins class="diffchange diffchange-inline">transformers</ins> <ins class="diffchange diffchange-inline">transformers</ins>]: provides <ins class="diffchange diffchange-inline">the</ins> <ins class="diffchange diffchange-inline">classes</ins> <hask><ins class="diffchange diffchange-inline">MonadTrans</ins></hask> and <ins class="diffchange diffchange-inline"><hask>MonadIO</hask>,</ins> <ins class="diffchange diffchange-inline">as</ins> <ins class="diffchange diffchange-inline">well</ins> <ins class="diffchange diffchange-inline">as</ins> <ins class="diffchange diffchange-inline">concrete</ins> <ins class="diffchange diffchange-inline">monad</ins> <ins class="diffchange diffchange-inline">transformers</ins> <ins class="diffchange diffchange-inline">such</ins> <ins class="diffchange diffchange-inline">as</ins> <hask><ins class="diffchange diffchange-inline">StateT</ins></hask>. <ins class="diffchange diffchange-inline">The</ins> <ins class="diffchange diffchange-inline">monad</ins> <hask>State<ins class="diffchange diffchange-inline"> s a</ins></hask> <ins class="diffchange diffchange-inline">is</ins> <ins class="diffchange diffchange-inline">only</ins> <ins class="diffchange diffchange-inline">a</ins> <ins class="diffchange diffchange-inline">type</ins> <ins class="diffchange diffchange-inline">synonym for</ins> <hask>StateT<ins class="diffchange diffchange-inline"> s Identity a</ins></hask><ins class="diffchange diffchange-inline">.</ins> <ins class="diffchange diffchange-inline">Thus</ins> <ins class="diffchange diffchange-inline">both</ins> <ins class="diffchange diffchange-inline"><hask>State</hask></ins> and<ins class="diffchange diffchange-inline"> <hask>StateT</hask></ins> can be accessed <ins class="diffchange diffchange-inline">by</ins> <ins class="diffchange diffchange-inline">the</ins> <ins class="diffchange diffchange-inline">same</ins> <ins class="diffchange diffchange-inline">methods</ins> <ins class="diffchange diffchange-inline">like</ins> <ins class="diffchange diffchange-inline"><hask>put</hask></ins> <ins class="diffchange diffchange-inline">and</ins> <hask><ins class="diffchange diffchange-inline">get</ins></hask>. <ins class="diffchange diffchange-inline">However,</ins> <ins class="diffchange diffchange-inline">this</ins> <ins class="diffchange diffchange-inline">only</ins> <ins class="diffchange diffchange-inline">works</ins> <ins class="diffchange diffchange-inline">if</ins> <ins class="diffchange diffchange-inline"><hask>StateT</hask></ins> <ins class="diffchange diffchange-inline">is</ins> <ins class="diffchange diffchange-inline">the</ins> <ins class="diffchange diffchange-inline">top</ins>-<ins class="diffchange diffchange-inline">most</ins> <ins class="diffchange diffchange-inline">transformer</ins> in <ins class="diffchange diffchange-inline">a</ins> <ins class="diffchange diffchange-inline">monad</ins> <ins class="diffchange diffchange-inline">transformer stack</ins>. <ins class="diffchange diffchange-inline">This</ins> <ins class="diffchange diffchange-inline">package</ins> <ins class="diffchange diffchange-inline">is</ins> <ins class="diffchange diffchange-inline">Haskell</ins> <ins class="diffchange diffchange-inline">98 and thus can be also used with [[JHC]]</ins>.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/mtl mtl] (Monad Transformer Library) comes in two versions:</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* The newer implementation is derived from the former one and is split into the following components:</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>** <del class="diffchange diffchange-inline">[http://hackage.haskell.org/package/transformers</del> <del class="diffchange diffchange-inline">transformers]:</del> <del class="diffchange diffchange-inline">Provide</del> <del class="diffchange diffchange-inline">only</del> <del class="diffchange diffchange-inline">concrete</del> <del class="diffchange diffchange-inline">transformers</del> <del class="diffchange diffchange-inline">like</del> <hask><del class="diffchange diffchange-inline">StateT</del></hask><del class="diffchange diffchange-inline">.</del> <del class="diffchange diffchange-inline">The monad</del> <hask><del class="diffchange diffchange-inline">State s a</del></hask> <del class="diffchange diffchange-inline">is</del> <del class="diffchange diffchange-inline">only</del> <del class="diffchange diffchange-inline">a</del> <del class="diffchange diffchange-inline">type synonym</del> <del class="diffchange diffchange-inline">for</del> <hask>StateT<del class="diffchange diffchange-inline"> s Identity a</hask>. Thus both <hask>State</del></hask> and <del class="diffchange diffchange-inline"><hask>StateT</hask></del> <del class="diffchange diffchange-inline">can</del> <del class="diffchange diffchange-inline">be</del> <del class="diffchange diffchange-inline">accessed</del> <del class="diffchange diffchange-inline">by</del> <del class="diffchange diffchange-inline">the</del> <del class="diffchange diffchange-inline">same</del> <del class="diffchange diffchange-inline">methods like</del> <hask><del class="diffchange diffchange-inline">put</del></hask> <del class="diffchange diffchange-inline">and</del> <hask><del class="diffchange diffchange-inline">get</del></hask><del class="diffchange diffchange-inline">.</del> <del class="diffchange diffchange-inline">However,</del> <del class="diffchange diffchange-inline">this</del> <del class="diffchange diffchange-inline">only</del> <del class="diffchange diffchange-inline">works,</del> <del class="diffchange diffchange-inline">if</del> <hask>StateT</hask> <del class="diffchange diffchange-inline">is</del> <del class="diffchange diffchange-inline">the</del> <del class="diffchange diffchange-inline">top-most</del> <del class="diffchange diffchange-inline">transformer</del> <del class="diffchange diffchange-inline">in</del> <del class="diffchange diffchange-inline">a</del> <del class="diffchange diffchange-inline">monad</del> <del class="diffchange diffchange-inline">transformer</del> <del class="diffchange diffchange-inline">stack.</del> <del class="diffchange diffchange-inline">This</del> <del class="diffchange diffchange-inline">package</del> <del class="diffchange diffchange-inline">is</del> <del class="diffchange diffchange-inline">Haskell</del> <del class="diffchange diffchange-inline">98</del> <del class="diffchange diffchange-inline">and</del> <del class="diffchange diffchange-inline">thus</del> <del class="diffchange diffchange-inline">can</del> <del class="diffchange diffchange-inline">be</del> <del class="diffchange diffchange-inline">also</del> <del class="diffchange diffchange-inline">used</del> <del class="diffchange diffchange-inline">with</del> <del class="diffchange diffchange-inline">[[JHC]]</del>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>** <ins class="diffchange diffchange-inline">version</ins> <ins class="diffchange diffchange-inline">1</ins> <ins class="diffchange diffchange-inline">was</ins> <ins class="diffchange diffchange-inline">the</ins> <ins class="diffchange diffchange-inline">first</ins> <ins class="diffchange diffchange-inline">implementation,</ins> <ins class="diffchange diffchange-inline">containing the classes</ins> <hask><ins class="diffchange diffchange-inline">MonadTrans</ins></hask> <ins class="diffchange diffchange-inline">and</ins> <hask><ins class="diffchange diffchange-inline">MonadIO</ins></hask><ins class="diffchange diffchange-inline">,</ins> <ins class="diffchange diffchange-inline">concrete</ins> <ins class="diffchange diffchange-inline">monad</ins> <ins class="diffchange diffchange-inline">transformers</ins> <ins class="diffchange diffchange-inline">such</ins> <ins class="diffchange diffchange-inline">as</ins> <hask>StateT</hask> and <ins class="diffchange diffchange-inline">[[multi-parameter</ins> <ins class="diffchange diffchange-inline">type</ins> <ins class="diffchange diffchange-inline">class]]es</ins> <ins class="diffchange diffchange-inline">with</ins> <ins class="diffchange diffchange-inline">[[functional</ins> <ins class="diffchange diffchange-inline">dependencies]]</ins> <ins class="diffchange diffchange-inline">such</ins> <ins class="diffchange diffchange-inline">as</ins> <hask><ins class="diffchange diffchange-inline">MonadState</ins></hask><ins class="diffchange diffchange-inline">.</ins> <ins class="diffchange diffchange-inline">Monads like</ins> <hask><ins class="diffchange diffchange-inline">State</ins></hask> <ins class="diffchange diffchange-inline">and</ins> <ins class="diffchange diffchange-inline">their</ins> <ins class="diffchange diffchange-inline">transformer</ins> <ins class="diffchange diffchange-inline">counterparts</ins> <ins class="diffchange diffchange-inline">like</ins> <hask>StateT</hask> <ins class="diffchange diffchange-inline">are</ins> <ins class="diffchange diffchange-inline">distinct</ins> <ins class="diffchange diffchange-inline">types</ins> <ins class="diffchange diffchange-inline">and</ins> <ins class="diffchange diffchange-inline">can</ins> <ins class="diffchange diffchange-inline">be</ins> <ins class="diffchange diffchange-inline">accessed</ins> <ins class="diffchange diffchange-inline">uniformly</ins> <ins class="diffchange diffchange-inline">only</ins> <ins class="diffchange diffchange-inline">through</ins> <ins class="diffchange diffchange-inline">a</ins> <ins class="diffchange diffchange-inline">type</ins> <ins class="diffchange diffchange-inline">class</ins> <ins class="diffchange diffchange-inline">abstraction</ins> <ins class="diffchange diffchange-inline">like</ins> <ins class="diffchange diffchange-inline"><hask>MonadState</hask>.</ins> <ins class="diffchange diffchange-inline">This</ins> <ins class="diffchange diffchange-inline">version</ins> <ins class="diffchange diffchange-inline">is</ins> <ins class="diffchange diffchange-inline">now</ins> <ins class="diffchange diffchange-inline">obsolete</ins>.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>** version 2 re-exports the classes and monad transformers of the transformers package, and adds [[multi-parameter type class]]es with [[functional dependencies]] such as <hask>MonadState</hask>.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>** [http://hackage.haskell.org/package/monads-fd monads-fd]: Provides the same type classes with functional dependencies like MTL. They allow using <hask>State</hask> methods also for <hask>StateT</hask> transformers within a transformer stack.</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>*:Version 2 of the MTL has some small [[Incompatibilities between MTL 1 and MTL 2|incompatibilities]] relative to version 1. See "[[Upgrading from MTL 1 to MTL 2]]" for instructions on how to make code written for version 1 work with version 2.</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_11_2_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_10_0_lhs"></a><del class="diffchange diffchange-inline">*</del>* [http://hackage.haskell.org/package/monads-tf monads-tf]: Provides a different abstraction using [[type families]]. Unfortunately the names of <code><del class="diffchange diffchange-inline">monads-fd</del></code> and <code>monads-tf</code> clash, <del class="diffchange diffchange-inline">thus</del> you can currently not import both packages in one package.</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:Because of the functional dependencies, MTL can currently (2010-03) only used in [[Hugs]] and [[GHC]]. MTL was the first implementation.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://hackage.haskell.org/package/monads-fd monads-fd]: this was the prototype of the new mtl implementation. It is now obsolete, and simply re-exports mtl.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_10_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_11_2_rhs"></a>* [http://hackage.haskell.org/package/monads-tf monads-tf]: Provides a different abstraction using [[type families]]. Unfortunately the<ins class="diffchange diffchange-inline"> module</ins> names of <code><ins class="diffchange diffchange-inline">mtl</ins></code> and <code>monads-tf</code> clash, <ins class="diffchange diffchange-inline">so</ins> you can currently not import both packages in one package.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How can I use MTL and transformers together? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How can I use MTL and transformers together? ==</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>MTL and transformers use different module names, but share common classes, type constructors and functions, so they are fully compatible.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Q: When I use ghc or ghci it complains about the same module names in mtl and transformers or monads-fd. How can I resolve these name clashes?</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>A: You can use the <code>-hide-package</code> option of GHC. [[Cabal]] uses the <code>-hide-all-packages</code> option and then explicitly makes every package visible with <code>-package</code>.</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Shall I use MTL or transformers? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Shall I use MTL or transformers? ==</div></td>
</tr>
</table>
RossPaterson
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=37358&oldid=prev
Henk-Jan van Tuyl: Added links
2010-10-30T07:25:35Z
<p>Added links</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 07:25, 30 October 2010</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 28:</td>
<td colspan="2" class="diff-lineno">Line 28:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Monad Transformers Explained]]</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://www.grabmueller.de/martin/www/pub/Transformers.pdf Monad Transformers Step by Step] (PDF)</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [http://www.haskell.org/all_about_monads/html/ All About Monads]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-March/011415.html</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-December/012914.html</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* http://www.haskell.org/pipermail/libraries/2009-December/012914.html</div></td>
</tr>
<!-- diff cache key wikidb_haskell:diff:wikidiff2:1.12:old-33977:rev-37358:1.10.0 -->
</table>
Henk-Jan van Tuyl
https://wiki.haskell.org/index.php?title=Monad_Transformers&diff=33977&oldid=prev
Lemming: FAQ
2010-03-05T23:14:44Z
<p>FAQ</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:14, 5 March 2010</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** [http://hackage.haskell.org/package/transformers transformers]: Provide only concrete transformers like <hask>StateT</hask>. The monad <hask>State s a</hask> is only a type synonym for <hask>StateT s Identity a</hask>. Thus both <hask>State</hask> and <hask>StateT</hask> can be accessed by the same methods like <hask>put</hask> and <hask>get</hask>. However, this only works, if <hask>StateT</hask> is the top-most transformer in a monad transformer stack. This package is Haskell 98 and thus can be also used with [[JHC]].</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** [http://hackage.haskell.org/package/transformers transformers]: Provide only concrete transformers like <hask>StateT</hask>. The monad <hask>State s a</hask> is only a type synonym for <hask>StateT s Identity a</hask>. Thus both <hask>State</hask> and <hask>StateT</hask> can be accessed by the same methods like <hask>put</hask> and <hask>get</hask>. However, this only works, if <hask>StateT</hask> is the top-most transformer in a monad transformer stack. This package is Haskell 98 and thus can be also used with [[JHC]].</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** [http://hackage.haskell.org/package/monads-fd monads-fd]: Provides the same type classes with functional dependencies like MTL. They allow using <hask>State</hask> methods also for <hask>StateT</hask> transformers within a transformer stack.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** [http://hackage.haskell.org/package/monads-fd monads-fd]: Provides the same type classes with functional dependencies like MTL. They allow using <hask>State</hask> methods also for <hask>StateT</hask> transformers within a transformer stack.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>** [http://hackage.haskell.org/package/monads-tf monads-tf]: Provides a different abstraction using [[type families]]. Unfortunately the names of <code>monads-fd</code> and <code>monads-tf</code> clash,</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>** [http://hackage.haskell.org/package/monads-tf monads-tf]: Provides a different abstraction using [[type families]]. Unfortunately the names of <code>monads-fd</code> and <code>monads-tf</code> clash,<ins class="diffchange diffchange-inline"> thus you can currently not import both packages in one package.</ins></div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>thus you can currently not import both packages in one package.</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How can I use MTL and transformers together? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How can I use MTL and transformers together? ==</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Q: When I use ghc or ghci it complains about the same module names in mtl and transformers or monads-fd. How can I resolve these name clashes?</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>A: You can use the <code>-hide-package</code> option of GHC. [[Cabal]] uses the <code>-hide-all-packages</code> option and then explicitly makes every package visible with <code>-package</code>.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Shall I use MTL or transformers? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Shall I use MTL or transformers? ==</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Transformers is Haskell 98 and thus more portable.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How to move from MTL to transformers? ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== How to move from MTL to transformers? ==</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">Any</del> package using <code>MTL</code> can be ported to <code>transformers<del class="diffchange diffchange-inline"></code> and <code>monads-fd</del></code> with only slight <del class="diffchange diffchange-inline">variations</del>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">Many</ins> package using <code>MTL</code> can be ported to <code>transformers</code> with only slight <ins class="diffchange diffchange-inline">modifications</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Modules require the <code>Trans</code> infix,</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Modules require the <code>Trans</code> infix,</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>e.g. <hask>import Control.Monad.State ...</hask> must be replaced by <hask>import Control.Monad.Trans.State ...</hask>.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>e.g. <hask>import Control.Monad.State ...</hask> must be replaced by <hask>import Control.Monad.Trans.State ...</hask>.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Since <hask>State</hask> is only a type synonym, there is no longer a constructor named <hask>State</hask>.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Since <hask>State</hask> is only a type synonym, there is no longer a constructor named <hask>State</hask>.</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>For constructing you must use the function <hask>state</hask> and instead of<del class="diffchange diffchange-inline"> pattern</del> matching you must call <hask>runState</hask>.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>For constructing you must use the function <hask>state</hask> and instead of matching<ins class="diffchange diffchange-inline"> patterns</ins> you must call <hask>runState</hask>.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
</tr>
</table>
Lemming