<div dir="auto"><div>Directly relevant blog: <a href="https://www.benjamin.pizza/posts/2017-12-15-functor-functors.html">https://www.benjamin.pizza/posts/2017-12-15-functor-functors.html</a><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Mar 31, 2018, 1:41 AM Francesco Ariis <<a href="mailto:fa-ml@ariis.it">fa-ml@ariis.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Mar 31, 2018 at 07:54:50AM +0000, PICCA Frederic-Emmanuel wrote:<br>
> I create a method<br>
><br>
> myMethod :: MyData Collect -> IO ()<br>
><br>
> but I want my method to work for MyData Collect and Mydata Caracterization but not Unchecked.<br>
><br>
> So It seems to me that I can not just do<br>
><br>
> myMethod :: MyData t -> IO ()<br>
><br>
><br>
> what is the right way to solve this problem ?<br>
<br>
Hello Frederic,<br>
I am in a rush so I cant write a minimal example, but wouldn't<br>
a typeclass + make Collect and Cara instances of that typeclass do?<br>
-F<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank" rel="noreferrer">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div></div></div>