mirror of
https://github.com/github/semantic.git
synced 2025-01-08 16:39:47 +03:00
Add a Copointed instance for Identity.
This commit is contained in:
parent
85f50691b5
commit
49eb9c1e4f
@ -1,7 +1,12 @@
|
||||
module Data.Copointed where
|
||||
|
||||
import Data.Functor.Identity
|
||||
|
||||
class Copointed c where
|
||||
copoint :: c a -> a
|
||||
|
||||
instance Copointed ((,) a) where
|
||||
copoint = snd
|
||||
|
||||
instance Copointed Identity where
|
||||
copoint = runIdentity
|
||||
|
Loading…
Reference in New Issue
Block a user