Skip to content

Wrong overlapped/missing pattern warnings

compiling:

  module Overlap where

  f (n+1) = 2
  f 0     = 1

emits wrongly:

    Warning: Pattern match(es) are overlapped
             In the definition of `f': f 0 = ...


The Patterns are disjoint, aren't they? At least  "f 0"
yields "1" when evaluated and negative inputs for f are
rejected. However the warning is not emitted if the two
equations are given in reversed order.

Christian (maeder@tzi.de)
Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information