[Haskell-cafe] GHCi and HXT

Alexis Hazell bonobo at bigpond.net.au
Tue Nov 28 04:38:43 EST 2006


On Tue, 28 Nov 2006 07:43 pm, Daniel McAllansmith wrote:
> On Tuesday 28 November 2006 20:50, Alexis Hazell wrote:
> > i don't understand why i need to specify type signatures when they should
> > already be in scope?
>
> Is this a result of the monomorphism restriction?

Er . . . . i hadn't heard of this until just now. So i'll have to do some 
reading on the matter. :-)

> You need to add a type signature that specifies a specific arrow data type
> 'a' that is an instance of ArrowXml.

Ah! i see - thanks.

> By the way, once you have the declaration of contact in a source file, and
> it is being used by a function in which the ArrowXml instance is not
> ambiguous eg:
>
> foo = runX contact
>
> the type checker will be able to infer the type and you don't have to
> include the type signature.

*nod*

Thanks again for your help. :-)


Alexis.


More information about the Haskell-Cafe mailing list