On Jan 13, 2008, at 14:05 , Fernando Rodriguez wrote:

depth emptyBT = 0
depth (NodeBT _ left right) = max (1 + depth left) (1 + depth right)

Sorry, the exact error is:
   Warning: Pattern match(es) are overlapped
             In the definition of `depth': depth (NodeBT _ left right) = ...

Right. emptyBT matches anything and stores it in a new local variable "emptyBT", so the second pattern overlaps this.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to