<div dir="ltr">This [1] was posted 5 hours ago<br><br>[1] <a href="https://www.reddit.com/r/haskellquestions/comments/5ebepq/perhaps_i_meant_one_of_these_statet/">https://www.reddit.com/r/haskellquestions/comments/5ebepq/perhaps_i_meant_one_of_these_statet/</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-20 17:56 GMT+00:00 David Feuer <span dir="ltr"><<a href="mailto:david.feuer@gmail.com" target="_blank">david.feuer@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">This sounds fantastic! I think it is very important to provide sufficient documentation in the source to allow newish users who click through to understand as much as they need.</p>
<div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Nov 20, 2016 12:47 PM, "Baldur Blöndal" <<a href="mailto:baldurpet@gmail.com" target="_blank">baldurpet@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div>This will look like the original definitions [1]<br><br></div>> newtype State s a = State { runState :: s -> (a, s) }<br><br></div><div>before they became type synonyms<br><br></div><div>> type State s = StateT s Identity<br></div><div><br></div>by defining pattern synonyms<br><br></div>> pattern State :: (s -> (a, s)) -> State s a<br></div>> pattern State {runState} <- S.runState -> runState<br></div>>   where State a           = state a<br><br><div><div><div><div><div>Trac ticket #12767 for further information. [2]<br><br><div><div>[1] <a href="http://book.realworldhaskell.org/read/monads.html#id643643" target="_blank">http://book.realworldhaskell.o<wbr>rg/read/monads.html#id643643</a><br>[2] <a href="https://ghc.haskell.org/trac/ghc/ticket/12767" target="_blank">https://ghc.haskell.org/trac/g<wbr>hc/ticket/12767</a><br></div></div></div></div></div></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/libraries</a><br>
<br></blockquote></div></div>
</blockquote></div><br></div>