-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to buid against GHCJS(or maybe other 32bit platform) #80
Comments
@yuchangyuan Thanks for opening the issue! It's an interesting problem 🤔 We work with |
I am not familiar with types inside
with regular ghc(on 64bit machine), output is
with ghcjs (
|
I've run into this as well today. This isn't necessarily about GHCJS only, it's about any 32bit compiler. From the link @chshersh posted: ------------------------------------------------------------------------
-- type Word64
------------------------------------------------------------------------
#if WORD_SIZE_IN_BITS < 64
data {-# CTYPE "HsWord64" #-} Word64 = W64# Word64#
-- ^ 64-bit unsigned integer type
(...)
#else
-- Word64 is represented in the same way as Word.
-- Operations may assume and must ensure that it holds only values
-- from its logical range.
data {-# CTYPE "HsWord64" #-} Word64 = W64# Word#
-- ^ 64-bit unsigned integer type
(...)
#endif Wouldn't using explicit 64bit ops do? |
@chshersh what's the reason for not using |
@angerman This "litter" gave us a significant boost in performance. Performance is the primary goal of the project, and it was not released until we achieved acceptable numbers. You can make a PR to our "littered code" with your suggestions, and we will accept that if the performance is not affected. |
@vrom911 I'm sorry, there has been a misunderstanding. I wrote "The code", and should have written "That code" to make it clear that I did not mean "This code". Specifically I did not mean this repository. I meant this. The The key being that for 32bit platforms we'd need
to be able to use |
Thank for the clarification, @angerman , there was a misunderstanding indeed. A PR is still welcome 🙂 |
I wrote https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1102 so we could avoid the CPP workaround #82, but there were test failures I did not know how to fix. I was hoping to figure it out at GHC Week before Covid-19 killed that off. If anyone here feels motivated to give it a shot, please do! |
|
Build fail with ghcjs-8.6.0.1, due to type mismatch.
ltWord#
&eqWord#
acceptWord#
type, butWord#
type is not alwaysWord64#
.Below is part of of build message:
The text was updated successfully, but these errors were encountered: