for Control.Exception - would you (or someone
else) like to write and submit a patch? Or failing that, just putting it on
the wiki would be useful too.
I don't mind submitting a patch. What is the URL of the repo I should download?
http://darcs.haskell.org/packages/base
and the file is Control
On Tue, Nov 4, 2008 at 2:47 AM, Simon Marlow [EMAIL PROTECTED] wrote:
Jason Dagit wrote:
Thanks. This helps a lot. Mind if I put it somewhere, such as on the
wiki?
A good description of how to deal with exceptions would be great to have in
the Haddock documentation for Control.Exception
distinguish two kinds of exception handling:
Thanks. This helps a lot. Mind if I put it somewhere, such as on the wiki?
A good description of how to deal with exceptions would be great to have in
the Haddock documentation for Control.Exception - would you (or someone
else) like to write
On Tue, 04 Nov 2008 19:41:58 +0900, Duncan Coutts [EMAIL PROTECTED] wrote:
action
`catches`
[ \(e :: ExitCode) - ...
, \(e :: PatternMatchFail) - ...
]
or just by using multiple catch clauses:
action
`catch` (\(e :: ExitCode) - ...)
`catch` (\(e ::
Jason Dagit wrote:
On Wed, Oct 8, 2008 at 1:19 AM, Simon Marlow [EMAIL PROTECTED] wrote:
Johannes Waldmann wrote:
with 6.10, the following does not typecheck:
foo `Control.Exception.catch` \ _ - return bar
Ambiguous type variable `e' in the constraint:
`Control.Exception.Exception e'
On Mon, Nov 3, 2008 at 6:24 AM, Simon Marlow [EMAIL PROTECTED] wrote:
Jason Dagit wrote:
On Wed, Oct 8, 2008 at 1:19 AM, Simon Marlow [EMAIL PROTECTED] wrote:
Johannes Waldmann wrote:
with 6.10, the following does not typecheck:
foo `Control.Exception.catch` \ _ - return bar
Ambiguous
On Mon, Nov 3, 2008 at 9:34 AM, Jason Dagit [EMAIL PROTECTED] wrote:
Ah, but I had one more question that I don't think anyone has answered
yet. That is, how to deal with multiple types of exceptions.
Suppose, as a concrete example, that I was looking out for both
ExitCode and
On Mon, 2008-11-03 at 09:26 -0800, Sigbjorn Finne wrote:
On 11/3/2008 07:34, Jason Dagit wrote:
Ah, but I had one more question that I don't think anyone has answered
yet. That is, how to deal with multiple types of exceptions.
Suppose, as a concrete example, that I was looking
On 11/3/2008 07:34, Jason Dagit wrote:
Ah, but I had one more question that I don't think anyone has answered
yet. That is, how to deal with multiple types of exceptions.
Suppose, as a concrete example, that I was looking out for both
ExitCode and PatternMatchFail exceptions. Maybe I'm
On Mon, Nov 3, 2008 at 12:53 PM, Duncan Coutts
[EMAIL PROTECTED] wrote:
On Mon, 2008-11-03 at 09:26 -0800, Sigbjorn Finne wrote:
One way to do this now is to use Control.Exception.catches:
catches :: IO a - [Handler a] - IO a
data Handler a where
Handler :: forall a e. (Exception e) =
On Tue, 04 Nov 2008 07:40:50 +0900, David Menendez [EMAIL PROTECTED] wrote:
ie:
action
`catches`
[ \(e :: ExitCode) - ...
, \(e :: PatternMatchFail) - ...
]
or just by using multiple catch clauses:
action
`catch` (\(e :: ExitCode) - ...)
`catch` (\(e :: PatternMatchFail) -
On Mon, Nov 3, 2008 at 7:27 PM, shelarcy [EMAIL PROTECTED] wrote:
On Tue, 04 Nov 2008 07:40:50 +0900, David Menendez [EMAIL PROTECTED] wrote:
ie:
action
`catches`
[ \(e :: ExitCode) - ...
, \(e :: PatternMatchFail) - ...
]
or just by using multiple catch clauses:
action
I think the best way to get backwards compatibility is to flesh out
and use the extensible-exceptions package that Ian started, which
models extensible exceptions on top of the old exception mechanism.
Alternatively, you can decide not to use extensible exceptions and
have your package depend on
On Sat, 2008-11-01 at 19:09 -0700, Sigbjorn Finne wrote:
(+1) to that request - what is the best practices for portable exception
handling code that straddles version 6.10, i.e. that compiles with compilers
at either side with minimal fuss? I can imagine a couple of
alternatives, but
would
On Wed, Oct 8, 2008 at 1:19 AM, Simon Marlow [EMAIL PROTECTED] wrote:
Johannes Waldmann wrote:
with 6.10, the following does not typecheck:
foo `Control.Exception.catch` \ _ - return bar
Ambiguous type variable `e' in the constraint:
`Control.Exception.Exception e'
It is probably
(+1) to that request - what is the best practices for portable exception
handling code that straddles version 6.10, i.e. that compiles with compilers
at either side with minimal fuss? I can imagine a couple of
alternatives, but
would like to hear what others are doing here.
thanks
--sigbjorn
Johannes Waldmann wrote:
with 6.10, the following does not typecheck:
foo `Control.Exception.catch` \ _ - return bar
Ambiguous type variable `e' in the constraint:
`Control.Exception.Exception e'
It is probably bad programming style anyway but what is the workaround?
As long as you're
with 6.10, the following does not typecheck:
foo `Control.Exception.catch` \ _ - return bar
Ambiguous type variable `e' in the constraint:
`Control.Exception.Exception e'
It is probably bad programming style anyway but what is the workaround?
I found some references (in list emails) to
2008/10/7 Johannes Waldmann [EMAIL PROTECTED]:
with 6.10, the following does not typecheck:
foo `Control.Exception.catch` \ _ - return bar
Ambiguous type variable `e' in the constraint:
`Control.Exception.Exception e'
catch \(e :: SomeException) - ...
This requires language
catch \(e :: SomeException) - ...
So, this changes the API (from 6.8 to 6.10)?
I see there is Control.OldException (providing the old catch)
but that still does not help me if I want my code compile
with both 6.8 and 6.10. Is there some version of catch that works both ways?
best regards,
On Tue, 2008-10-07 at 20:50 +0200, Johannes Waldmann wrote:
catch \(e :: SomeException) - ...
So, this changes the API (from 6.8 to 6.10)?
I see there is Control.OldException (providing the old catch)
but that still does not help me if I want my code compile
with both 6.8 and 6.10. Is
On Tue, Oct 07, 2008 at 12:54:55PM -0700, Duncan Coutts wrote:
On Tue, 2008-10-07 at 20:50 +0200, Johannes Waldmann wrote:
catch \(e :: SomeException) - ...
So, this changes the API (from 6.8 to 6.10)?
I see there is Control.OldException (providing the old catch)
but that still
22 matches
Mail list logo