Created
October 22, 2013 06:37
-
-
Save jedws/7096108 to your computer and use it in GitHub Desktop.
something very odd going on with scalaz-stream
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
| Welcome to Scala version 2.10.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_37). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import scalaz._, Scalaz._, stream._ | |
| import scalaz._ | |
| import Scalaz._ | |
| import stream._ | |
| scala> val chan = io.fileChunkR("build.sbt").mapOut { s => new String(s) } | |
| chan: scalaz.stream.Process.Channel[scalaz.concurrent.Task,Int,String] = Await(scalaz.concurrent.Task@8e8cc3b,<function1>,Halt(scalaz.stream.Process$End$),Halt(scalaz.stream.Process$End$)) | |
| scala> chan.runFoldMap { _(64).run } | |
| res0: scalaz.concurrent.Task[String] = scalaz.concurrent.Task@37d46c68 | |
| scala> :type res0.run | |
| String | |
| scala> res0.run | |
| scalaz.stream.Process$End$ | |
| scala> "wat?" | |
| res2: String = wat? | |
| scala> res1 | |
| <console>:17: error: not found: value res1 | |
| res1 | |
| ^ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
so, Process.End is a an object that extends Exception with no stack trace, calling
runthrows it.