Bernie Pope <[EMAIL PROTECTED]> writes:

...
> Mike, what do you mean by "willy nilly convert my error calls to
> bottom"?

Simon Peyton-Jones <[EMAIL PROTECTED]> writes:
>
> In general, GHC (like every other compiler that does strictness analysis) 
> feels free to change non-termination into a call to 'error' and vice versa.  
> One could change that, but a lot of programs would become less efficient as a 
> result.
>

I was concerned by the "vice versa" conversion--from an error call to
non-termination.  If more than one bottoms (say, a non-termination and
an error call) are present in my program, I'm fine with getting any
one of them.  If I have only an error call, though, I do want to see
an error message.  An infinite loop would be unhelpful.  So, I would
consider it an unfriendly "willy nilly" convertion for GHC to generate
code for:

  import System.Environment ( getArgs )
  main = getArgs >>= putStrLn . head

that failed to terminate when I passed no command-line arguments.

-m
  


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to