<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">On Nov 20, 2016 12:47 PM, "Baldur Blöndal" <<a href="mailto:baldurpet@gmail.com">baldurpet@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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.<wbr>org/read/monads.html#id643643</a><br>[2] <a href="https://ghc.haskell.org/trac/ghc/ticket/12767" target="_blank">https://ghc.haskell.org/trac/<wbr>ghc/ticket/12767</a><br></div></div></div></div></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">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-<wbr>bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div></div>