
23 Feb
2006
23 Feb
'06
7:40 p.m.
On Thu, Feb 23, 2006 at 11:16:11AM +0100, Christian Maeder wrote:
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>"')
I prefer the exact opposite :) John -- John Meacham - ⑆repetae.net⑆john⑈