unexpected ambiguity

wizztick-ghc at douma.eu.org wizztick-ghc at douma.eu.org
Mon Apr 10 10:53:34 EDT 2006

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

import Control.Monad.State hiding (lift)

The error message surly makes you look in the wrong direction.


More information about the Glasgow-haskell-users mailing list