From a27ef0b1541999fb02da450df4c09702a99ef3f3 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 15 Aug 2001 15:49:42 +0000 Subject: [PATCH] [project @ 2001-08-15 15:49:42 by simonmar] recognise constructors properly --- ghc/compiler/main/HscMain.lhs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index d8f4601..0414d7f 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -28,7 +28,7 @@ import HscTypes ( InteractiveContext(..) ) import PrelNames ( iNTERACTIVE ) import StringBuffer ( stringToStringBuffer ) import FastString ( mkFastString ) -import Char ( isLower ) +import Char ( isUpper ) import DriverUtil ( split_longest_prefix ) #endif @@ -630,8 +630,10 @@ hscThing dflags hst hit pcs0 icontext str fmod = mkFastString mod fvar = mkFastString var fstr = mkFastString str - namespaces s | isLower (head s) = [ varName ] - | otherwise = [ tcClsName, dataName ] + namespaces s + | isUpper c || c == ':' = [ tcClsName, dataName ] + | otherwise = [ varName ] + where c = head s (pcs, unqual, maybe_rn_result) <- renameRdrName dflags hit hst pcs0 scope_mod scope_mod -- 1.7.10.4