import ambiguity

Ross Paterson ross@soi.city.ac.uk
Wed, 23 Oct 2002 18:29:38 +0100


On Wed, Oct 23, 2002 at 01:14:37PM -0400, Dean Herington wrote:
> With the program:
> 
> import Exception
> main = let catch = Prelude.catch in catch (print "ok") print
> 
> hugs 98 version 20021021 gives:
> [...]
> Dependency analysis
> ERROR "ImportAmbiguity.hs":2 - Ambiguous variable occurrence "catch"
> *** Could refer to: Prelude.catch Exception.catch

It's a Hugs bug; more simply:

module A where x = 1

module B where x = 4

module C where
import A
import B

y = let x = A.x in x