Created
February 15, 2014 19:37
-
-
Save retronym/9024155 to your computer and use it in GitHub Desktop.
SI-8290 investigation
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
--- target/good.log 2014-02-15 20:32:59.000000000 +0100 | |
+++ target/bad.log 2014-02-15 20:32:47.000000000 +0100 | |
@@ -1,3 +1,27 @@ | |
+/Users/jason/code/scalaz/example/src/main/scala/scalaz/example/WordCount.scala:34: error: no type parameters for method @>>>: (g: scalaz.typelevel.Func[G,scalaz.Applicative,Int,C])scalaz.typelevel.Func[[?]scalaz.IndexedStateT[[+X]X,Boolean,Boolean,G[?]],scalaz.Applicative,Char,C] exist so that it can be applied to arguments (scalaz.typelevel.Func[[X]Int,scalaz.Applicative,Int,Int]) | |
+ --- because --- | |
+argument expression's type is not compatible with formal parameter type; | |
+ found : scalaz.typelevel.Func[[X]Int,scalaz.Applicative,Int,Int] | |
+ required: scalaz.typelevel.Func[?G,scalaz.Applicative,Int,?C] | |
+ | |
+ } @>>> AppFuncU { (x: Int) => x } | |
+ ^ | |
+/Users/jason/code/scalaz/example/src/main/scala/scalaz/example/WordCount.scala:34: error: type mismatch; | |
+ found : scalaz.typelevel.Func[[X]Int,scalaz.Applicative,Int,Int] | |
+ required: scalaz.typelevel.Func[G,scalaz.Applicative,Int,C] | |
+ } @>>> AppFuncU { (x: Int) => x } | |
+ ^ | |
+/Users/jason/code/scalaz/example/src/main/scala/scalaz/example/WordCount.scala:37: error: inferred type arguments [scalaz.typelevel.HNilFunc[scalaz.Applicative,Char,Int]] do not conform to method consA's type parameter bounds [T <: scalaz.typelevel.HListFunc[scalaz.Applicative,Char,C]] | |
+ val countAll = countChar :: countLine :: (countWord consA AppFunc.HNil[Char, Int]) | |
+ ^ | |
+/Users/jason/code/scalaz/example/src/main/scala/scalaz/example/WordCount.scala:37: error: type mismatch; | |
+ found : scalaz.typelevel.HNilFunc[scalaz.Applicative,Char,Int] | |
+ required: T | |
+ val countAll = countChar :: countLine :: (countWord consA AppFunc.HNil[Char, Int]) | |
+ ^ | |
+/Users/jason/code/scalaz/example/src/main/scala/scalaz/example/WordCount.scala:40: error: recursive value x$4 needs type | |
+ val charCount :: lineCount :: wordCountState :: HNil = countAll traverse text | |
+ ^ | |
[[syntax trees at end of typer]] // WordCount.scala | |
package scalaz.example { | |
object WordCount extends scala.AnyRef { | |
@@ -15,30 +39,31 @@ | |
import scalaz.std.boolean.test; | |
import scalaz.syntax.`package`.equal._; | |
val text: List[Char] = scala.this.Predef.augmentString("the cat in the hat\n sat on the mat\n").toList; | |
- val countChar: scalaz.typelevel.Func[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M,scalaz.Applicative,Char,Int] = scalaz.typelevel.AppFuncU.apply[Char, Int](((c: Char) => 1))(scalaz.this.Unapply.unapplyA[scalaz.Applicative, Int](scalaz.this.Applicative.monoidApplicative[Int](scalaz.std.anyVal.intInstance))); | |
- val countLine: scalaz.typelevel.Func[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M,scalaz.Applicative,Char,Int] = scalaz.typelevel.AppFuncU.apply[Char, Int](((c: Char) => scalaz.std.boolean.test(scalaz.syntax.`package`.equal.ToEqualOps[Char](c)(scalaz.std.anyVal.char).===('\n'))))(scalaz.this.Unapply.unapplyA[scalaz.Applicative, Int](scalaz.this.Applicative.monoidApplicative[Int](scalaz.std.anyVal.intInstance))); | |
- val countWord: scalaz.typelevel.Func[[?]scalaz.Unapply[scalaz.Applicative,scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]]{type M[X] = scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,X]; type A = Int}#M[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[?]],scalaz.Applicative,Char,Int] = scalaz.typelevel.AppFuncU.apply[Char, scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]](((c: Char) => scalaz.`package`.State.get[Boolean].map[(Boolean, Boolean)](((x: Boolean) => { | |
+ val countChar: scalaz.typelevel.Func[[X]Int,scalaz.Applicative,Char,Int] = scalaz.typelevel.AppFuncU.apply[Char, Int](((c: Char) => 1))(scalaz.this.Unapply.unapplyA[scalaz.Applicative, Int](scalaz.this.Applicative.monoidApplicative[Int](scalaz.std.anyVal.intInstance))); | |
+ val countLine: scalaz.typelevel.Func[[X]Int,scalaz.Applicative,Char,Int] = scalaz.typelevel.AppFuncU.apply[Char, Int](((c: Char) => scalaz.std.boolean.test(scalaz.syntax.`package`.equal.ToEqualOps[Char](c)(scalaz.std.anyVal.char).===('\n'))))(scalaz.this.Unapply.unapplyA[scalaz.Applicative, Int](scalaz.this.Applicative.monoidApplicative[Int](scalaz.std.anyVal.intInstance))); | |
+ val countWord: scalaz.typelevel.Func[[?]scalaz.IndexedStateT[[+X]X,Boolean,Boolean,G[?]],scalaz.Applicative,Char,C] = scalaz.typelevel.AppFuncU.apply[Char, scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]](((c: Char) => scalaz.`package`.State.get[Boolean].map[(Boolean, Boolean)](((x: Boolean) => { | |
val y: Boolean = scalaz.syntax.`package`.equal.ToEqualOps[Char](c)(scalaz.std.anyVal.char).=/=(' '); | |
scala.Tuple2.apply[Boolean, Boolean](x, y) | |
}))(scalaz.`package`.idInstance).flatMap[Boolean, Int](((x$1: (Boolean, Boolean)) => (x$1: (Boolean, Boolean) @unchecked) match { | |
case (_1: Boolean, _2: Boolean)(Boolean, Boolean)((x @ _), (y @ _)) => scalaz.`package`.State.put[Boolean](y).map[Int](((_: Unit) => scalaz.std.boolean.test(y.&&(x.unary_!))))(scalaz.`package`.idInstance) | |
-}))(scalaz.`package`.idInstance)))(scalaz.this.Unapply.unapplyMFABC3[scalaz.Applicative, scalaz.Id.Id, scalaz.IndexedStateT, Boolean, Boolean, Int](scalaz.this.IndexedStateT.stateMonad[Boolean])).@>>>[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M, Int](scalaz.typelevel.AppFuncU.apply[Int, Int](((x: Int) => x))(scalaz.this.Unapply.unapplyA[scalaz.Applicative, Int](scalaz.this.Applicative.monoidApplicative[Int](scalaz.std.anyVal.intInstance)))); | |
- val countAll: scalaz.typelevel.HConsFunc[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M,scalaz.Applicative,Char,Int,scalaz.typelevel.HConsFunc[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M,scalaz.Applicative,Char,Int,scalaz.typelevel.HConsFunc[[?]scalaz.Unapply[scalaz.Applicative,scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]]{type M[X] = scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,X]; type A = Int}#M[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[?]],scalaz.Applicative,Char,Int,scalaz.typelevel.HNilFunc[scalaz.Applicative,Char,Int]]]] = { | |
- <synthetic> <artifact> val x$3: scalaz.typelevel.Func[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M,scalaz.Applicative,Char,Int] = countChar; | |
+}))(scalaz.`package`.idInstance)))(scalaz.this.Unapply.unapplyMFABC3[scalaz.Applicative, scalaz.Id.Id, scalaz.IndexedStateT, Boolean, Boolean, Int](scalaz.this.IndexedStateT.stateMonad[Boolean])).@>>>[G, C](scalaz.typelevel.AppFuncU.apply[Int, Int](((x: Int) => x))(scalaz.this.Unapply.unapplyA[scalaz.Applicative, Int](scalaz.this.Applicative.monoidApplicative[Int](scalaz.std.anyVal.intInstance)))); | |
+ val countAll: <error> = { | |
+ <synthetic> <artifact> val x$3: scalaz.typelevel.Func[[X]Int,scalaz.Applicative,Char,Int] = countChar; | |
{ | |
- <synthetic> <artifact> val x$2: scalaz.typelevel.Func[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M,scalaz.Applicative,Char,Int] = countLine; | |
- countWord.consA[scalaz.typelevel.HNilFunc[scalaz.Applicative,Char,Int]](scalaz.typelevel.AppFunc.HNil[Char, Int]).::[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M](x$2) | |
-}.::[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M](x$3) | |
+ <synthetic> <artifact> val x$2: scalaz.typelevel.Func[[X]Int,scalaz.Applicative,Char,Int] = countLine; | |
+ countWord.consA(AppFunc.HNil[Char, Int]).$colon$colon(x$2) | |
+}.::(x$3) | |
}; | |
- <synthetic> <artifact> private[this] val x$4: (scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]], scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]], scalaz.Unapply[scalaz.Applicative,scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]]{type M[X] = scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,X]; type A = Int}#M[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]]]) = (typelevel.this.HListFunc.HListFuncFunc[scalaz.Applicative, Char, Int](countAll).traverse[List](text)(scalaz.std.list.listInstance, Predef.this.=:=.tpEquals[scalaz.Applicative[countAll.L#Product]]): countAll.L#Product[List[Int]] @unchecked) match { | |
- case scalaz.syntax.typelevel.`package`.hlist.::.unapply[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]], countAll.tail.L#Product[List[Int]]](<unapply-selector>) <unapply> ((charCount @ _), scalaz.syntax.typelevel.`package`.hlist.::.unapply[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]], countAll.tail.tail.L#Product[List[Int]]](<unapply-selector>) <unapply> ((lineCount @ _), scalaz.syntax.typelevel.`package`.hlist.::.unapply[scalaz.Unapply[scalaz.Applicative,scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]]{type M[X] = scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,X]; type A = Int}#M[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]]], countAll.tail.tail.tail.L#Product[List[Int]]](<unapply-selector>) <unapply> ((wordCountState @ _), scalaz.typelevel.`package`.HNil))) => scala.Tuple3.apply[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]], scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]], scalaz.Unapply[scalaz.Applicative,scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]]{type M[X] = scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,X]; type A = Int}#M[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]]]](charCount, lineCount, wordCountState) | |
+ <synthetic> <artifact> private[this] val x$4: <error> = (countAll.traverse(text): <error> @unchecked) match { | |
+ case scalaz.syntax.typelevel.`package`.hlist.::((charCount @ _), $colon$colon((lineCount @ _), $colon$colon((wordCountState @ _), HNil))) => scala.Tuple3.apply[T1, T2, T3](charCount, lineCount, wordCountState) | |
}; | |
- val charCount: scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]] = x$4._1; | |
- val lineCount: scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]] = x$4._2; | |
- val wordCountState: scalaz.Unapply[scalaz.Applicative,scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,Int]]{type M[X] = scalaz.IndexedStateT[scalaz.Id.Id,Boolean,Boolean,X]; type A = Int}#M[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]]] = x$4._3; | |
- val wordCount: scalaz.Id.Id[scalaz.Unapply[scalaz.Applicative,Int]{type M[X] = Int; type A = Int}#M[List[Int]]] = wordCountState.eval(false)(scalaz.`package`.idInstance); | |
+ val charCount: <error> = <error: <none>>._1; | |
+ val lineCount: <error> = x$4._2; | |
+ val wordCountState: <error> = x$4._3; | |
+ val wordCount: <error> = wordCountState.eval(false); | |
scala.this.Predef.println(scala.this.Predef.augmentString("%d\t%d\t%d\t").format(lineCount, wordCount, charCount)) | |
} | |
} | |
} | |
+5 errors found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment