mirror of
https://github.com/github/semantic.git
synced 2024-11-24 17:04:47 +03:00
Define a generically-derivable lifting of Ord to * -> *.
This commit is contained in:
parent
f1e89b647d
commit
fe53309b05
@ -1 +1,8 @@
|
||||
module Data.Functor.Classes.Ord.Generic where
|
||||
|
||||
-- | Generically-derivable lifting of the 'Ord' class to unary type constructors.
|
||||
class GOrd1 f where
|
||||
-- | Lift a comparison function through the type constructor.
|
||||
--
|
||||
-- The function will usually be applied to a comparison function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.
|
||||
gliftCompare :: (a -> b -> Ordering) -> f a -> f b -> Ordering
|
||||
|
Loading…
Reference in New Issue
Block a user