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

Doesn't seem to work with GHC 9.4.1 #141

Closed
yav opened this issue Aug 10, 2022 · 2 comments · Fixed by #146
Closed

Doesn't seem to work with GHC 9.4.1 #141

yav opened this issue Aug 10, 2022 · 2 comments · Fixed by #146

Comments

@yav
Copy link
Member

yav commented Aug 10, 2022

I get the following error:

src/Data/Parameterized/Classes.hs:354:10: error:
    • Could not deduce (TestEquality f)
        arising from the superclasses of an instance declaration
      from the context: HashableF f
        bound by the instance declaration
        at src/Data/Parameterized/Classes.hs:354:10-46
      Possible fix:
        add (TestEquality f) to the context of the instance declaration
    • In the instance declaration for ‘Hashable (TypeAp f tp)’
    |
354 | instance HashableF f => Hashable (TypeAp f tp) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@RyanGlScott
Copy link
Contributor

I don't think this is an issue with GHC 9.4.1 so much as it is an issue with hashable-1.4.*—see #126. I have a fix for this in #127 that is awaiting review.

I do expect there to be other changes needed for GHC 9.4, however—we should try again after landing a fix for #126.

@RyanGlScott
Copy link
Contributor

After landing #127, the only other change that needs to be made (AFAICT) is enabling UndecidableInstances in a place that didn't require it before:

diff --git a/src/Data/Parameterized/Fin.hs b/src/Data/Parameterized/Fin.hs
index 46caafb..eaa48ce 100644
--- a/src/Data/Parameterized/Fin.hs
+++ b/src/Data/Parameterized/Fin.hs
@@ -6,6 +6,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeOperators #-}
+{-# LANGUAGE UndecidableInstances #-}
 
 {-|
 Copyright        : (c) Galois, Inc 2021

RyanGlScott added a commit that referenced this issue Nov 21, 2022
The only change needed is to enable `UndecidableInstances` in
`Data.Parameterized.Fin`, which is necessary due to GHC 9.4 being pickier about
undecidable instance checking. See
[this section](https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.4?version_id=24540b698481cf2b0bd11029b58eaddc0fbfbb31#stricter-undecidableinstances-checking)
of the GHC 9.4 Migration Guide.

Fixes #141.
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