[commit: ghc] master: Use a *constructor* name when promoting a type (d69f5e4)

Simon Peyton Jones simonpj at microsoft.com
Tue Jun 5 12:56:51 CEST 2012


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d69f5e46a6d421e17ccf49d5517d009733de3dd5

>---------------------------------------------------------------

commit d69f5e46a6d421e17ccf49d5517d009733de3dd5
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Jun 5 11:43:31 2012 +0100

    Use a *constructor* name when promoting a type
    
    This is when converting from TH -> HsSyn
    Thanks to Richard Eisenberg

>---------------------------------------------------------------

 compiler/hsSyn/Convert.lhs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs
index ef17c60..aa141fa 100644
--- a/compiler/hsSyn/Convert.lhs
+++ b/compiler/hsSyn/Convert.lhs
@@ -861,7 +861,8 @@ cvtTypeKind ty_str ty
            LitT lit
              -> returnL (HsTyLit (cvtTyLit lit))
 
-           PromotedT nm -> do { nm' <- tconName nm; mk_apps (HsTyVar nm') tys' }
+           PromotedT nm -> do { nm' <- cName nm; mk_apps (HsTyVar nm') tys' }
+                 -- Promoted data constructor; hence cName
 
            PromotedTupleT n
              | n == 1





More information about the Cvs-ghc mailing list