File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ import Control.Comonad (class Comonad)
7
7
import Control.Extend (class Extend )
8
8
import Control.Lazy (class Lazy )
9
9
10
+ import Data.Eq (class Eq1 )
10
11
import Data.Foldable (class Foldable )
11
12
import Data.Functor.Invariant (class Invariant , imapF )
12
13
import Data.Monoid (class Monoid )
13
14
import Data.Newtype (class Newtype )
15
+ import Data.Ord (class Ord1 )
14
16
import Data.Traversable (class Traversable )
15
17
16
18
newtype Identity a = Identity a
@@ -46,6 +48,12 @@ derive newtype instance lazyIdentity :: Lazy a => Lazy (Identity a)
46
48
instance showIdentity :: Show a => Show (Identity a ) where
47
49
show (Identity x) = " (Identity " <> show x <> " )"
48
50
51
+ instance eq1Identity :: Eq1 Identity where
52
+ eq1 = eq
53
+
54
+ instance ord1Identity :: Ord1 Identity where
55
+ compare1 = compare
56
+
49
57
instance functorIdentity :: Functor Identity where
50
58
map f (Identity x) = Identity (f x)
51
59
You can’t perform that action at this time.
0 commit comments