Use a *constructor* name when promoting a type
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 5 Jun 2012 10:43:31 +0000 (11:43 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 5 Jun 2012 10:43:31 +0000 (11:43 +0100)
This is when converting from TH -> HsSyn
Thanks to Richard Eisenberg

compiler/hsSyn/Convert.lhs

index ef17c60..aa141fa 100644 (file)
@@ -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