[Haskell-cafe] Re: haskell programming guidelines

John Meacham john at repetae.net
Thu Feb 23 19:40:45 EST 2006

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 Meacham - ⑆repetae.net⑆john⑈

More information about the Haskell-Cafe mailing list