Re: findall resulting in strange message

From: Fabian Reck <fre_at_informatik.uni-kiel.de>
Date: Fri, 19 Apr 2013 14:19:35 +0200

Hello!

> Hello,
>
> I have a problem with using KiCS2. I have a source file that contains
> the following code:
>
>> sublist :: [a] -> [a]
>> sublist (pre ++ sub ++ post) = sub
> Now I load this into KiCS2 and enter the expression
>
> findall (\sub -> sub =:= sublist "Hallo!")
>
> at the prompt. KiCS2 answers with the message
>
> Main: external_ndho_C_try .
>
> What does this mean? Does this indicate a bug?

No, this is not a bug. The problem is, that findall is (to be in line
with the Curry Report) implemented by means of the try operation. The
try operation is not easy to implement in our setting, therefore it
currently just reports an admittedly cryptic error message. I suppose we
should remove the unsupported operations from the Prelude.

But there are other operations that you could use to solve your problem.
The module AllSolutions exports the IO operations getAllValues :: a ->
IO [a] and getAllSolutions :: (a -> Success) -> IO [a] that in most
cases should yield the same results as findall.

Regards,
Fabian
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry

Received on Fri Apr 19 2013 - 14:22:28 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 19 2019 - 07:15:09 CEST