Re: [Haskell-cafe] Monad-control rant

2012-01-31 Thread Mikhail Vorozhtsov
On 01/29/2012 11:55 PM, Edward Z. Yang wrote: Excerpts from Mikhail Vorozhtsov's message of Sun Jan 29 05:34:17 -0500 2012: [snip] I think it is one of the simplest layouts one can some up with. I'll try to explain the motivation behind each inclusion. ABORTS(μ) ⊆ RECOVERABLE_ZEROS(μ) I'm

Re: [Haskell-cafe] Monad-control rant

2012-01-29 Thread Mikhail Vorozhtsov
On 01/24/2012 10:56 PM, Edward Z. Yang wrote: Excerpts from Mikhail Vorozhtsov's message of Tue Jan 24 07:26:35 -0500 2012: Sure, but note that evaluate for IO is implemented with seq# under the hood, so as long as you actually get ordering in your monad it's fairly straightforward to

Re: [Haskell-cafe] Monad-control rant

2012-01-29 Thread Edward Z. Yang
Excerpts from Mikhail Vorozhtsov's message of Sun Jan 29 05:34:17 -0500 2012: You are trying to make bottoms a new null pointers. Sometimes it just doesn't worth the effort (or depends on the interpreter you use). I want to have the option to say: sorry, in this particular case (monad) I

Re: [Haskell-cafe] Monad-control rant

2012-01-24 Thread Mikhail Vorozhtsov
On 01/22/2012 02:47 AM, Edward Z. Yang wrote: Excerpts from Mikhail Vorozhtsov's message of Sat Jan 21 09:25:07 -0500 2012: But I also believe that you can't use this as justification to stick your head in the sand, and pretend bottoms don't exist (regardless of whether or not we'rd talking

Re: [Haskell-cafe] Monad-control rant

2012-01-24 Thread Edward Z. Yang
Excerpts from Mikhail Vorozhtsov's message of Tue Jan 24 07:26:35 -0500 2012: Sure, but note that evaluate for IO is implemented with seq# under the hood, so as long as you actually get ordering in your monad it's fairly straightforward to implement evaluate. (Remember that the ability

Re: [Haskell-cafe] Monad-control rant

2012-01-21 Thread Mikhail Vorozhtsov
On 01/18/2012 10:43 PM, Edward Z. Yang wrote: Excerpts from Mikhail Vorozhtsov's message of Wed Jan 18 08:47:37 -0500 2012: Well, that's the kind of language we live in. The denotation of our language always permits for bottom values, and it's not a terribly far jump from there to undefined

Re: [Haskell-cafe] Monad-control rant

2012-01-21 Thread Edward Z. Yang
Excerpts from Mikhail Vorozhtsov's message of Sat Jan 21 09:25:07 -0500 2012: But I also believe that you can't use this as justification to stick your head in the sand, and pretend bottoms don't exist (regardless of whether or not we'rd talking about asynchronous exceptions.) The reason is

Re: [Haskell-cafe] Monad-control rant

2012-01-18 Thread Mikhail Vorozhtsov
On 01/18/2012 01:52 AM, Brandon Allbery wrote: On Tue, Jan 17, 2012 at 06:29, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com mailto:mikhail.vorozht...@gmail.com wrote: I wouldn't be too optimistic about convincing GHC HQ. Even making Applicative a superclass of Monad can make Haskell98

Re: [Haskell-cafe] Monad-control rant

2012-01-18 Thread Mikhail Vorozhtsov
On 01/18/2012 02:45 AM, Edward Z. Yang wrote: Excerpts from Mikhail Vorozhtsov's message of Tue Jan 17 06:29:12 -0500 2012: The vehicle of implementation here is kind of important. If they are implemented as asynchronous exceptions, I can in fact still throw in this universe: I just attempt

Re: [Haskell-cafe] Monad-control rant

2012-01-18 Thread Edward Z. Yang
Excerpts from Mikhail Vorozhtsov's message of Wed Jan 18 08:47:37 -0500 2012: Well, that's the kind of language we live in. The denotation of our language always permits for bottom values, and it's not a terribly far jump from there to undefined and error foo. I don't consider the

Re: [Haskell-cafe] Monad-control rant

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 03:47, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com wrote: On 01/18/2012 01:52 AM, Brandon Allbery wrote: On Tue, Jan 17, 2012 at 06:29, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com mailto:mikhail.vorozhtsov@**gmail.commikhail.vorozht...@gmail.com wrote:

Re: [Haskell-cafe] Monad-control rant

2012-01-17 Thread Mikhail Vorozhtsov
On 01/17/2012 03:00 AM, Edward Z. Yang wrote: [snip] I don't think it makes too much sense have thing pick off a menu of Abort/Recover/Finally from a semantics perspective: It's easy to imagine monads that have an instance of one of the classes but not of the others I'd like to see some

Re: [Haskell-cafe] Monad-control rant

2012-01-17 Thread Brandon Allbery
On Tue, Jan 17, 2012 at 06:29, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com wrote: I wouldn't be too optimistic about convincing GHC HQ. Even making Applicative a superclass of Monad can make Haskell98 nazis come after you in ninja suits. What?! The only significant complaint I've seen

Re: [Haskell-cafe] Monad-control rant

2012-01-16 Thread Mikhail Vorozhtsov
On 01/16/2012 02:15 PM, Edward Z. Yang wrote: Hello Mikhail, Hi. Sorry, long email. tl;dr I think it makes more sense for throw/catch/mask to be bundled together, and it is the case that splitting these up doesn't address the original issue monad-control was designed to solve.

Re: [Haskell-cafe] Monad-control rant

2012-01-16 Thread Brandon Allbery
On Mon, Jan 16, 2012 at 08:17, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com wrote: As I said, you think of IO too much. I think you two are talking about two related but different things; monad-control is solving a *specific* problem with IO, but you want something more general. I think

Re: [Haskell-cafe] Monad-control rant

2012-01-16 Thread Edward Z. Yang
Hello Mikhail, Thanks for continuing to be willing to participate in a lively discussion. :-) Excerpts from Mikhail Vorozhtsov's message of Mon Jan 16 08:17:57 -0500 2012: On 01/16/2012 02:15 PM, Edward Z. Yang wrote: Anders and I thought a little more about your example, and we first wanted

Re: [Haskell-cafe] Monad-control rant

2012-01-15 Thread Edward Z. Yang
Hello Mikhail, Sorry, long email. tl;dr I think it makes more sense for throw/catch/mask to be bundled together, and it is the case that splitting these up doesn't address the original issue monad-control was designed to solve. ~ * ~ Anders and I thought a

Re: [Haskell-cafe] Monad-control rant

2012-01-14 Thread Mikhail Vorozhtsov
On 01/10/2012 11:12 PM, Edward Z. Yang wrote: Excerpts from Mikhail Vorozhtsov's message of Tue Jan 10 09:54:38 -0500 2012: On 01/10/2012 12:17 AM, Edward Z. Yang wrote: Hello Mikhail, Hi. (Apologies for reviving a two month old thread). Have you put some thought into whether or not these

Re: [Haskell-cafe] Monad-control rant

2012-01-10 Thread Mikhail Vorozhtsov
On 01/10/2012 12:17 AM, Edward Z. Yang wrote: Hello Mikhail, Hi. (Apologies for reviving a two month old thread). Have you put some thought into whether or not these extra classes generalize in a way that is not /quite/ as general as MonadBaseControl (so as to give you the power you need) but

Re: [Haskell-cafe] Monad-control rant

2012-01-10 Thread Edward Z. Yang
Excerpts from Mikhail Vorozhtsov's message of Tue Jan 10 09:54:38 -0500 2012: On 01/10/2012 12:17 AM, Edward Z. Yang wrote: Hello Mikhail, Hi. (Apologies for reviving a two month old thread). Have you put some thought into whether or not these extra classes generalize in a way that is

Re: [Haskell-cafe] Monad-control rant

2012-01-09 Thread Edward Z. Yang
Hello Mikhail, (Apologies for reviving a two month old thread). Have you put some thought into whether or not these extra classes generalize in a way that is not /quite/ as general as MonadBaseControl (so as to give you the power you need) but still allow you to implement the functionality you

Re: [Haskell-cafe] Monad-control rant

2011-11-13 Thread Bas van Dijk
Hi Mikhail, your type class: class MonadAbort e μ ⇒ MonadRecover e μ | μ → e where recover ∷ μ α → (e → μ α) → μ α looks a lot like the MonadCatchIO type class from MonadCatchIO-transformers: class MonadIO m = MonadCatchIO m where catch :: E.Exception e = m a - (e - m a) - m a I haven't

Re: [Haskell-cafe] Monad-control rant

2011-11-13 Thread Mikhail Vorozhtsov
On 11/14/2011 06:55 AM, Bas van Dijk wrote: Hi Mikhail, your type class: class MonadAbort e μ ⇒ MonadRecover e μ | μ → e where recover ∷ μ α → (e → μ α) → μ α looks a lot like the MonadCatchIO type class from MonadCatchIO-transformers: class MonadIO m = MonadCatchIO m where catch ::

[Haskell-cafe] Monad-control rant

2011-11-12 Thread Mikhail Vorozhtsov
On 11/12/2011 07:34 AM, Bas van Dijk wrote: Are you going to release a new version of monad-control right away Not just yet. I've split `monad-control` into two packages: * `monad-control`: just exports `Control.Monad.Trans.Control`. This part is finished. * `lifted-base`: wraps all modules