Respectfully I disagree. <div><br></div><div>You are pushing a breaking change to functionality in the base exception Api without </div><div>a) demonstrating the Api is better</div><div> b) understanding the impact on preexisting code that would needlessly break </div><div>c) without doing a prototype outside of base to demonstrate that this alternative is better both in terms of the underlying library complexity and how the resulting application complexity changes.  </div><div><br></div><div>I am voicing an opinion other readers on the libraries list have on this matter but are too polite or wise to air this feedback publicly. </div><div><br></div><div>The onus is on the proposer to demonstrate validity. </div><div><br></div><div>Cheers </div><div>-Carter <span></span><br><br>On Friday, July 15, 2016, David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">You are very welcome to do so if you don't think further discussion will be useful. Those who feel otherwise may continue to discuss it.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Jul 15, 2016 9:23 AM, "Carter Schonwald" <<a href="javascript:_e(%7B%7D,'cvml','carter.schonwald@gmail.com');" target="_blank">carter.schonwald@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Again, at this juncture it sounds like effort would be better spent first writing out an alternative userland lib to understand these design ideas / articulate their impact better <span></span><br><br>On Friday, July 15, 2016, David Thomas <<a href="javascript:_e(%7B%7D,'cvml','davidleothomas@gmail.com');" target="_blank">davidleothomas@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I kinda like "ExceptionDisposition" for the type, no particular ideas<br>
on the constructors.  Offered only in the spirit of tossing out ideas<br>
- feel free to ignore me if it's not helpful :)<br>
<br>
On Thu, Jul 14, 2016 at 3:20 PM, Carter Schonwald<br>
<<a>carter.schonwald@gmail.com</a>> wrote:<br>
> At this point maybe it'd be better to write out these ideas as a library and<br>
> implement a bunch of example codes for different approaches.  Changing the<br>
> interfaces for exception handling code is subtle stuff!<br>
><br>
><br>
> On Jul 14, 2016 5:42 PM, "Oliver Charles" <<a>ollie@ocharles.org.uk</a>> wrote:<br>
>><br>
>> data ExceptionHandler a = Rethrow | HandleException (IO a)<br>
>><br>
>> would be my offering of paint.<br>
>><br>
>> On Thu, Jul 14, 2016 at 9:52 PM David Feuer <<a>david.feuer@gmail.com</a>> wrote:<br>
>>><br>
>>> Handle is no good because it clashes with file handles. How about<br>
>>> Reaction?<br>
>>><br>
>>><br>
>>> On Jul 14, 2016 1:53 PM, "Andreas Abel" <<a>andreas.abel@ifi.lmu.de</a>> wrote:<br>
>>>><br>
>>>> Maybe rather<br>
>>>><br>
>>>>   data Handle a = Rethrow | Handle (IO a)<br>
>>>><br>
>>>> !?<br>
>>>> On 14.07.2016 19:12, David Feuer wrote:<br>
>>>>><br>
>>>>> That makes sense, I guess. Something like<br>
>>>>><br>
>>>>> data Handle a = Rethrow | Catch (IO a)<br>
>>>>><br>
>>>>> I suppose? My names are awful though.<br>
>>>>><br>
>>>>><br>
>>>>> On Jul 14, 2016 12:56 PM, "Oliver Charles" <<a>ollie@ocharles.org.uk</a><br>
>>>>> <mailto:<a>ollie@ocharles.org.uk</a>>> wrote:<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>>     On Tue, 12 Jul 2016, 1:23 a.m. David Feuer, <<a>david.feuer@gmail.com</a><br>
>>>>>     <mailto:<a>david.feuer@gmail.com</a>>> wrote:<br>
>>>>><br>
>>>>>         The catchJust and handleJust functions seem a bit weird and<br>
>>>>>         unidiomatic.<br>
>>>>><br>
>>>>>         catchJust<br>
>>>>>                  :: Exception e<br>
>>>>>                  => (e -> Maybe b)         -- ^ Predicate to select<br>
>>>>>         exceptions<br>
>>>>>                  -> IO a                   -- ^ Computation to run<br>
>>>>>                  -> (b -> IO a)            -- ^ Handler<br>
>>>>>                  -> IO a<br>
>>>>>         catchJust p a handler = catch a handler'<br>
>>>>>            where handler' e = case p e of<br>
>>>>>                                  Nothing -> throwIO e<br>
>>>>>                                  Just b  -> handler b<br>
>>>>><br>
>>>>>         This takes two functions and then puts them together. I would<br>
>>>>>         think the more natural API would be<br>
>>>>><br>
>>>>>         catchMaybe :: Exception e => IO a -> (e -> Maybe (IO a)) -> IO<br>
>>>>> a<br>
>>>>>         catchMaybe m handler = catch m handler' where<br>
>>>>>            handler' e = fromMaybe (throwIO e) (handler e)<br>
>>>>><br>
>>>>>     A point don't feel super strongly about, but feel I should raise,<br>
>>>>> is<br>
>>>>>     that Nothing seems to be somewhat confusing. catchJust<br>
>>>>>     (\FileNotFound -> Nothing) seems to suggest that if FileNotFound<br>
>>>>>     occurs then nothing will happen, that is - the exception is<br>
>>>>> ignored.<br>
>>>>>     However, that is not the case, rather than Nothing happening<br>
>>>>>     something certainly happens - an exception is (re)thrown!<br>
>>>>><br>
>>>>>     Whether or not this confusion is likely to happen in practice I<br>
>>>>>     don't know, but it suggests a type isomorphic to Maybe is a better<br>
>>>>> fit.<br>
>>>>><br>
>>>>>     Ollie<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> Libraries mailing list<br>
>>>>> <a>Libraries@haskell.org</a><br>
>>>>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
>>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Andreas Abel  <><      Du bist der geliebte Mensch.<br>
>>>><br>
>>>> Department of Computer Science and Engineering<br>
>>>> Chalmers and Gothenburg University, Sweden<br>
>>>><br>
>>>> <a>andreas.abel@gu.se</a><br>
>>>> <a href="http://www2.tcs.ifi.lmu.de/~abel/" target="_blank">http://www2.tcs.ifi.lmu.de/~abel/</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Libraries mailing list<br>
>> <a>Libraries@haskell.org</a><br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
>><br>
><br>
> _______________________________________________<br>
> Libraries mailing list<br>
> <a>Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
><br>
</blockquote>
<br>_______________________________________________<br>
Libraries mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','Libraries@haskell.org');" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div></div>
</blockquote></div>