Ignored, scalac won't parse: 1287
Search state exploded: 56
SearchStateExploded(ScalaFile(
project: apache
github: https://github.com/apache/spark/blob/2c5b18fb0fdeabd378dd97e91f72d1eac4e21cc7/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
raw: https://raw.githubusercontent.com/apache/spark/2c5b18fb0fdeabd378dd97e91f72d1eac4e21cc7/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Columns 80 | | |
object Demo { | |
DBObject(User(Name("Martin", "Odersky"), Language("Scala")), Address("Lausanne", "Switzerland")) | |
StandardOutLogger.print( Error(new LoggerException, logName, this.getClass, "unknown akka.loglevel " + system.settings.LogLevel)) | |
checkAll("CofreeZipLazyOption", applicative.laws[CofreeZipLazyOption]( implicitly, implicitly, implicitly, implicitly, CofreeZipLazyOptionEqualMonadAAAAA)) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Column 80 | | |
object a { | |
Ok( | |
Json.obj("api" -> Json.obj("current" -> api.currentVersion, | |
"olds" -> api.oldVersions.map { old => | |
Json.obj("version" -> old.version, | |
"deprecatedAt" -> old.deprecatedAt, | |
"unsupportedAt" -> old.unsupportedAt) | |
}))) as JSON | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// indent: 4 + 2 | |
while (!hasReachedEof(curr) && | |
!statementStarts.contains(hash(tokens(curr.splits.length).left))) { | |
foo | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works for scalafmt 0.5.5 | |
// From https://gist.github.com/hseeberger/03677ef75bfadb7663c3b41bb58c702b | |
// Thank you @hseeberger! | |
import org.scalafmt.bootstrap.ScalafmtBootstrap | |
import org.scalafmt.sbt.ScalafmtPlugin | |
import sbt._ | |
import sbt.Keys._ | |
import sbt.inc.Analysis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import sbt.plugins.JvmPlugin | |
object ScalahostPlugin extends AutoPlugin { | |
override def requires = JvmPlugin | |
override def trigger: PluginTrigger = AllRequirements | |
val metaVersion = "1.6.0-652.1486671053000" | |
val pluginJar = sys.props.get("scalahost.pluginjar") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source( | |
Seq( | |
Pkg( | |
Term.Select( | |
Term.Select(Term.Select(Term.Name("com"), Term.Name("github")), Term.Name("johnynek")), | |
Term.Name("paiges")), | |
Seq( | |
Import( | |
Seq( | |
Importer( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.language.higherKinds | |
object hlists { | |
sealed abstract class HList { | |
type Merge[L <: HList] <: HList | |
def merge[L <: HList](l: L): Merge[L] | |
} | |
final case class HCons[H, T <: HList](head : H, tail : T) extends HList { | |
type Merge[L <: HList] = HCons[H, tail.Merge[L]] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.language.higherKinds | |
object hlists { | |
sealed abstract class HList { | |
type Merge[L <: HList] <: HList | |
def merge[L <: HList](l: L): Merge[L] | |
} | |
final case class HCons[H, T <: HList](head : H, tail : T) extends HList { | |
type Merge[L <: HList] = HCons[H, tail.Merge[L]] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commandeer | |
import scala.language.higherKinds | |
trait CommandeerDSL[Host] | |
object CommandeerDSL { | |
def apply[Host, DSL <: CommandeerDSL[Host]](host: Host)(implicit dsl: DSL): DSL = dsl | |
} | |
trait Foo | |
object Foo { | |
implicit val fooDSL: FooDSL = new FooDSL {} | |
} |