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.example | |
import java.nio.file._ | |
import org.scalacheck._, Gen._, Prop._ | |
import scala.reflect.io.Directory | |
sealed trait FileTree | |
object FileTree { |
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
- sbt.ParseKey$.An explicitly specified axis is always parsed to that explicit value: Falsified after 2720 passed tests | |
> StructureKeyMask(Env: | |
Tasks: | |
aΑ͂ (delegates: ) | |
Build a2:I;#b : | |
Project A | |
Delegates: | |
ProjectRef(a2:I;#b,A0) | |
ProjectRef(a2:I;#b,A00) | |
Configurations: |
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
-- A data type with a generic result for each function | |
data Foo m = | |
Foo { | |
a :: Int -> m Bah | |
, b :: String -> String -> m Bah | |
} | |
-- Generic helper for applying a function to each function of Foo | |
-- | |
-- Depending on the intent of the question this might be "cheating" because |
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.ambiata.origami | |
import scalaz._, Scalaz._ | |
trait FoldM[M[_], T, U] { self => | |
type S | |
def start: M[S] | |
def fold(s: S, t: T): M[S] | |
def end(s: S): M[U] |
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
Category: | |
Talk | |
Target: | |
Intermediate | |
Language: |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
a = import pkgs.fetchgit { | |
# This repo contains default.nix | |
url = "file:///..."; | |
rev = "0657ac75791c8d4a0a3d68d8705151fa6c756f66"; | |
} {}; | |
in rec { | |
# What do I need to do here?!? It throws 'error: cannot coerce a function to a string' | |
# Eventually I'm hoping to use this as a buildInput |
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 sys, os, os.path | |
import signal | |
from threading import Thread | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
class PUTHandler(SimpleHTTPRequestHandler): | |
def do_PUT(self): | |
length = int(self.headers['Content-Length']) | |
content = self.rfile.read(length) |
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
public class Transformer { | |
private LegacyScreenImpl screen; | |
public LegacyScreenImpl asLegacyScreen(Model model, String previousScreen) { | |
screen = asLegacyScreen(model); | |
screen.setPreviousScreenName(previousScreen); | |
return screen; | |
} |