1
1
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:
Rob Rix 2016-03-02 23:20:54 -05:00
parent 85f50691b5
commit 49eb9c1e4f

View File

@ -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