[project @ 2004-11-09 13:28:13 by simonpj]
authorsimonpj <unknown>
Tue, 9 Nov 2004 13:28:13 +0000 (13:28 +0000)
committersimonpj <unknown>
Tue, 9 Nov 2004 13:28:13 +0000 (13:28 +0000)
Fix a bug in fixity handling for tycons; we were rembering the data-con RdrName, not the tycon one

ghc/compiler/rename/RnSource.lhs

index 1738105..6ee9f8a 100644 (file)
@@ -35,7 +35,7 @@ import BasicTypes     ( TopLevelFlag(..)  )
 import HscTypes                ( FixityEnv, FixItem(..),
                          Deprecations, Deprecs(..), DeprecTxt, plusDeprecs )
 import Class           ( FunDep )
-import Name            ( Name )
+import Name            ( Name, nameOccName )
 import NameSet
 import NameEnv
 import Outputable
@@ -179,8 +179,7 @@ rnFixityDecl fix_env (L loc (FixitySig rdr_name fixity))
                     returnM fix_env
          Nothing -> returnM (extendNameEnv fix_env name fix_item)
       where
-       fix_item = FixItem (rdrNameOcc (unLoc rdr_name)) fixity
-                        (getLoc rdr_name)
+       fix_item = FixItem (nameOccName name) fixity (getLoc rdr_name)
 
 pprFixEnv :: FixityEnv -> SDoc
 pprFixEnv env