[Haskell] discrepancy between nhc and ghc

Simon Peyton-Jones simonpj at microsoft.com
Thu Dec 2 03:50:22 EST 2004


The Report explicitly specifies that you can export a class method "naked", for exactly the reason you give.  So I think GHC is right here.

Simon

| -----Original Message-----
| From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org] On Behalf Of John Meacham
| Sent: 02 December 2004 01:28
| To: haskell at haskell.org
| Subject: [Haskell] discrepancy between nhc and ghc
| 
| 
| 
| ghc:
| import Random(Random(randomR)) -- good
| import Random(randomR) -- good
| 
| nhc: (1.16)
| import Random(Random(randomR)) -- good
| import Random(randomR) -- ERROR! nhc says randomR is not found.
| 
| 
| I was wondering whether this was intentional and which was correct? I
| much much prefer the ghc behavior since it lets you export methods
| without exporting the class and lets you hide the implementation detail
| of whether a function is implemented as a method or normal declaration.
| 
| 
|         John
| 
| --
| John Meacham - ⑆repetae.net⑆john⑈
| _______________________________________________
| Haskell mailing list
| Haskell at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell


More information about the Haskell mailing list