[Haskell-cafe] RE: Nested Lists

Felipe Lessa felipe.lessa at gmail.com
Thu Jun 4 15:15:43 EDT 2009


On Thu, Jun 04, 2009 at 05:09:29PM +0100, Paul Keir wrote:
> Thanks. I don't know Type Families, but take the point that
> the input can be parameterised with something something other
> than a list. i.e. (8 :+: 4 :+: 2 :+: ()) presumably has the
> same type as (4 :+: 2 :+: ()).

In fact, no.

(4 :+: 2 :+: ())       :: Bunch (Bunch ())
(8 :+: 4 :+: 2 :+: ()) :: Bunch (Bunch (Bunch ()))

Maybe you didn't understand something?  Perhaps you should try
reading the HaskellWiki[1] page on type families.

[1] http://www.haskell.org/haskellwiki/GHC/Type_families

HTH,

--
Felipe.


More information about the Haskell-Cafe mailing list