>     To the Hugs-Bugs problemsolvers,
> 
> The following lines give a fatal error trying to match with  
> convect [1] in Winhugs running under windows 98:
> 
>  convect []           = []
>  convect (h:t) = convect([h]) ++ convect(t)
>  convect a            = a
> 
> There is no error message of Hugs itself. The fatal error message 
> comes from windows
> Hugs is exited by Windows.

haven't seen an answer yet, and it looks fairly obvious, so:

[1] == 1:[], which means that

  convect [1] 
  -> convect [1] ++ convect []
  -> (convect [1] ++ convect []) ++ convect []
  -> ..

the program overflows all bounded resources, typically the stack
first. on some platforms, hugs doesn't manage to capture that
overflow error, so it (kind of) crashes. which is what you see.

hth,
claus

_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to