Hi Sean,<br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 2:18 PM, Sean Leather <span dir="ltr"><<a href="mailto:leather@cs.uu.nl" target="_blank">leather@cs.uu.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>We discovered that GHC and GHCi (7.4.1) accept promoted types without specifying language extensions (and even when specifying -XHaskell98).</div><div><br></div><div>For example, promoted lists are accepted:</div>
<div><br></div><div><div>Prelude> type T = [Int,Char]</div><div>Prelude> :i T</div><div>type T = (:) * Int ((:) * Char ([] *))</div><div> <span style="white-space:pre-wrap">        </span>-- Defined at <interactive>:2:6</div>
</div></blockquote><div><br>This is rejected in 7.6.1:<br><br><interactive>:2:10:<br> Illegal type: '[Int, Char] Perhaps you intended to use -XDataKinds<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
</div><div><br></div><div>Also, promoted datatypes:</div><div><br></div><div><div>> data N = Z</div><div>> type T = 'Z</div></div></blockquote><div><br>This isn't rejected, but I guess it should, indeed.<br>
<br><br>Thanks,<br>Pedro<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>I'm guessing you can't use these types anywhere (since they are not kind *), so they won't be very useful, but it seems like this should be disallowed.</div>
<div><br></div><div>Regards,</div><div>Sean</div>
<br>_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
<br></blockquote></div><br>