This repository was archived by the owner on Jan 2, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the build for ghc-8.8.2. #335
Fix the build for ghc-8.8.2. #335
Changes from 1 commit
d83512f
e9e01c4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I don’t have any projects which use LLVM, so I’d appreciate it if someone could double-check that this is doing what they expect.
Note that despite
llvmVersionList
returning[Int]
, these branches are in fact exhaustive (underghc
8.8.2), becauseLlvmVersion
contains aNonEmpty
list and converts it to a list otherwise unmodified. So we will always have at least a major version, and thus this will not silently fail (modulo future changes toghc
’s API).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.
This matches the way this is written in GHC and is a bit easier to read imho: https://gitlab.haskell.org/ghc/ghc/blob/ghc-8.8/compiler/main/DriverPipeline.hs#L2174
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.
Aha, good call 👍
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.
Shame they didn’t export that.
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.
The whole doCpp is exported from GHC 8.10 and above, so the whole thing can disappear.
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.
@ndmitchell Do you mean that we should do that in this PR? Cos I’m not really set up to test against 8.10.* just now.
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.
No - we should leave it as it is for now. Once 8.10 is actually out we should do some conditional stuff - more just pointing out there is a long term plan for getting rid of it 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.
No, we need to support older versions so this can’t go away completely in particular not the code for
8.8.2
. We can however, use the definition from GHC in8.10
but let’s please keep8.10
support for a separate PR. I expect that there are a bunch of other issues anyway.