<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 7, 2014 at 2:41 PM, Tom Ellis <span dir="ltr"><<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk" target="_blank">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">On Wed, May 07, 2014 at 02:10:42PM +0300, Michael Snoyman wrote:<br>
> > > Btw, as I can't think of an example right now, what would be an example<br>
> > > for code that works with transformers-0.4.0.0 but wouldn't compile<br>
> > > anymore with transformers-0.4.1.0?<br>
> ><br>
> > Surely just the reverse of the breaking change?<br>
> ><br>
> ><br>
> > <a href="https://github.com/ibotty/streaming-commons/commit/b1137852e4f58520ad65d01b20623a968c18ae8f" target="_blank">https://github.com/ibotty/streaming-commons/commit/b1137852e4f58520ad65d01b20623a968c18ae8f</a><br>


> ><br>
><br>
> No, that code is compatible with transformers 0.3, 0.4, and 0.4.1. With the<br>
> syntax:<br>
><br>
>     import Data.Functor.Constant (Constant (Constant), getConstant)<br>
><br>
> We're importing the data type Constrant, the data construct Constant for<br>
> that data type, and the function getConstant. It doesn't matter if<br>
> getConstant is a normal function or a field accessor, it can still be<br>
> accessed by that syntax.<br>
<br>
</div>Then I don't understand why field accessors are even *allowed* to be<br>
imported beneath the type.  Surely that's only necessary to disambiguate<br>
constructors from types?<br>
<span class=""></span><br></blockquote></div><br></div><div class="gmail_extra">In the case here, the syntax:<br><br></div><div class="gmail_extra">    import Control.Monad.Trans.Reader (ReaderT (..))<br><br>is very convenient. But it's true that you don't really gain much from the distinction between these two:<br>

<br>    import Control.Monad.Trans.Reader (ReaderT (ReaderT, runReaderT))<br>    import Control.Monad.Trans.Reader (ReaderT (ReaderT), runReaderT)<br><br></div><div class="gmail_extra">Perhaps the latter should be considered a better approach, since it's more resilient to changes in datatypes.<br>

<br>Michael<br></div></div>