[Haskell-cafe] about the concatenation on a tree

Henk-Jan van Tuyl hjgtuyl at chello.nl
Wed Dec 31 15:52:39 EST 2008


On Wed, 31 Dec 2008 21:25:02 +0100, Thomas Davie <tom.davie at gmail.com>  
wrote:

>
> On 31 Dec 2008, at 21:18, Henk-Jan van Tuyl wrote:
>
>> On Wed, 31 Dec 2008 17:19:09 +0100, Max cs <max.cs.2009 at googlemail.com>  
>> wrote:
>>
>>> Hi Henk-Jan van Tuyl,
>>>
>>> Thank you very much for your reply!
>>>
>>> I think the concatenation should be different to thhe
>>>
>>> treeConcat :: Tree a -> Tree a -> Tree a
>>>
>>> the above is a combination of two trees instead of a concatenation, so
>>> I think the type of treeConcat should be:
>>>
>>> treeConcat :: Tree (Tree a) -> Tree a
>>>
>>> instead. How do you think? : ) I tried to implement it .. but it seems
>>> confusing.. to me
>>>
>>> Thanks
>>>
>>> Max
>>
>> Hello Max,
>>
>> The function
>>  treeConcat :: Tree (Tree a) -> Tree a
>> cannot be created, as it has an infinite type;
>
> It does?  How did he type it then?  And yes, it can be created

I got a message about this from GHCi; I must have been to fast trying to  
implement this.

-- 
Regards,
Henk-Jan van Tuyl


--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--




More information about the Haskell-Cafe mailing list