[clean-list] Interesting run-time error

Pieter Koopman pieter at cs.ru.nl
Wed Aug 30 11:10:54 MEST 2006


Hi,

At 09:57 AM 8/30/2006, Hernyák Zoltán wrote:
>I have succeeded to reduce the program which produces the run-time
>error (or I hope so):
>
>Start w = fromTup2L data
>
>data =  [[[101,102,103,104]],[[101,102,103,104]]]
>
>fromTup2L :: [[[Int]]] -> [([Int], [Int])]
>fromTup2L l = map f l
>    where
>       f [x,y] = (x, y)
>
>
>and the error message again:
>[Run time error, rule 'f;53' in module 'masik' does not match

The local function f is a partial function, it 
works only for lists of exactly two elements. You 
try to apply it to lists of four elements. Clean 
cannot apply any alternative. This is Clean's way to tell you this.
The ';53' is supposed to be an indication of the 
location of which function f produces the 
trouble. Unfortunately this indication is not yet always correct.

Have fun,

Pieter Koopman  




More information about the clean-list mailing list