Jaro Reinders pushed to branch wip/reduce-type-in-stg at Glasgow Haskell Compiler / GHC Commits: 38a30a91 by Jaro Reinders at 2026-06-06T13:01:19+02:00 Fix two remaining issues - - - - - 2 changed files: - compiler/GHC/Stg/Syntax.hs - compiler/GHC/StgToJS/FFI.hs Changes: ===================================== compiler/GHC/Stg/Syntax.hs ===================================== @@ -993,8 +993,7 @@ pprStgOp :: StgOp -> SDoc pprStgOp (StgPrimOp op) = ppr op pprStgOp (StgPrimCallOp op _)= ppr op pprStgOp (StgFCallOp op _ _) = ppr op --- TODO: how do we want to pretty print this? -pprStgOp (StgTagToEnumOp tyc) = text "TagToEnumOp" <+> ppr tyc +pprStgOp (StgTagToEnumOp _tyc) = text "tagToEnum#" instance Outputable StgOp where ppr = pprStgOp ===================================== compiler/GHC/StgToJS/FFI.hs ===================================== @@ -184,7 +184,7 @@ genForeignCall _ctx (CCall (CCallSpec (StaticTarget ext tgt ForeignFunction) JavaScriptCallConv PlayRisky)) - _t + _ki [obj] args | tgt == hdBuildObjectStr @@ -195,12 +195,9 @@ genForeignCall _ctx , ExprInline ) -genForeignCall ctx (CCall (CCallSpec ccTarget cconv safety)) k tgt args = do - -- TODO: the 'unknown' here was originally the type constructor shown by 'showType' - -- but now we don't have access to that any more. I'm not sure if this is necessary - -- for the JS back end. - emitForeign (ctxSrcSpan ctx) lbl safety cconv (map showArgType args) unknown - (,exprResult) <$> parseFFIPattern catchExcep async isJsCc (unpackFS lbl) k tgt' args +genForeignCall ctx (CCall (CCallSpec ccTarget cconv safety)) ki tgt args = do + emitForeign (ctxSrcSpan ctx) lbl safety cconv (map showArgType args) (showType (getStgKind ki)) + (,exprResult) <$> parseFFIPattern catchExcep async isJsCc (unpackFS lbl) ki tgt' args where isJsCc = cconv == JavaScriptCallConv View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/38a30a911b4d52665e5d9c782e410498... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/38a30a911b4d52665e5d9c782e410498... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Jaro Reinders (@jaro)