[Haskell-cafe] ($) not as transparent as it seems
Antoine Latter
aslatter at gmail.com
Thu Feb 3 22:25:04 CET 2011
On Thu, Feb 3, 2011 at 2:44 PM, Steffen Schuldenzucker
<sschuldenzucker at uni-bonn.de> wrote:
>
> Dear cafe,
>
> does anyone have an explanation for this?:
>
>>>> error (error "foo")
> *** Exception: foo
>
>>>> error $ error "foo"
> *** Exception: *** Exception: foo
I don't know if this is relevant, but I thought that the GHC compiler
believes that all exceptions are equivalent and indistinguishable -
that is, in the presence of multiple exceptional code-paths it will
make optimizations that would not otherwise otherwise be sound.
That might not be the issue here, but it is interesting.
http://research.microsoft.com/en-us/um/people/simonpj/papers/imprecise-exn.htm
Antoine
>
> -- Steffen
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list