> We were quite surprised when a student mnaged to get away with the
> following (skeletal) definition:
> 
> sumsquares n | n < 0  = error "sumsquares:n < 0"
>            n | n >= 0 = n
I think this is parsed as
  sumsquares n | n < 0  = error "sumsquares:n < 0" n
               | n >= 0 = n
which happens to be OK since `error "..."' has any type you need.

        -- Lennart

Reply via email to