[Haskell-cafe] Data declaration vs type classes

Will Yager will.yager at gmail.com
Mon Jan 11 20:20:54 UTC 2016


You can do this using ExistentialQuantification. 

> On Jan 11, 2016, at 10:15, Guillaume Bouchard <guillaum.bouchard+haskell at gmail.com> wrote:
> 
> 
> doAllTask :: [?????] -> IO ()
> 
> In this case, GroceryTask and LaundryTask are NOT the same type, hence
> the "????", you cannot create a list which stores different Tasks and
> returns apply
> 


More information about the Haskell-Cafe mailing list