2015-10-07 9:35 GMT+02:00 Herbert Valerio Riedel <h...@gnu.org>:

> Btw, I've also seen the trick below, in which you use the aliased `A.`
> prefix just once so GHC considers the import non-redundant, and don't
> have to suffer from prefixed operators in the style of `A.<*>`.
>
> Is this any better? [...]
>

While not perfect, it's much better than having to fiddle around with
Prelude imports. Although there's the slight danger that somebody else (or
the author 1 year later) looks at the code and has a WTF-moment... ;-) To
be honest, while it's somehow obvious how it works when you read it, I've
never seen that trick. Perhaps stuff like this belongs into some general
"Porting Guide", along with its alternatives. It's general enough that it
should not be buried in some AMP/FTP/return/... transitioning guide.

Cheers,
   S.
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

Reply via email to