Commit 1d78b480 authored by panne's avatar panne
Browse files

[project @ 2000-05-28 21:54:12 by panne]

Look through newtypes when generating stub code.
*merge if/when SPJ's huge commit is merged*
parent 19f4809b
...@@ -30,7 +30,7 @@ import Name ( mkGlobalName, nameModule, nameOccName, getOccString, ...@@ -30,7 +30,7 @@ import Name ( mkGlobalName, nameModule, nameOccName, getOccString,
mkForeignExportOcc, isLocalName, mkForeignExportOcc, isLocalName,
NamedThing(..), Provenance(..), ExportFlag(..) NamedThing(..), Provenance(..), ExportFlag(..)
) )
import Type ( unUsgTy, import Type ( unUsgTy, repType,
splitTyConApp_maybe, splitFunTys, splitForAllTys, splitTyConApp_maybe, splitFunTys, splitForAllTys,
Type, mkFunTys, mkForAllTys, mkTyConApp, Type, mkFunTys, mkForAllTys, mkTyConApp,
mkTyVarTy, mkFunTy, splitAppTy, applyTy, funResultTy mkTyVarTy, mkFunTy, splitAppTy, applyTy, funResultTy
...@@ -493,7 +493,7 @@ showStgType t = text "Stg" <> text (showFFIType t) ...@@ -493,7 +493,7 @@ showStgType t = text "Stg" <> text (showFFIType t)
showFFIType :: Type -> String showFFIType :: Type -> String
showFFIType t = getOccString (getName tc) showFFIType t = getOccString (getName tc)
where where
tc = case splitTyConApp_maybe t of tc = case splitTyConApp_maybe (repType t) of
Just (tc,_) -> tc Just (tc,_) -> tc
Nothing -> pprPanic "showFFIType" (ppr t) Nothing -> pprPanic "showFFIType" (ppr t)
\end{code} \end{code}
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