<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 1:20 PM, Herbert Valerio Riedel <span dir="ltr"><<a href="mailto:hvr@gnu.org" target="_blank">hvr@gnu.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
TL;DR<br>
=====<br>
<br>
Re-export 'Data.Typeable.Typeable' from 'Prelude'<br>
<br>
Motivation<br>
==========<br>
<br>
Since GHC 7.8 the ubiquitous 'Typeable' instances can only be<br>
auto-derived via `... deriving Typeable`, moreover there's a new<br>
extension `-XAutoDeriveTypeable` which implicitly auto-derives<br>
'Typeable' for all defined types in modules for which that extension is<br>
enabled.<br>
<br>
However, even if you enable `-XAutoDeriveTypeable` you still need to<br>
explicitly bring the 'Typeable' class into scope, with e.g.<br>
<br>
    import Data.Typeable (Typeable)<br>
<br>
otherwise GHC complains with<br>
<br>
    Not in scope: type constructor or class ‘Typeable’<br>
<br>
Since at this point it's become current practice to have 'Typeable'<br>
instances for most types, it would be beneficial to save an 'import<br>
Data.Typeable (Typeable)' line for the sole purpose of deriving such<br>
instances.<br>
<br>
By having 'Prelude' re-export 'Typeable' from GHC 7.10 on (should this<br>
proposal be implemented) it would suffice to have a<br>
<br>
  default-extensions: -XAutoDeriveTypeable`<br>
<br>
in the Cabal file and have 'Typeable' instance auto-derived for all<br>
types defined in a package w/o any source changes (unless there's a<br>
name-clash with 'Typeable')<br>
<br>
Discussion period<br>
=================<br>
<br>
The usual 2 weeks<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</blockquote></div><br>+1<br></div></div>