
23 Feb
2006
23 Feb
'06
5:16 a.m.
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