[clean-list] Interesting run-time error

Arjen van Weelden A.vanWeelden at cs.ru.nl
Wed Aug 30 10:44:05 MEST 2006


Hi,

 > I got this error message:
 > > Run time error, rule 'f;45' in module 'BoxID_1002' does not match
 >
 > What does it mean anyway?

It means that one of the functions named `f' in your program cannot be 
applies to its arguments because it is a partial function (none of the 
patterns match). You can have more than one function `f' using multiple 
where clauses.

Hernyák Zoltán wrote:
> Hi,
> 
> 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 function `f' is applied to `[[101,102,103,104]]' and 
`[[101,102,103,104]]' by `map'. The list `[[101,102,103,104]]' has only 
one element: `[101,102,103,104]'. The function `f' expects a list of 
precisely two elements: `[x,y]'. This does not match. Either you forgot 
part of `f' or you intended to write `[x:y]' instead.

kind regards,
	Arjen


More information about the clean-list mailing list