[Haskell-cafe] Haskell Propeganda

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Aug 28 18:27:09 EDT 2008

On 2008 Aug 28, at 13:21, Tim Newsham wrote:
>> GNU ld supports "pragmas" which cause the use of certain functions  
>> to output warnings at link time (try compiling a C program that  
>> uses gets()).  It occurs to me that this, either in compiler or  
>> linker, would be a nice thing for ghc to do when using fromJust or  
>> other partial functions.
> would you include all partial functions in this, such as head?

I'd like to, but IMO head is a little more acceptable because lists  
aren't binary like Maybe.  fromJust really is the Haskell equivalent  
of dereferencing a pointer without checking if it's NULL, aside from  
being more reliably detectable.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list