[Haskell-beginners] Tagged types

Francesco Ariis fa-ml at ariis.it
Wed Oct 3 12:21:35 UTC 2018


On Tue, Oct 02, 2018 at 05:04:42PM +0000, PICCA Frederic-Emmanuel wrote:
> > I believe you can do this with GADTs [1]
> 
> I can create different constructors for the different types.
> but how can I create a function which return different type ?

Mhhh I tried to come up with an example (GADTs, ExistentialQuantification,
etc.) and failed...

This is an interesting problem and one that could interest many people;
please post your question on -cafe too (with a minimal .hs, it always
helps); I am curious on how they will approach the problem

-F



More information about the Beginners mailing list