[Haskell-cafe] Type families are awesome
John Ky
newhoggy at gmail.com
Tue Jan 27 19:11:41 EST 2009
Thanks Luke,
Works great.
On Wed, Jan 21, 2009 at 7:35 PM, Luke Palmer <lrpalmer at gmail.com> wrote:
> 2009/1/21 John Ky <newhoggy at gmail.com>
>>
>> *Main> let x = lookup
>> *Main> let y = Fx.Data.Map.lookup
>>
>> <interactive>:1:8:
>> Ambiguous type variable `ma' in the constraint:
>> `Fx.Data.Map.MapType ma'
>> arising from a use of `Fx.Data.Map.lookup' at <interactive>:1:8-25
>> Probable fix: add a type signature that fixes these type variable(s)
>
>
> I think this is just the monomorphism restriction. Turn it off with
> -XNoMonomorphismRestriction, or add a parameter to the binding:
>
> let x k = lookup k
>
> Luke
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090128/50c7929b/attachment.htm
More information about the Haskell-Cafe
mailing list