Skip to content

Commit

Permalink
Use abstract classes instead of traits for ADTs
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Apr 18, 2024
1 parent e2027e6 commit 94cef84
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.sbt.gha

sealed trait PREventType extends Product with Serializable
sealed abstract class PREventType extends Product with Serializable

object PREventType {
val Defaults = List(Opened, Reopened, Synchronize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.sbt.gha

sealed trait Paths extends Product with Serializable
sealed abstract class Paths extends Product with Serializable

object Paths {
final case class Include(paths: List[String]) extends Paths
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.sbt.gha

sealed trait Ref extends Product with Serializable
sealed abstract class Ref extends Product with Serializable

object Ref {
final case class Branch(name: String) extends Ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.sbt.gha

sealed trait RefPredicate extends Product with Serializable
sealed abstract class RefPredicate extends Product with Serializable

object RefPredicate {
final case class Equals(ref: Ref) extends RefPredicate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.sbt.gha

sealed trait UseRef extends Product with Serializable
sealed abstract class UseRef extends Product with Serializable

object UseRef {
final case class Public(owner: String, repo: String, ref: String) extends UseRef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.sbt.gha

sealed trait WorkflowStep extends Product with Serializable {
sealed abstract class WorkflowStep extends Product with Serializable {
def id: Option[String]
def name: Option[String]
def cond: Option[String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ object MergifyAction {
)
}

private sealed trait OptionallyWeighted
private sealed abstract class OptionallyWeighted
private case class Weighted(value: NonEmptyList[(String, Int)]) extends OptionallyWeighted
private case class Unweighted(value: NonEmptyList[String]) extends OptionallyWeighted

Expand Down

0 comments on commit 94cef84

Please sign in to comment.