Skip to content
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

support GHC 9 #98

Closed
sellout opened this issue Feb 26, 2022 · 1 comment
Closed

support GHC 9 #98

sellout opened this issue Feb 26, 2022 · 1 comment

Comments

@sellout
Copy link
Contributor

sellout commented Feb 26, 2022

I started implementing this, and was progressing nicely with fairly minor changes (the GHC API module names have changed, a few functions now take an extra arg, ...), but I ran into an issue that might be more significant.

In https://gitlab.haskell.org/ghc/ghc/-/commit/0de03cd78729dc58a846c64b645e71057ec5d24e, RuleFun was changed from taking DynFlags to a more restricted RuleOpts, so ConCat.Satisfy.Plugin.satisfy no longer has access to the full DynFlags structure.

I think the only place that concat seriously uses the DynFlags is in ConCat.Simplify, but I'm not sure how to work around the lack of it there.

sellout added a commit to con-kitty/concat that referenced this issue Feb 27, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
This currently doesn't quite work. Basically, our plugins no longer have access
to DynFlags, instead there are more restricted flag types provided. In this
change, those are marked by (invalid) uses of `unsafeCoerce`, which allowed the
compiler to finish compiling the project, but those coercions _will_ fail when
using the plugins.

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Feb 27, 2022
This currently doesn't quite work. Basically, our plugins no longer have access
to DynFlags, instead there are more restricted flag types provided. In this
change, those are marked by (invalid) uses of `unsafeCoerce`, which allowed the
compiler to finish compiling the project, but those coercions _will_ fail when
using the plugins.

Also, this change doesn't check concat-hardware, since that requires other
locally-cloned code. Merging compiling-to-categories#89 would make it easy to check that final package.

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Feb 28, 2022
This currently doesn't quite work. Basically, our plugins no longer have access
to DynFlags, instead there are more restricted flag types provided. In this
change, those are marked by (invalid) uses of `unsafeCoerce`, which allowed the
compiler to finish compiling the project, but those coercions _will_ fail when
using the plugins.

Also, this change doesn't check concat-hardware, since that requires other
locally-cloned code. Merging compiling-to-categories#89 would make it easy to check that final package.

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Feb 28, 2022
This currently doesn't quite work. Basically, our plugins no longer have access
to DynFlags, instead there are more restricted flag types provided. In this
change, those are marked by (invalid) uses of `unsafeCoerce`, which allowed the
compiler to finish compiling the project, but those coercions _will_ fail when
using the plugins.

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Feb 28, 2022
Mostly trivial changes, but we now get the `DynFlags` from `installCoreToDos`
rather than each application of `BuiltinRule.ru_try`.

This continues to work just fine for GHC 8.10, but doesn't quite work on GHC 9.0
for some reason. I don't think it's the `DynFlags` changes (as that's applied to
all GHC versions). But running on GHC 9.0 always fails with "isDeadEndId
cccV" (this is slightly stricter than `isBottomingId` in earlier GHCs, but
removing that `pprPanic` still fails, just with "Oops: toCcc'' called" instead).

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Mar 14, 2022
Mostly trivial changes, but we now get the `DynFlags` from `installCoreToDos`
rather than each application of `BuiltinRule.ru_try`.

This continues to work just fine for GHC 8.10, but doesn't quite work on GHC 9.0
for some reason. I don't think it's the `DynFlags` changes (as that's applied to
all GHC versions). But running on GHC 9.0 always fails with "isDeadEndId
cccV" (this is slightly stricter than `isBottomingId` in earlier GHCs, but
removing that `pprPanic` still fails, just with "Oops: toCcc'' called" instead).

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Mar 14, 2022
Mostly trivial changes, but we now get the `DynFlags` from `installCoreToDos`
rather than each application of `BuiltinRule.ru_try`.

This continues to work just fine for GHC 8.10, but doesn't quite work on GHC 9.0
for some reason. I don't think it's the `DynFlags` changes (as that's applied to
all GHC versions). But running on GHC 9.0 always fails with "isDeadEndId
cccV" (this is slightly stricter than `isBottomingId` in earlier GHCs, but
removing that `pprPanic` still fails, just with "Oops: toCcc'' called" instead).

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Mar 14, 2022
Mostly trivial changes, but we now get the `DynFlags` from `installCoreToDos`
rather than each application of `BuiltinRule.ru_try`.

This continues to work just fine for GHC 8.10, but doesn't quite work on GHC 9.0
for some reason. I don't think it's the `DynFlags` changes (as that's applied to
all GHC versions). But running on GHC 9.0 always fails with "isDeadEndId
cccV" (this is slightly stricter than `isBottomingId` in earlier GHCs, but
removing that `pprPanic` still fails, just with "Oops: toCcc'' called" instead).

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue Mar 22, 2022
Mostly trivial changes, but we now get the `DynFlags` from `installCoreToDos`
rather than each application of `BuiltinRule.ru_try`.

This continues to work just fine for GHC 8.10, but doesn't quite work on GHC 9.0
for some reason. I don't think it's the `DynFlags` changes (as that's applied to
all GHC versions). But running on GHC 9.0 always fails with "isDeadEndId
cccV" (this is slightly stricter than `isBottomingId` in earlier GHCs, but
removing that `pprPanic` still fails, just with "Oops: toCcc'' called" instead).

Fixes compiling-to-categories#98.
sellout added a commit to con-kitty/concat that referenced this issue May 16, 2022
Mostly trivial changes, but we now get the `DynFlags` from `installCoreToDos`
rather than each application of `BuiltinRule.ru_try`.

This continues to work just fine for GHC 8.10, but doesn't quite work on GHC 9.0
for some reason. I don't think it's the `DynFlags` changes (as that's applied to
all GHC versions). But running on GHC 9.0 always fails with "isDeadEndId
cccV" (this is slightly stricter than `isBottomingId` in earlier GHCs, but
removing that `pprPanic` still fails, just with "Oops: toCcc'' called" instead).

Fixes compiling-to-categories#98.
@mikesperber
Copy link
Contributor

This was all done in February 2023.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants