[Haskell-beginners] Strange behavior
Luca Ciciriello
luca_ciciriello at hotmail.com
Mon Aug 29 11:57:05 CEST 2011
Ok, Thanks.
This works fine. I found out that also mapP and sumP are working as expected, but elemP and foldP do not behave correctly.
Luca.
On Aug 29, 2011, at 11:14 AM, Daniel Fischer wrote:
> On Monday 29 August 2011, 08:41:35, Luca Ciciriello wrote:
>> Hi Alba.
>> Since I've got no answer to my question I think that my strange behavior
>> is a very deep problem.
>
> Well, perhaps it's not very deep, just not enough people on this list are
> familiar with dph.
> In such cases, ask on haskell-cafe or #haskell to reach a wider audience.
>
> Anyway, I'm pretty sure it's a bug in dph. If you change your code to avoid
> elemP:
>
>
> isElement :: String -> Bool
> isElement x = x `elemP1` parArr
> where
> elemP1 :: Eq a => a -> [:a:] -> Bool
> elemP1 v ar = lengthP (filterP (== v) ar) /= 0
>
> you get the expected result(s) [but not with HEAD].
>
> I've opened a ticket: http://hackage.haskell.org/trac/ghc/ticket/5438
>
>> I let you know when I have news.
>>
>> Bye.
>>
>> Luca.
>
> Cheers,
> Daniel
>
More information about the Beginners
mailing list