[Git][ghc/ghc][wip/js-supported-extensions] lint
Josh Meredith (@JoshMeredith)
gitlab at gitlab.haskell.org
Tue May 23 13:41:09 UTC 2023
Josh Meredith pushed to branch wip/js-supported-extensions at Glasgow Haskell Compiler / GHC
Commits:
353821ed by Josh Meredith at 2023-05-23T13:40:52+00:00
lint
- - - - -
1 changed file:
- testsuite/tests/th/TH_foreignCallingConventions.hs
Changes:
=====================================
testsuite/tests/th/TH_foreignCallingConventions.hs
=====================================
@@ -1,6 +1,9 @@
{-# LANGUAGE ForeignFunctionInterface, CApiFFI, GHCForeignImportPrim,
- QuasiQuotes, TemplateHaskell, JavaScriptFFI, MagicHash,
+ QuasiQuotes, TemplateHaskell, MagicHash,
UnliftedFFITypes, CPP #-}
+#if defined(javascript_HOST_ARCH)
+{-# LANGUAGE JavaScriptFFI #-}
+#endif
module TH_foreignCallingConventions where
@@ -17,13 +20,8 @@ $( do let fi cconv safety lbl name ty =
-- the declarations below would result in warnings or errors when returned
dec3 <- fi CApi Unsafe "baz" (mkName "baz") <$> [t| Double -> IO () |]
dec4 <- fi StdCall Safe "bay" (mkName "bay") <$> [t| (Int -> Bool) -> IO Int |]
-#if defined(javascript_HOST_ARCH)
dec5 <- fi JavaScript Unsafe "bax" (mkName "bax") <$> [t| Ptr Int -> IO String |]
runIO $
mapM_ (putStrLn . pprint) [dec1, dec2, dec3, dec4, dec5] >> hFlush stdout
-#else
- runIO $
- mapM_ (putStrLn . pprint) [dec1, dec2, dec3, dec4] >> hFlush stdout
-#endif
return [dec1, dec2]
)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/353821eddf724fc117f15ef691ab38ecb6d351c5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/353821eddf724fc117f15ef691ab38ecb6d351c5
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/20230523/aab813d6/attachment-0001.html>
More information about the ghc-commits
mailing list