Commit 9f6ed71a authored by qrczak's avatar qrczak
Browse files

[project @ 2000-12-08 21:28:15 by qrczak]

Let newtypes in stub files generate correct C type names.
It worked in ghc-4.09 but was not merged into 4.11?
parent b2326479
......@@ -29,7 +29,8 @@ import Name ( mkGlobalName, nameModule, nameOccName, getOccString,
mkForeignExportOcc, isLocalName,
import Type ( splitTyConApp_maybe, tyConAppTyCon, splitFunTys, splitForAllTys,
import Type ( repType, splitTyConApp_maybe,
tyConAppTyCon, splitFunTys, splitForAllTys,
Type, mkFunTys, mkForAllTys, mkTyConApp,
mkFunTy, splitAppTy, applyTy, funResultTy
......@@ -486,5 +487,9 @@ showStgType :: Type -> SDoc
showStgType t = text "Hs" <> text (showFFIType t)
showFFIType :: Type -> String
showFFIType t = getOccString (getName (tyConAppTyCon t))
showFFIType t = getOccString (getName tc)
tc = case splitTyConApp_maybe (repType t) of
Just (tc,_) -> tc
Nothing -> pprPanic "showFFIType" (ppr t)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment