unexpected ambiguity
Niklas Sorensson
nik at cs.chalmers.se
Mon Apr 10 10:48:15 EDT 2006
wizztick-ghc at douma.eu.org wrote:
> Niklas Sorensson wrote:
>> Main.hs:8:15:
>> Ambiguous occurrence `lift'
>> It could refer to either `Control.Monad.Trans.lift', ...
>> or `Apa.lift', imported from Apa at ...
>>
>> Is this correct? I would have expected that an unqualified lift could only
>> refer to the one exported from Apa in this case.
>
> The error is correct. The module Control.Monad.State re-export the lift
> identifier from Control.Monad.Trans.
>
> Thus the line 'import Control.Monad.State' is the evildoer. Use for
> example:
>
> import Control.Monad.State hiding (lift)
>
> The error message surly makes you look in the wrong direction.
Ideed. Thanks for the explanation!
/Niklas
More information about the Glasgow-haskell-users
mailing list