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
> tests/test:print-ascii-graph | |
[info] org.scalaz:scalaz-tests_2.9.2:7.0-SNAPSHOT | |
[info] +-org.scala-lang:scala-library:2.9.2 | |
[info] +-org.scala-tools.testing:scalacheck_2.9.1:1.9 | |
[info] | +-org.scala-tools.testing:test-interface:0.5 | |
[info] | | |
[info] +-org.scalaz:scalaz-concurrent_2.9.2:7.0-SNAPSHOT | |
[info] | +-org.scala-lang:scala-library:2.9.2 | |
[info] | +-org.scalaz:scalaz-core_2.9.2:7.0-SNAPSHOT | |
[info] | +-org.scala-lang:scala-library:2.9.2 |
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 scalaz.lens | |
import scalaz.Functor | |
case class Store[C, D, B](f: D => B, c: C) | |
object Store extends StoreInstances | |
trait StoreInstances { | |
implicit def storeFunctor[C, D]: Functor[({type l[b]=Store[C, D, b]})#l] = new Functor[({type l[b]=Store[C, D, b]})#l] { | |
def map[A, B](fa: Store[C, D, A])(f: A => B): Store[C, D, B] = { |
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 sbtcomplete | |
import sbt._ | |
import complete.JLineCompletion | |
import Keys._ | |
object SbtComplete { | |
private val CompletionsCommand = "completions" | |
private val CompletionsBrief = ("<arg>", "The string to complete.") |
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
[22:34] < mightybyte> But data-lens isn't up to date with it. | |
[22:34] < edwardk> ghci> :t sumOf folded | |
[22:34] < edwardk> sumOf folded :: (Num c, Data.Foldable.Foldable f) => f c -> c | |
[22:35] < mightybyte> Hah! I was wondering how long you'd be able to resist. | |
[22:35] < edwardk> but we can use sumOf with any Lens, Traversal or Fold, etc. | |
[22:35] < edwardk> for instance: sumOf (traverse.traverse):: (Num c, Traversable t1, Traversable t) => t (t1 c) -> c | |
[22:35] < edwardk> sumOf (traverse._2), ec. | |
[22:36] < edwardk> toListOf (traverse.traverseLeft) :: Traversable t => t (Either c c1) -> [c] | |
[22:36] < edwardk> basically traverse is a valid Traversal, but there are lots of others | |
[22:38] < edwardk> so multilenses become 'Traversals' and you can do things like: productOf (traverseValueAt 4), etc. |
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
class PatMatCrash { | |
def foo[T](pattern: PartialFunction[T, Unit]) = ??? | |
// CRASHES | |
foo { | |
case "foo" => () | |
} | |
// does NOT crash | |
foo[String] { |
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 akka.actor | |
import collection.mutable | |
import akka.actor.FSM.{ CurrentState, Transition, UnsubscribeTransitionCallBack, SubscribeTransitionCallBack } | |
import akka.routing.{ Deafen, Listen } | |
case object PreRestart | |
case object PostRestart | |
trait ParentNotification { thisActor: Actor ⇒ |
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 Build.data | |
object build extends Build { | |
lazy val runAll = TaskKey[Unit]("run-all") | |
lazy val standardSettings = Seq( | |
runAllIn(Compile) | |
) |
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 java.awt.Desktop | |
object DependencyGraphHelper extends Plugin { | |
val openDepTree = TaskKey[Unit]("open-deptree") | |
override def projectSettings = Seq( | |
openDepTree in Compile <<= openDependencyTreeFor(Compile), | |
openDepTree in Runtime <<= openDependencyTreeFor(Runtime), |
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
// ==UserScript== | |
// @author Gerolf Seitz | |
// @name Github Wide Diff. | |
// @description Make the diff view as wide as the browser window. | |
// @include https://github.com/* | |
// ==/UserScript== | |
(function () { | |
function addJQuery(callback) { |
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 com.leonteq.datahubconnector.util | |
object FooImpl extends GoodBar[Int] | |
object BadFooImpl extends BadFoo with BadBar[Int] | |
trait BadFoo { | |
this: BadBar[_] => | |
def mapBazes = bazes.map(identity) |