Skip to content

Commit

Permalink
Add monoid syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishdickson committed Jun 15, 2016
1 parent 0830a7c commit 6ad6b72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/scala/cats/syntax/all.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ trait AllSyntax
with ListSyntax
with MonadCombineSyntax
with MonadFilterSyntax
with MonoidSyntax
with OptionSyntax
with OrderSyntax
with PartialOrderSyntax
Expand Down
6 changes: 6 additions & 0 deletions tests/src/test/scala/cats/tests/SyntaxTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ class SyntaxTests extends AllInstances with AllSyntax {
val z: A = x |-| y
}

def testMonoid[A: Monoid]: Unit = {
val x = mock[A]
implicit val y = mock[Eq[A]]
val z: Boolean = x.isEmpty
}

def testEq[A: Eq]: Unit = {
val x = mock[A]
val y = mock[A]
Expand Down

0 comments on commit 6ad6b72

Please sign in to comment.