[Haskell-cafe] Haskell Propeganda
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Thu Aug 28 09:49:49 EDT 2008
On 2008 Aug 28, at 2:41, Don Stewart wrote:
>> The great thing about Maybe is that once I've checked it isn't
>> Nothing, I can extract the value and dispense with further checks.
>> foo mbx = maybe default (bar x) mbx
> And GHC will warn me when I forget to check all cases, and prevent me
> from compiling at all, if I don't do any check.
...unless you use fromJust.
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
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