John Meacham wrote:
       Identity y = Map.lookup x theMap
These are potential runtime errors, that may be not so obvious to see in
the source (ie. for user defined types) and even the compiler (ghc) does
not emit a warning.

Indeed, that is the entire point of the construct. ghc definitly should
not emit a warning in this case as it is what lazy pattern matching
is for.

I prefer to be explicit about this kind of partiality (by using 'error "<qualified function name>"')

Christian
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to