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?
Activity
JordanMartinez commentedon Jan 25, 2024
What is
fin the above context? Due toliftComparelacking any type class constraints, how would you get theaorbout off?flip111 commentedon Jan 26, 2024
Does the class definition give sufficient information?
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
JordanMartinez commentedon Jan 26, 2024
We don't yet support this syntax on the left side of the
=>:How would we implement this?
garyb commentedon Jan 26, 2024
Part of the purpose of
Ord1is to avoid that constraint, there's anOrd aconstraint oncompare1instead.JordanMartinez commentedon Jan 26, 2024
Ok, I misread the Haskell docs. I thought
liftComparewas a function, not a type class member... That explains a lot.