With the program: import Exception main = let catch = Prelude.catch in catch (print "ok") print hugs 98 version 20021021 gives: __ __ __ __ ____ ___ _________________________________________ || || || || || || ||__ Hugs 98: Based on the Haskell 98 standard ||___|| ||__|| ||__|| __|| Copyright (c) 1994-2002 ||---|| ___|| World Wide Web: http://haskell.org/hugs || || Report bugs to: hugs-bugs@haskell.org || || Version: 20021021 _________________________________________ Haskell 98 mode: Restart with command line option -98 to enable extensions Reading file "/stotts2/epa1/hugs98-Oct2002/rel/lib/hugs/lib/Prelude.hs": Reading file "ImportAmbiguity.hs": Reading file "/stotts2/epa1/hugs98-Oct2002/rel/lib/hugs/lib/exts/Exception.hs": Reading file "ImportAmbiguity.hs": Dependency analysis ERROR "ImportAmbiguity.hs":2 - Ambiguous variable occurrence "catch" *** Could refer to: Prelude.catch Exception.catch Exception> whereas GHC accepts the program. Which system is right? By the way, hugs98-Dec2001 gives: Reading file "ImportAmbiguity.hs": Reading file "/stotts2/epa1/hugs98-Dec2001/rel/share/hugs/lib/exts/Exception.hs": Reading file "ImportAmbiguity.hs": ERROR "ImportAmbiguity.hs" - Entity "catch" imported from module "Exception" already defined in module "Prelude"
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
Hi,
thanks for the report. Now fixed.
--sigbjorn
----- Original Message -----
From: "Dean Herington"
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
...
participants (3)
-
Dean Herington -
Ross Paterson -
Sigbjorn Finne