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
!SLIDE | |
sclaz7 の scalaz.Iteratee の紹介 | |
================================ | |
!SLIDE | |
発端 | |
---- | |
> @halcat0x15a: @lyrical_logical 7のiterateeが別物になってて読めないです・・・・ 11:38 PM - 14 Feb 12 |
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
!SLIDE | |
# virtualized pattern matcher の紹介 | |
!SLIDE | |
注意:大きな仕様変更があったので、このスライドの内容は古くなってしまいました | |
!SLIDE | |
## [Scala 2.10.0 Milestone 1 is released!](http://www.scala-lang.org/node/12250) | |
Included in this release are: |
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
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.sc | |
ala | |
index 4457940..8642727 100644 | |
--- a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala | |
+++ b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala | |
@@ -648,7 +648,7 @@ defined class Foo */ | |
trait TreeMakers { | |
def inMatchMonad(tp: Type): Type = appliedType(matchingMonadType, List(tp)) | |
- lazy val optimizingCodeGen = matchingMonadType.typeSymbol eq OptionClass |
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
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.sc | |
ala | |
index 4457940..bb9f538 100644 | |
--- a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala | |
+++ b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala | |
@@ -648,7 +648,7 @@ defined class Foo */ | |
trait TreeMakers { | |
def inMatchMonad(tp: Type): Type = appliedType(matchingMonadType, List(tp)) | |
- lazy val optimizingCodeGen = matchingMonadType.typeSymbol eq OptionClass |
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
m:.../quick/bin % cat vpm.scala | |
object vpm { | |
Option(0) match { | |
case Some(0) => 1 | |
case None => 2 | |
} | |
} | |
m:.../quick/bin % ./scalac -Xprint:typer vpm.scala | |
[[syntax trees at end of typer]]// Scala source: vpm.scala |
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
$ scala | |
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) Client VM, Java 1.6.0_29). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> trait A[T] { def t : T } | |
defined trait A | |
scala> trait B extends A[Int] | |
defined trait B |
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
fizzbuzz = zipWith max (map show [0..]) fb | |
where | |
fb = zipWith (++) f b | |
f = cycle ["Fizz", "", ""] | |
b = cycle ["Buzz", "", "", "", ""] | |
main = mapM_ putStrLn $ tail $ fizzBuzz |
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
#include <string> | |
#include <utility> | |
#include <cstdio> | |
#include <iostream> | |
#include <tr1/memory> | |
#include <X11/Xlib.h> | |
#include <X11/Xatom.h> |
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
module A | |
export type Base | |
export val global.f : Base -> Base -> Ret # vtbl 作りたいけど、作れない | |
module B | |
export type X can cast from Base | |
export val global.f : X -> Base -> Ret | |
module C | |
export type Y can cast from Base |
NewerOlder