On 2008 Aug 28, at 2:41, Don Stewart wrote:
ketil:
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
partial functions.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe