[Haskell-cafe] Re: haskell programming guidelines
maeder at tzi.de
Thu Feb 23 05:16:11 EST 2006
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>"')
More information about the Haskell-Cafe