Skip to content

Instantly share code, notes, and snippets.

[error] Cyclic reference involving
[error] {file:/Users/joshcough/work/MinecraftPlugins/}Farmer/compile:copy-resources
[error] {file:/Users/joshcough/work/MinecraftPlugins/}Farmer/compile:resources
[error] {file:/Users/joshcough/work/MinecraftPlugins/}Farmer/compile:managed-resources
[error] {file:/Users/joshcough/work/MinecraftPlugins/}Farmer/compile:resource-generators
[error] {file:/Users/joshcough/work/MinecraftPlugins/}Farmer/compile:full-classpath
[error] {file:/Users/joshcough/work/MinecraftPlugins/}Farmer/compile:exported-products
[error] {file:/Users/joshcough/work/MinecraftPlugins/}Farmer/compile:products
translate b fx fy fz = getBlock $ location (wfb b) (fx (blockX b)) (fy (blockY b)) (fz (blockZ b))
blockAbove b = translate b id (y -> y + 1) id
blockBelow b = translate b id (y -> y - 1) id
blockNorth b = translate b id id (z -> z - 1)
blockSouth b = translate b id id (z -> z + 1)
blockEast b = translate b (x -> x + 1) id id
blockWest b = translate b (x -> x - 1) id id
blockNorthEast = blockNorth . blockEast
blockSouthEast = blockSouth . blockEast
blockNorthWest = blockNorth . blockWest
def pluginYmlSettings(author: String): Seq[Sett] = Seq[Sett](
mappings in (Compile, packageBin) <+=
(streams, name, productDirectories in Compile, dependencyClasspath in Compile, baseDirectory, version, runner) map {
(s, name, cp1, cp2, bd, v, r) =>
Run.run(
"jcdc.pluginfactory.YMLGenerator", (Attributed.blankSeq(cp1) ++ cp2).map(_.data),
Seq("jcdc.pluginfactory.examples." + name, author, v, bd.getAbsolutePath),
s.log)(r)
bd / "plugin.yml" -> "plugin.yml"
}
$ cabal install
Resolving dependencies...
cabal.exe: Could not resolve dependencies:
trying: ermine-0.6 (user goal)
next goal: bytes (dependency of ermine-0.6)
rejecting: bytes-0.9/installed-d5b... (conflict: bytes =>
binary==0.7.1.0/installed-847..., ermine => binary==0.5.*)
rejecting: bytes-0.8/installed-c58..., 0.7/installed-a28...,
0.5/installed-e08..., 0.4/installed-8bc... (conflict: ermine => bytes>=0.9 &&
<1)
[info] > ARG_0: Data(1, List(LamDict(Scope(Var(-\/(())))), Var(-2147483648), Case(AppDict(Data(1, List(Data(-128, List(L
itByte(-128))), Case(Case(Case(LitFloat(-2.7508434E38),Map(),None),Map(1 -> (127,Scope(App(LitInt64(-538654524), Super(-
128))))),Some(Scope(Var(-\/(()))))),Map(98 -> (72,Scope(AppDict(App(Err(), Var(-\/(82))),LamDict(Scope(LitShort(0)))))),
-61 -> (1,Scope(App(Var(-\/(-30)), LamDict(Scope(LitString())))))),Some(Scope(Data(127, List())))), App(LitInt64(-1), V
ar(-2147483648)), AppDict(App(Let(List(),Scope(Slot(70))), App(Var(-2147483648), Var(-1404937333))),Data(-1, List())))),
App(AppDict(LitString(?),Slot(3)), LitFloat(1.0))),Map(0 -> (-46,Scope(Let(List(Scope(Data(127, List(Data(127, List(App(
Data(-128, List()), App(Var(-\/(1)), Var(\/-(LitDouble(3.020450271923854E307))))), Case(Data(-17, List()),Map(),Some(Sco
pe(Var(\/-(LitShort(19602)))))))), LamDict(Scope(Var(-\/(()))))))), Scope(Var(-\/(-1))), Scope(App(LitChar(?), Var(-\/(4
7)))), Scope(Case(Var(-\/(-34)),Map(-1 -> (127,Scope(Dat
implicit def shrinkCore[V](implicit s1: Shrink[V]): Shrink[Core[V]] = Shrink { c =>
c match {
case Var(_) => Stream.empty
case h: HardCore => Stream.empty
case App(f, x) => Stream(f, x)
// case class Let[+V](bindings: List[Scope[Byte, Core, V]], body: Scope[Byte, Core, V])
case Let(bindings, body) => Stream() // TODO: bindings, body
// case class Case[+V](c: Core[V], branches: Map[Byte, (Byte, Scope[Byte, Core, V])], default: Option[Scope[Unit, Core, V]])
case Case(c, branches, d) => Stream(c) // TODO: branches, default
case Data(tag, fields) => fields.toStream
[info] > ARG_0: 1.3340697E38
$ ./dist/build/core-echo/core-echo.exe core.in
Bytes: 1, 2, 6, 126, 200, 186, 127
Bytes: 1, 2, 6, 126, 200, 250, 127
HardCore (Lit (Float NaN))
x = f
foreign java
f = ...
foreign c#
f = ...
instance Arbitrary PatPath where
arbitrary = oneof [ pure LeafPP
, FieldPP <$> arbitrary <*> arbitrary
, ArgPP <$> arbitrary <*> arbitrary
]
instance Arbitrary JavaLike where
arbitrary = oneof [
Method <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary,
Constructor <$> arbitrary <*> arbitrary,
lazy val setOp = rawWord("UNION") | rawWord("INTERSECT") | rawWord("MINUS")
lazy val simpleSetRule = setReference // characteristicRule | setReference | "(" , Set Rule , ")" ;
lazy val setRule = for {
s1 <- simpleSetRule
op <- setOp
//s2 <- simpleSetRule
} yield (s1, op)