[Haskell-cafe] Overcome type restrictions?

Henk-Jan van Tuyl hjgtuyl at chello.nl
Fri Mar 7 07:40:36 UTC 2014

On Fri, 07 Mar 2014 07:57:09 +0100, Kolář Dušan <kolar at fit.vutbr.cz> wrote:

> But we have an error of infinite type construction for
> Prelude> :t ((\(h:t) -> h t) [head,tail, head, tail, head, tail])
> Well I can overcome this by encoding functions into data types and then  
> performing "conversion" back and forth, nevertheless, is there any way  
> how to overcome this?

It seems like you need heterogenous collections[0]

Henk-Jan van Tuyl

[0] http://www.haskell.org/haskellwiki/Heterogenous_collections

Folding at home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.

Haskell programming

More information about the Haskell-Cafe mailing list