From: panne Date: Sun, 28 May 2000 21:54:12 +0000 (+0000) Subject: [project @ 2000-05-28 21:54:12 by panne] X-Git-Tag: Approximately_9120_patches~4359 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1d78b48000c25695e70ba539760c9e6260971562;p=ghc-hetmet.git [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* --- diff --git a/ghc/compiler/deSugar/DsForeign.lhs b/ghc/compiler/deSugar/DsForeign.lhs index d2c20a3..a5780f9 100644 --- a/ghc/compiler/deSugar/DsForeign.lhs +++ b/ghc/compiler/deSugar/DsForeign.lhs @@ -30,7 +30,7 @@ import Name ( mkGlobalName, nameModule, nameOccName, getOccString, mkForeignExportOcc, isLocalName, NamedThing(..), Provenance(..), ExportFlag(..) ) -import Type ( unUsgTy, +import Type ( unUsgTy, repType, splitTyConApp_maybe, splitFunTys, splitForAllTys, Type, mkFunTys, mkForAllTys, mkTyConApp, mkTyVarTy, mkFunTy, splitAppTy, applyTy, funResultTy @@ -493,7 +493,7 @@ showStgType t = text "Stg" <> text (showFFIType t) showFFIType :: Type -> String showFFIType t = getOccString (getName tc) where - tc = case splitTyConApp_maybe t of + tc = case splitTyConApp_maybe (repType t) of Just (tc,_) -> tc Nothing -> pprPanic "showFFIType" (ppr t) \end{code}