Mmmmh... no, to do that you need ImpredicativeTypes (which is I believe about to be deprecated).<br>You have to declare Job a data, not a type, and use ExistentialQuantification.<br><br><div class="gmail_quote">2012/6/13 Ismael Figueroa Palet <span dir="ltr">&lt;<a href="mailto:ifigueroap@gmail.com" target="_blank">ifigueroap@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do you want to hide the specific types of the job? Presumably to then define a type JobList = [Job] ?<div>You can do that with the ExistentialQuantification extension.</div>

<div><br></div><div>type Job = forall k a. Map k a</div>
<div>type JobList = [Job]</div><div><br></div><div>??</div><div>Note you can&#39;t unpack the types k a once you have hidden them. But the typechecker can use it to ensure some static property.</div><div>Also you could use unsafeCoerce to do some casts, but *only if you are *sure* that things will go OK*.</div>


<div><div><div><div class="h5"><br><br><div class="gmail_quote">2012/6/13 Magicloud Magiclouds <span dir="ltr">&lt;<a href="mailto:magicloud.magiclouds@gmail.com" target="_blank">magicloud.magiclouds@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
 &nbsp;I&#39;ve forgotten this.<br>
 &nbsp;This is OK:<br>
type Job k a = Map k a<br>
 &nbsp;And this is OK:<br>
{-# LANGUAGE RankNTypes #-} -- or LiberalTypeSynonyms?<br>
type Job = forall a. forall k. Map k a<br>
<br>
 &nbsp;Then how to write it like this?<br>
type Job = Map k a<br>
<span><font color="#888888">--<br>
竹密岂妨流水过<br>
山高哪阻野云飞<br>
<br>
And for G+, please use magiclouds#<a href="http://gmail.com" target="_blank">gmail.com</a>.<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Ismael<br><br>
</font></span></div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>