Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up unused code #495

Merged
merged 3 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Dsl/src/main/scala/com/thoughtworks/dsl/Dsl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -502,19 +502,6 @@ object Dsl extends LowPriorityDsl0 {
): Dsl.PolyCont[Typed[Keyword, Value], Domain, Value] =
dsl

// TODO: Remove
given ToTypedKeyword[Keyword]: AnyRef with {
extension [Value](keyword: Keyword)
@inline def typed: Typed[Keyword, Value] = {
keyword
}
}

given [Keyword, Value]: AnyRef with {
extension [NewValue](typedKeyword: Typed[Keyword, Value])
@inline def withValueType: Typed[Keyword, NewValue] = typedKeyword
}

@inline def apply[Keyword, Value]: Keyword =:= Typed[Keyword, Value] = summon

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package com.thoughtworks
package dsl
import keywords._
import com.thoughtworks.dsl.keywords._, Match._
import Dsl.Typed.given
import scala.quoted.Quotes
import collection.immutable.Queue
import Dsl.given
import scala.util.control.Exception.Catcher
/**
* @example
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.Typed
import com.thoughtworks.dsl.Dsl
import com.thoughtworks.dsl.domains.Continuation.!!
import scala.concurrent.Await.result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package keywords

import com.thoughtworks.dsl.Dsl
import Dsl.AsKeyword
import Dsl.Typed
import scala.util.NotGiven

final case class FlatMap[Upstream, UpstreamValue, Mapped](
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.Typed
import Dsl.cpsApply

final case class If[ConditionKeyword, ThenKeyword, ElseKeyword](
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.Typed

opaque type In[Element] = Iterable[Element]
object In {
Expand Down Expand Up @@ -40,8 +39,6 @@ object In {
}
}

import Dsl.Typed

// 这种方式要么增加运行时type class复杂度,要么需要修改AST而很难支持 for / yield
// given[Element, MappedKeyword, Domain, MappedContainer[x] <: IterableOnce[x], MappedElement, PureValue](
// given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.AsKeyword
import Dsl.Typed
import scala.language.higherKinds
import scala.language.implicitConversions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import scala.language.implicitConversions

import Dsl.AsKeyword
import Dsl.Lift
import Dsl.Typed

/** A [[Dsl.Keyword]] to early return a lifted value from the enclosing function.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.Typed

import com.thoughtworks.dsl.Dsl
import com.thoughtworks.dsl.keywords.Shift.{SameDomainStackSafeShiftDsl, StackSafeShiftDsl}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.Typed
import Dsl.cpsApply

opaque type Suspend[Keyword] = () => Keyword
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.thoughtworks.dsl
package keywords
import Dsl.Typed
import Dsl.!!
import Dsl.cpsApply
import Dsl.AsKeyword
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.thoughtworks.dsl
package keywords
import Dsl.Typed
import Dsl.!!
import Dsl.AsKeyword
import scala.util.control.Exception.Catcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.thoughtworks.dsl
package keywords
import Dsl.Typed
import Dsl.!!
import Dsl.cpsApply
import Dsl.AsKeyword
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.cpsApply
import Dsl.Typed

case class While[
ConditionKeyword,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.thoughtworks.dsl
package keywords
import Dsl.AsKeyword
import Dsl.Typed
import scala.collection._
import scala.language.implicitConversions

Expand Down