From: simonmar Date: Wed, 15 Aug 2001 15:49:42 +0000 (+0000) Subject: [project @ 2001-08-15 15:49:42 by simonmar] X-Git-Tag: Approximately_9120_patches~1223 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a27ef0b1541999fb02da450df4c09702a99ef3f3;p=ghc-hetmet.git [project @ 2001-08-15 15:49:42 by simonmar] recognise constructors properly --- 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