Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Commit

Permalink
Specify identity as the implementation for TrivialDescendant
Browse files Browse the repository at this point in the history
  • Loading branch information
sd-yip committed Feb 13, 2019
1 parent 9f7d622 commit db98070
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 10 additions & 0 deletions core/src/main/scala/eyrie/ops/TrivialDescendant.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package eyrie.ops

import simulacrum.typeclass

@typeclass
trait TrivialDescendant[A] extends Descendant[A, A] {
override
final def root: A => A =
identity
}
2 changes: 0 additions & 2 deletions core/src/main/scala/eyrie/ops/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ package eyrie

package object ops {
type NonSuccessor[A] = GeneralizedSuccessor[A, Nothing, Nothing]

type TrivialDescendant[A] = Descendant[A, A]
type NonDescendant[A] = GeneralizedDescendant[A, Nothing]
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,4 @@ trait RootDirectoryInstances extends EqualityInstances[RootDirectory] {

private
object FilePathTrivialDescendant extends TrivialDescendant[RootDirectory[Any]]
with NonSuccessor[RootDirectory[Any]] {
override
def root: RootDirectory[Any] => RootDirectory[Any] =
identity
}
with NonSuccessor[RootDirectory[Any]]

0 comments on commit db98070

Please sign in to comment.