[Git][ghc/ghc][wip/torsten.schmits/0475-tuple-syntax-2] JS linker: filter unboxed tuples
Sylvain Henry (@hsyl20)
gitlab at gitlab.haskell.org
Fri Mar 1 13:09:05 UTC 2024
Sylvain Henry pushed to branch wip/torsten.schmits/0475-tuple-syntax-2 at Glasgow Haskell Compiler / GHC
Commits:
2825d289 by Sylvain Henry at 2024-03-01T14:08:19+01:00
JS linker: filter unboxed tuples
- - - - -
1 changed file:
- compiler/GHC/StgToJS/Utils.hs
Changes:
=====================================
compiler/GHC/StgToJS/Utils.hs
=====================================
@@ -341,10 +341,16 @@ collectIds unfloated b =
in seqList xs `seq` xs
where
acceptId i = all ($ i) [not . isForbidden] -- fixme test this: [isExported[isGlobalId, not.isForbidden]
- -- the GHC.Prim module has no js source file
isForbidden i
- | Just m <- nameModule_maybe (getName i) = m == gHC_PRIM
- | otherwise = False
+ -- the GHC.Prim module has no js source file
+ | Just m <- nameModule_maybe (getName i)
+ , m == gHC_PRIM
+ = True
+ -- unboxed tuples have no definition
+ | isUnboxedTupleDataConLikeName (getName i)
+ = True
+ | otherwise
+ = False
-----------------------------------------------------
-- Live vars
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2825d28912ab1134a606f12f74734b1add9bdbd5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2825d28912ab1134a606f12f74734b1add9bdbd5
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240301/4a17358e/attachment-0001.html>
More information about the ghc-commits
mailing list