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

Definition of Functor is inconsistent with base-4.18.1.0 etc. #318

Open
bwbush opened this issue May 8, 2024 · 1 comment
Open

Definition of Functor is inconsistent with base-4.18.1.0 etc. #318

bwbush opened this issue May 8, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@bwbush
Copy link

bwbush commented May 8, 2024

The agda2hs prelude puts void as a member of the typeclass, but the latest GHC base libraries do not.

Compare void in

record Functor (f : Set Set) : Set₁ where
infixl 1 _<&>_
infixl 4 _<$>_ _<$_ _$>_
field
fmap : (a b) f a f b
_<$>_ : (a b) f a f b
_<&>_ : f a (a b) f b
_<$_ : (@0 {{ b }} a) f b f a
_$>_ : f a (@0 {{ a }} b) f b
void : f a f ⊤

and to it's top-level placement in

https://github.com/ghc/ghc/blob/f3225ed4b3f3c4309f9342c5e40643eeb0cc45da/libraries/base/Data/Functor.hs#L210-L211

The same problem occurs for several other members of Functor and for several other typeclasses.

@jespercockx jespercockx added the bug Something isn't working label May 9, 2024
@jespercockx jespercockx added this to the 1.4 milestone May 9, 2024
@jespercockx
Copy link
Member

Currently we are not very explicit about which version of GHC or the Haskell Prelude we support. But in this case I believe it makes sense to remove void as a field so we are compatible with the latest release at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants