[Git][ghc/ghc][wip/js-supported-extensions] lint

Josh Meredith (@JoshMeredith) gitlab at gitlab.haskell.org
Tue May 23 09:26:40 UTC 2023



Josh Meredith pushed to branch wip/js-supported-extensions at Glasgow Haskell Compiler / GHC


Commits:
b713b4ca by Josh Meredith at 2023-05-23T09:26:17+00:00
lint

- - - - -


1 changed file:

- testsuite/tests/th/TH_foreignCallingConventions.hs


Changes:

=====================================
testsuite/tests/th/TH_foreignCallingConventions.hs
=====================================
@@ -1,6 +1,6 @@
 {-# LANGUAGE ForeignFunctionInterface, CApiFFI, GHCForeignImportPrim,
              QuasiQuotes, TemplateHaskell, JavaScriptFFI, MagicHash,
-             UnliftedFFITypes #-}
+             UnliftedFFITypes, CPP #-}
 
 module TH_foreignCallingConventions where
 
@@ -17,8 +17,13 @@ $( 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/b713b4ca4ac23da585064d55fb3801ae11517ae0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b713b4ca4ac23da585064d55fb3801ae11517ae0
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/896ecf9d/attachment-0001.html>


More information about the ghc-commits mailing list