add liftCompare & friends
Could a function like this be added? https://hackage.haskell.org/package/base-4.19.0.0/docs/Data-Functor-Classes.html#v:liftCompare
In which module should such function go?
What is f in the above context? Due to liftCompare lacking any type class constraints, how would you get the a or b out of f?
Does the class definition give sufficient information?
class (Eq1 f, forall a. Ord a => Ord (f a)) => Ord1 (f :: Type -> Type) where
Related https://pursuit.purescript.org/packages/purescript-prelude/6.0.1/docs/Data.Ord#t:Ord1 https://pursuit.purescript.org/packages/purescript-prelude/6.0.1/docs/Data.Eq#t:Eq1
We don't yet support this syntax on the left side of the =>:
forall a. Ord a => Ord (f a)
How would we implement this?
How would we implement this?
Part of the purpose of Ord1 is to avoid that constraint, there's an Ord a constraint on compare1 instead.
Ok, I misread the Haskell docs. I thought liftCompare was a function, not a type class member... That explains a lot.