[Haskell-cafe] A haskell error message

siso dagbovie kisiso10 at yahoo.fr
Tue Apr 21 14:52:40 EDT 2009

I have been trying to specify the depth-first numbering algorithm as follow:

>_dfNum             :: Int -> [Tree a] -> [Tree Int]
>_dfNum i ((Node n ts):us) = (Node i vs):(_dfNum (i+1+(length ts)) us) where
>    vs=_dfNum (i+1) ts

But when I test it, I receive the message:

Non-exhaustive patterns in function _bfNum

Please, could you give me an idea of how I could fix this?

 Kind regards,

Ayawoa Sitsopé Dagbovie
African Institute for Mathematical Sciences
#6 Melrose Road
Muizenberg 7945
South Africa.

Phone: +27 782 960453

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090421/2e521341/attachment.htm

More information about the Haskell-Cafe mailing list