[Haskell-cafe] Problem about exception.
Magicloud Magiclouds
magicloud.magiclouds at gmail.com
Thu Jan 27 04:13:41 CET 2011
On Thu, Jan 27, 2011 at 11:09 AM, Brandon S Allbery KF8NH
<allbery.b at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 1/26/11 22:02 , Magicloud Magiclouds wrote:
>> Sorry, in last mail, I meant, in really wrong situation, there might
>> be other tens of unexpected command, I'd like to wrap them in one
>> exception, other than making tens of exceptions.
>
> I'm not sure you can get away with that in a monadic computation, unless you
> hold all the exceptions until everything is done... and if there's no way to
> control "everything is done" you have a potential DoS. (Worse, it looked to
> me like one of those ControlExceptiion-s *was* the "everything is done",
> which makes holding onto things problematic plus makes me wonder what good
> the debug message is if it's batched until protocol shutdown.
>
> - --
> brandon s. allbery [linux,solaris,freebsd,perl] allbery at kf8nh.com
> system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
> electrical and computer engineering, carnegie mellon university KF8NH
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1A4e0ACgkQIn7hlCsL25X8lQCbBrKO5Lmwazn9025FcDlZ8DYH
> 2BEAoKuc6bVOH3gG13aa9OUkBoCCmLiP
> =0NWM
> -----END PGP SIGNATURE-----
>
Yes, the problem is that Exception cannot hold anything in it. Things
like Either might work. I am thinking how to make it work with
StateT....
--
竹密岂妨流水过
山高哪阻野云飞
More information about the Haskell-Cafe
mailing list