-
Notifications
You must be signed in to change notification settings - Fork 154
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
Remove GHC 8.4 #1762
Remove GHC 8.4 #1762
Conversation
12f5ca5
to
37ea8a6
Compare
You can remove 8.4 from here too:
|
To support using -XQuantifiedConstraints in the partial evaluator, support for GHC 8.4 is dropped. Conditionally compiled code for pre GHC 8.4 is removed, and version bounds are bumped to a minimum of GHC 8.6.
37ea8a6
to
bd44804
Compare
#else | ||
U ((shiftL v i) `mod` m) | ||
#endif | ||
else | ||
error ("'shiftL undefined for negative number: " ++ show i) | ||
where | ||
#if MIN_VERSION_base(4,15,0) | ||
m = 1 `naturalShiftL` naturalToWord (natVal (Proxy @n)) | ||
sz = naturalToWord (natVal (Proxy @n)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
natToNum @n
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, my feeling is that these internal modules could do with a little spring cleaning in places anyway. Leave it for another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. I commented because you changed it, that's all :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is approved, feel free to merge 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check that the generated Core is as efficient if you do decide to switch to natToNum
, since natToNum
goes through both SNat
and Integer
, where naturalToWord
is basically:
naturalToWord :: Natural -> Word
naturalToWord (Small# w) = W# w
naturalToWord _ = error "too big"
which basically translates to the follow Core
\x -> case x of
Small# w -> W# w
_ -> error "too big"
if natToNum
translates to that simple case statement, then use it; otherwise keep naturalToWord (natVal (Proxy @n))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @leonschoorl can you think of anything else?
I found a couple more |
Was surprised to see it still compile with the removal of
|
I was initially surprised when I noticed it was only in the 8.4 dir, then assumed that other people who did the GHC stuff for 8.6, 8.8, 8.10, 9.0 knew what they were doing (given that it still compiled, and therefore works 😉 ) |
To support using -XQuantifiedConstraints in the partial evaluator,
support for GHC 8.4 is dropped. Conditionally compiled code for
pre GHC 8.4 is removed, and version bounds are bumped to a minimum
of GHC 8.6.