Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  type ambiguity confusion (Daniel Fischer)


----------------------------------------------------------------------

Message: 1
Date: Tue, 15 Jun 2010 16:12:22 +0200
From: Daniel Fischer <daniel.is.fisc...@web.de>
Subject: Re: [Haskell-beginners] type ambiguity confusion
To: beginners@haskell.org
Message-ID: <201006151612.22947.daniel.is.fisc...@web.de>
Content-Type: text/plain;  charset="iso-8859-1"

On Tuesday 15 June 2010 16:07:38, Stephen Tetley wrote:
> On 15 June 2010 14:57, Thomas <hask...@phirho.com> wrote:
> > However: Why does the ambiguity matter in the first place?
> > The corresponding value is never used (\_ -> return Nothing).
>
> Hi Thomas
>
> GHC has to resolve all types, even if they are for values that are not
> used at runtime.
>
> > And there's another doubt: I got this example from a book (Real World
> > Haskell, chapter 9) where actually the first version is used, without
> > resolving the ambiguity in any way. And it does not show up in the
> > errata list.
> > So there's likely something I'm still missing about this issue?!?!
>
> The type of handle in Control.Exception has (probably) changed since
> RWH was written.

Right.

>
> latest (from ghc-6.10.1 onwards):
> handle  :: Exception  e => (e -> IO  a) -> IO  a -> IO  a
>
> old (upto ghc-6.8.3, I think, the so called Old.Exception):

Small typo, no dot there, the former Control.Exception still available as

Control.OldException

> handle  :: (Exception  -> IO  a) -> IO  a -> IO  a
>
> Best wishes
>
> Stephen


------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 24, Issue 15
*****************************************

Reply via email to