Skip to content

Commit 285f23e

Browse files
authored
Merge pull request #9 from safareli/eq1
Add Eq1 instance
2 parents 7f0f231 + 86c6b0a commit 285f23e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"build": "pulp build -- --censor-lib --strict"
66
},
77
"devDependencies": {
8-
"pulp": "^10.0.4",
9-
"purescript-psa": "^0.5.0-rc.1",
8+
"pulp": "^12.0.1",
9+
"purescript-psa": "^0.5.1",
1010
"rimraf": "^2.6.1"
1111
}
1212
}

src/Data/Const.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module Data.Const where
22

33
import Prelude
44

5+
import Data.Eq (class Eq1)
56
import Data.Foldable (class Foldable)
67
import Data.Functor.Contravariant (class Contravariant)
78
import Data.Functor.Invariant (class Invariant, imapF)
@@ -22,6 +23,9 @@ derive instance newtypeConst :: Newtype (Const a b) _
2223

2324
derive newtype instance eqConst :: Eq a => Eq (Const a b)
2425

26+
instance eq1Const :: Eq a => Eq1 (Const a) where
27+
eq1 = eq
28+
2529
derive newtype instance ordConst :: Ord a => Ord (Const a b)
2630

2731
derive newtype instance boundedConst :: Bounded a => Bounded (Const a b)

0 commit comments

Comments
 (0)