This file contains 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.annotation.implicitNotFound | |
import scala.reflect._ | |
object Protocol extends App { | |
def witness = null | |
sealed trait Action | |
sealed trait End extends Action | |
sealed trait Receive[Value, Next <: Action] extends Action | |
sealed trait Send[V, Next <: Action] extends Action { |
This file contains 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
require 'find' | |
base = '/your/repostructure/root' | |
repo = 'you' # Bitbucket user | |
user = 'you' | |
pass = 'pass' | |
Find.find('../gits') do |path| | |
if File.basename(path) == '.git' | |
gitpath = File.dirname(path) |
This file contains 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
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, ScopedTypeVariables, UndecidableInstances, OverlappingInstances #-} | |
module OptTest () where | |
data HTrue | |
data HFalse | |
class HBool b where hBool :: b -> Bool | |
instance HBool HTrue where hBool _ = True | |
instance HBool HFalse where hBool _ = False |
This file contains 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 annotation.implicitNotFound | |
package object union { | |
private type ¬[A] = A => Nothing | |
private type ¬¬[A] = ¬[¬[A]] | |
private type ∧[A, B] = A with B | |
private type ∨[A, B] = ¬[∧[¬[A], ¬[B]]] // since (A ∨ B) ⇔ ¬(¬A ∧ ¬B) | |
sealed trait UnionInstance[A, B, T, -From, +To] { |
NewerOlder