agda/agda2hs

Definition of `Functor` is inconsistent with `base-4.18.1.0` etc.

bwbush opened this issue · 1 comments

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.

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.